wazuh-dashboard-plugins
wazuh-dashboard-plugins copied to clipboard
Propagate table updates to the dashboard on endpoints summary
Description
This pull request adds a mechanism to update the dashboard visualizations in case events occur in the Endpoints summary table.
For this, a new useService
hook is added with the corresponding tests that allows the service to be called again according to a refresh parameter.
The corresponding DonutCard
and OutdatedAgentsCard
tests are also updated
Issues Resolved
- #6454
Evidence
Test
[!NOTE]
For this test it is necessary to have more than one agent (not necessarily connected) and more than one group
Steps to test:
- Go to Server management -> Endpoints Summary
- Check that the module renders correctly
- Adding one or more agents to a group through the actions in the table should cause new requests to be made, updating the dashboard visualizations.
- Removing the group of one or more agents through the actions in the table should cause new requests to be made, updating the dashboard views.
Check List
- [x] All tests pass
- [x]
yarn test:jest
- [x]
- [x] New functionality includes testing.
- [ ] New functionality has been documented.
- [x] Update CHANGELOG.md
- [x] Commits are signed per the DCO using --signoff
Wazuh Core plugin code coverage (Jest) test | % | values |
---|---|---|
Statements | 21.38% | ( 176 / 823 ) |
Branches | 19.45% | ( 79 / 406 ) |
Functions | 14.17% | ( 36 / 254 ) |
Lines | 21.57% | ( 173 / 802 ) |
Wazuh Check Updates plugin code coverage (Jest) test | % | values |
---|---|---|
Statements | 76.44% | ( 172 / 225 ) |
Branches | 58.65% | ( 61 / 104 ) |
Functions | 61.7% | ( 29 / 47 ) |
Lines | 76.44% | ( 172 / 225 ) |
Main plugin code coverage (Jest) test | % | values |
---|---|---|
Statements | 12.44% | ( 4305 / 34582 ) |
Branches | 8.12% | ( 1855 / 22817 ) |
Functions | 11.97% | ( 991 / 8274 ) |
Lines | 12.62% | ( 4181 / 33119 ) |
CR 🟢
Test 🟢
Render page
Click Refresh
button
Add group to agent
Remove groups from agents