wazuh-dashboard-plugins
wazuh-dashboard-plugins copied to clipboard
Agents section performance improvements
Description
This PR optimizes the number of requests Agents Overview makes and it also avoids a few serialization o requests to allow asynchronous components start up.
Results
As a result of these changes the section has improved significantly the init loading time.
Before the changes:
After the changes:
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.
Jest Test Coverage | % | values |
---|---|---|
Statements | 6.69% | ( 2431 / 36352 ) |
Branches | 2.68% | ( 754 / 28133 ) |
Functions | 4.48% | ( 398 / 8882 ) |
Lines | 6.77% | ( 2352 / 34767 ) |
TR: :heavy_check_mark:
Screencast from 07-09-22 10:50:14.webm
Comment: We detected a wrong label on synced agent percentage.
C.C @asteriscos
TR: heavy_check_mark
Screencast.from.07-09-22.10.50.14.webm Comment: We detected a wrong label on synced agent percentage.
C.C @asteriscos
Good catch!
I added the new synced agents
initial value as well in this commit.
Commit Test OK! I attached the video here Screencast from 07-09-22 12:07:48.webm C.C @asteriscos @AlexRuiz7
The backport to 4.4-7.16
failed:
The process '/usr/bin/git' failed with exit code 1
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 base
branch is 4.4-7.16
and the compare
/head
branch is backport-4363-to-4.4-7.16
.