Skip to content

Settings -> ElasticSearch refresh re-loads the entire panel #7948

Closed

Description

@harshach

Affected module
UI

Describe the bug
Once we start the elasticsearch indexing and the admin hits the refresh button, it reloads the entire panel. All we need to reload just the values instead of the entire panel.

reload-es.mov

To Reproduce

Screenshots or steps to reproduce

Expected behavior
A clear and concise description of what you expected to happen.

Version:

  • OS: [e.g. iOS]
  • Python version:
  • OpenMetadata version: [e.g. 0.8]
  • OpenMetadata Ingestion package version: [e.g. openmetadata-ingestion[docker]==XYZ]

Additional context
Add any other context about the problem here.

Activity

  1. added
    good-first-issue
    UI
    on Oct 4, 2022
  2. YuexinChen96 commented on Oct 11, 2022

    @YuexinChen96

    Hi harshach, I am interested in this issue and want to try on this. Can you please assign this issue to me?

  3. alexbassa commented on Oct 12, 2022

    @alexbassa
    Contributor

    Hi harshach, keen to jump on this issue too if its possible?

  4. ayush-shah commented on Oct 12, 2022

    @ayush-shah
    Member

    Assigning the issue to both, @YuexinChen96 and @alexbassa

  5. removed their assignment
    on Oct 12, 2022
  6. YuexinChen96 commented on Oct 12, 2022

    @YuexinChen96

    Assigning the issue to both, @YuexinChen96 and @alexbassa

    Sorry about that. I have worked on this issue, but I miss-clicked the unassign-me. Could you please add me to the assignee again? Thanks.

  7. ayush-shah commented on Oct 12, 2022

    @ayush-shah
    Member

    Assigning it to you @YuexinChen96.

  8. HotDryNoodle-WH commented on Oct 13, 2022

    @HotDryNoodle-WH

    Hi,I am a student,I would like to analyse this problem and try to solve it to contribute to this project. Could you please give me some instructions and point me in the direction of where to find the classes (or folders) concerned with the problem?

  9. alexbassa commented on Oct 13, 2022

    @alexbassa
    Contributor

    Hi,I am a student,I would like to analyse this problem and try to solve it to contribute to this project. Could you please give me some instructions and point me in the direction of where to find the classes (or folders) concerned with the problem?

    Hey! OneGuitars is a fellow group member of mine so would love for him to also jump on the issue and if you can help with direction that would be fantastic :-)

  10. alexbassa commented on Oct 16, 2022

    @alexbassa
    Contributor

    Hey @harshach, I wa having a bit of trouble finding the correct repos to work on, is there anyway you can try pointing me in the right direction? Really new to controbuting so would appreciate any help you can give! :)

  11. ayush-shah commented on Oct 17, 2022

    @ayush-shah
    Member

    cc: @open-metadata/ui ^

  12. YuexinChen96 commented on Oct 17, 2022

    @YuexinChen96

    Hello @YuexinChen96 @OneGuitars @alexbassa, Here is the file where you have to make the changes. https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-ui/src/main/resources/ui/src/pages/ElasticSearchIndexPage/elastic-search-index.page.tsx

    Doc reference: https://docs.open-metadata.org/developers/contribute/build-code-and-run-tests

    Hi Sachin, I have reviewed this issue. I notice that the onClick function for reload button is fetchBatchReIndexedData & fetchBatchReIndexedData. However, I think the main problem with this issue is not about the coding but the React framework. For these two functions, I do not find any UI refresh for this part. They only have the data updated. As for assigning new states in React, React framework will call rerender function automatically and will compare the old framework with the new one. Therefore, I think one potential solution will be changing the dependency for this panel. Typically, this page uses Card component to display, I think breaking this component into two may fix this problem (but I am not sure whether this way will match the original design for this component). I am not sure if my direction is correct or not. Any suggestions will be appreciated.

  13. Sachin-chaurasiya commented on Oct 17, 2022

    @Sachin-chaurasiya
    Contributor

    Hello @YuexinChen96 @OneGuitars @alexbassa, Here is the file where you have to make the changes. https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-ui/src/main/resources/ui/src/pages/ElasticSearchIndexPage/elastic-search-index.page.tsx
    Doc reference: https://docs.open-metadata.org/developers/contribute/build-code-and-run-tests

    Hi Sachin, I have reviewed this issue. I notice that the onClick function for reload button is fetchBatchReIndexedData & fetchBatchReIndexedData. However, I think the main problem with this issue is not about the coding but the React framework. For these two functions, I do not find any UI refresh for this part. They only have the data updated. As for assigning new states in React, React framework will call rerender function automatically and will compare the old framework with the new one. Therefore, I think one potential solution will be changing the dependency for this panel. Typically, this page uses Card component to display, I think breaking this component into two may fix this problem (but I am not sure whether this way will match the original design for this component). I am not sure if my direction is correct or not. Any suggestions will be appreciated.

    @YuexinChen96 , The main issue is that when we try to re-index for some moment the data part is blank, So I suggest we should show the loader while data is being fetched.

  14. alexbassa commented on Oct 18, 2022

    @alexbassa
    Contributor

    @Sachin-chaurasiya, as far as I can see, all the code for showing grey bars as a way of signifying that the page is loading (such as what occurs in the screenshot below) already exists for the upper panel, but, for whatever reason, is not showing. I am unable at this time to figure out why that might be, but once again appreciate any guidance :)
    Screen Shot 2022-10-18 at 3 08 58 pm (2)

  15. Sachin-chaurasiya commented on Oct 18, 2022

    @Sachin-chaurasiya
    Contributor

    @alexbassa , Can we do something like this?
    When data is loading just reduce the content opacity and show the loader on top of that.

    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

UIgood-first-issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions