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

Propagate table updates to the dashboard on endpoints summary #6460

Conversation

jbiset
Copy link
Member

@jbiset jbiset commented Feb 29, 2024

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

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

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@jbiset jbiset self-assigned this Feb 29, 2024
@jbiset jbiset linked an issue Feb 29, 2024 that may be closed by this pull request
2 tasks
@lucianogorza lucianogorza self-requested a review March 1, 2024 18:42
Copy link
Contributor

@lucianogorza lucianogorza left a comment

Choose a reason for hiding this comment

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

CR 🟢

Test 🔴

Render page 🟢

image

Click Refresh button 🔴

The Refresh button must update table and dashboard. Currently the dashboard is not updating.
image

JuanGarriuz
JuanGarriuz previously approved these changes Mar 4, 2024
Copy link
Member

@JuanGarriuz JuanGarriuz left a comment

Choose a reason for hiding this comment

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

CR ✔️

Test ✔️

Evidence

image
image
image
image
image
image

Reload Dashboard

image
image
image

LGTM!!

JuanGarriuz
JuanGarriuz previously approved these changes Mar 4, 2024
JuanGarriuz
JuanGarriuz previously approved these changes Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

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 )

Copy link
Contributor

github-actions bot commented Mar 4, 2024

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 )

Copy link
Contributor

github-actions bot commented Mar 4, 2024

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 )

@lucianogorza
Copy link
Contributor

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

Copy link
Contributor

@lucianogorza lucianogorza left a comment

Choose a reason for hiding this comment

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

LGTM

@asteriscos asteriscos merged commit 9a0a9a5 into 4.9.0 Mar 5, 2024
4 checks passed
@asteriscos asteriscos deleted the 6454-propagate-table-updates-to-the-dashboard-on-endpoints-summary branch March 5, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Propagate table updates to the dashboard on Endpoints summary
4 participants