Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infrastructure UI] Filter control re-rendering problem fix #159320

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

crespocarlos
Copy link
Contributor

@crespocarlos crespocarlos commented Jun 8, 2023

fixes #159317

Summary

This PR fixes a problem in the utilization of the ControlGroupRenderer component in the Hosts View. The problem originated from the need to manually compare changes in the filterPanel object, to prevent the page from making duplicate requests

filter_control_fix.mov

After many changes that the code has been through, the comparison mentioned above has become unnecessary.

How to test

  • Start a local Kibana instance
  • Navigate to Infrastructure > Hosts
  • Play with the filter controls (depending on how fast the user is, it might hang for a little while, but this won't slow the whole page down)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@crespocarlos crespocarlos added Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:ObsHosts Hosts feature within Observability v8.9.0 labels Jun 8, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
infra 2.0MB 2.0MB -239.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 414 418 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 498 502 +4
total +6

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@crespocarlos crespocarlos marked this pull request as ready for review June 8, 2023 16:20
@crespocarlos crespocarlos requested a review from a team as a code owner June 8, 2023 16:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@jennypavlova jennypavlova self-requested a review June 12, 2023 08:44
Copy link
Member

@jennypavlova jennypavlova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 Thank you for adding the fix! I was able to reproduce the slow page issue before with faster clicks and now with this change it wasn't there 🙌

Before After
image image

@crespocarlos crespocarlos merged commit bcc4f11 into elastic:main Jun 12, 2023
@crespocarlos crespocarlos deleted the 159317-filter-controls-fix branch June 12, 2023 12:30
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 12, 2023
…159320)

fixes elastic#159317

## Summary

This PR fixes a problem in the utilization of the `ControlGroupRenderer`
component in the Hosts View. The problem originated from the need to
manually compare changes in the `filterPanel` object, to prevent the
page from making duplicate requests

https://github.com/elastic/kibana/assets/2767137/b38f5691-0519-4ae2-aab2-daaf0f72cd0d

After many changes that the code has been through, the comparison
mentioned above has become unnecessary.

### How to test

- Start a local Kibana instance
- Navigate to `Infrastructure > Hosts`
- Play with the filter controls (depending on how fast the user is, it
might hang for a little while, but this won't slow the whole page down)

(cherry picked from commit bcc4f11)
kibanamachine added a commit that referenced this pull request Jun 12, 2023
…59320) (#159458)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Infrastructure UI] Filter control re-rendering problem fix
(#159320)](#159320)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-12T12:30:23Z","message":"[Infrastructure
UI] Filter control re-rendering problem fix (#159320)\n\nfixes
#159317 \r\n\r\n##
Summary\r\n\r\nThis PR fixes a problem in the utilization of the
`ControlGroupRenderer`\r\ncomponent in the Hosts View. The problem
originated from the need to\r\nmanually compare changes in the
`filterPanel` object, to prevent the\r\npage from making duplicate
requests\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/2767137/b38f5691-0519-4ae2-aab2-daaf0f72cd0d\r\n\r\nAfter
many changes that the code has been through, the comparison\r\nmentioned
above has become unnecessary.\r\n\r\n\r\n\r\n### How to test\r\n\r\n-
Start a local Kibana instance\r\n- Navigate to `Infrastructure >
Hosts`\r\n- Play with the filter controls (depending on how fast the
user is, it\r\nmight hang for a little while, but this won't slow the
whole page
down)","sha":"bcc4f11e0b97e991d94f5e6368dfa154f753d2ca","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Metrics
UI","Team:Infra Monitoring
UI","release_note:skip","backport:prev-minor","Feature:ObsHosts","v8.9.0"],"number":159320,"url":"https://github.com/elastic/kibana/pull/159320","mergeCommit":{"message":"[Infrastructure
UI] Filter control re-rendering problem fix (#159320)\n\nfixes
#159317 \r\n\r\n##
Summary\r\n\r\nThis PR fixes a problem in the utilization of the
`ControlGroupRenderer`\r\ncomponent in the Hosts View. The problem
originated from the need to\r\nmanually compare changes in the
`filterPanel` object, to prevent the\r\npage from making duplicate
requests\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/2767137/b38f5691-0519-4ae2-aab2-daaf0f72cd0d\r\n\r\nAfter
many changes that the code has been through, the comparison\r\nmentioned
above has become unnecessary.\r\n\r\n\r\n\r\n### How to test\r\n\r\n-
Start a local Kibana instance\r\n- Navigate to `Infrastructure >
Hosts`\r\n- Play with the filter controls (depending on how fast the
user is, it\r\nmight hang for a little while, but this won't slow the
whole page
down)","sha":"bcc4f11e0b97e991d94f5e6368dfa154f753d2ca"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159320","number":159320,"mergeCommit":{"message":"[Infrastructure
UI] Filter control re-rendering problem fix (#159320)\n\nfixes
#159317 \r\n\r\n##
Summary\r\n\r\nThis PR fixes a problem in the utilization of the
`ControlGroupRenderer`\r\ncomponent in the Hosts View. The problem
originated from the need to\r\nmanually compare changes in the
`filterPanel` object, to prevent the\r\npage from making duplicate
requests\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/2767137/b38f5691-0519-4ae2-aab2-daaf0f72cd0d\r\n\r\nAfter
many changes that the code has been through, the comparison\r\nmentioned
above has become unnecessary.\r\n\r\n\r\n\r\n### How to test\r\n\r\n-
Start a local Kibana instance\r\n- Navigate to `Infrastructure >
Hosts`\r\n- Play with the filter controls (depending on how fast the
user is, it\r\nmight hang for a little while, but this won't slow the
whole page down)","sha":"bcc4f11e0b97e991d94f5e6368dfa154f753d2ca"}}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Metrics UI Metrics UI feature Feature:ObsHosts Hosts feature within Observability release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.8.2 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Infra UI] Hosts View: filter controls freezing
6 participants