wazuh-dashboard-plugins icon indicating copy to clipboard operation
wazuh-dashboard-plugins copied to clipboard

Propagate table updates to the dashboard on endpoints summary

Open jbiset opened this issue 11 months ago • 3 comments

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

Evidence.webm

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] New functionality includes testing.
  • [ ] New functionality has been documented.
  • [x] Update CHANGELOG.md
  • [x] Commits are signed per the DCO using --signoff

jbiset avatar Feb 29 '24 21:02 jbiset

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 )

github-actions[bot] avatar Mar 04 '24 16:03 github-actions[bot]

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 )

github-actions[bot] avatar Mar 04 '24 16:03 github-actions[bot]

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 )

github-actions[bot] avatar Mar 04 '24 16:03 github-actions[bot]

CR 🟢

Test 🟢

Render page

image

Click Refresh button

image

Add group to agent

image image image

Remove groups from agents

image image image image image

lucianogorza avatar Mar 04 '24 16:03 lucianogorza