-
Notifications
You must be signed in to change notification settings - Fork 186
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
Agents section performance improvements #4363
Agents section performance improvements #4363
Conversation
|
TR: ✔️ Screencast.from.07-09-22.10.50.14.webmComment: We detected a wrong label on synced agent percentage. |
Good catch! |
Commit Test OK! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
perfomance.mp4
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.4-7.16 4.4-7.16
# Navigate to the new working tree
cd .worktrees/backport-4.4-7.16
# Create a new branch
git switch --create backport-4363-to-4.4-7.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4f710c1c1aefa1395a24c82e8a5d1ff673a47ee6
# Push it to GitHub
git push --set-upstream origin backport-4363-to-4.4-7.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-7.16 Then, create a pull request where the |
* Requests improvements * Fix Agent wizard close state * Independent loading cards * Updated wazuh version * Added changelog * Added agentsSynced initial value * Added flex-wrap to KPIs (cherry picked from commit 4f710c1)
Agents section performance improvements (#4363) * Requests improvements * Fix Agent wizard close state * Independent loading cards * Updated wazuh version * Added changelog * Added agentsSynced initial value * Added flex-wrap to KPIs (cherry picked from commit 4f710c1) Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
* Requests improvements * Fix Agent wizard close state * Independent loading cards * Updated wazuh version * Added changelog * Added agentsSynced initial value * Added flex-wrap to KPIs (cherry picked from commit 4f710c1)
* Requests improvements * Fix Agent wizard close state * Independent loading cards * Updated wazuh version * Added changelog * Added agentsSynced initial value * Added flex-wrap to KPIs (cherry picked from commit 4f710c1)
Description
This PR optimizes the number of requests Agents Overview makes. It also fixes some unnecessary use of
await
of requests, this way requests don't need to finish to start a new one and the API can process them at the same time. It improves the view performance by launching some requests to the API in parallel, instead of sequentially.Results
As a result of these changes, the section has improved significantly the init loading time.
Before the changes:
![image](https://user-images.githubusercontent.com/9343732/181823003-2dcd5f3b-fce3-4da0-9f8e-42a024b41613.png)
After the changes:
![image](https://user-images.githubusercontent.com/9343732/181823078-7f2e8485-283a-4d94-8218-342d63a6755f.png)
Closes #3623
Loading experience
This PR includes a change to make each card and KPI have independent loading indicator to make information available as soon as possible, instead of waiting every dashboard request response.
There's a known issue with the Evolution loading indicator: there's a shared loading state which makes the Agents Evolution loading icon flicker.