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

Refactoring and redesign endpoints summary charts #6268

Merged

Conversation

jbiset
Copy link
Member

@jbiset jbiset commented Jan 4, 2024

Description

This pull request modifies visualizations on Endpoints Summary changing the following:

  • The Agents by State chart is refactored to be a decoupled and reusable component for other similar Endpoint Summary charts.
  • The Agents by operating system graph is developed, reusing the refactored Agents by state component.
  • The Agents by Group graph is developed, reusing the refactored Agents by State component.
  • A card is developed showing the number of outdated agents.

Each visualization above has a user interaction that allows filters to be added to the table below as appropriate.

Additionally, the /agents/stats/distinct endpoint is updated in the imposter.

Issues Resolved

#6258

Evidence

Endpoints summary screen

Breakpoint 1440px

image

Breakpoint 1024px

image

Breakpoint 768px

image

Mobile

image

Endpoints summary screen with outdated agents popover opened

image

Endpoints summary screen without outdated agents popover opened

image

Test

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

Steps to test:

  • Go to Endpoints summary and test following:
Test Chrome Firefox Safari
Check that the visualizations are rendered as shown in the evidence
Check responsive version of visualizations rendering
Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents
Check that filters are applied when interacting with the Agents by status legend
Check that filters are applied when interacting with the Agents by OS legend
Check that filters are applied when interacting with the Agents by Group legend
Check that filters are applied when interacting with the Filter outdated agents button
Check the link to the "How to update agents" documentation in the Outdated popover

Details

⚫ Check that the visualizations are rendered as shown in the evidence

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Check responsive version of visualizations rendering

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Check that filters are applied when interacting with the Agents by status legend

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Check that filters are applied when interacting with the Agents by OS legend

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Check that filters are applied when interacting with the Filter outdated agents button

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Check the link to the "How to update agents" documentation in the Outdated popover

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

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 linked an issue Jan 4, 2024 that may be closed by this pull request
9 tasks
@asteriscos asteriscos changed the base branch from master to 4.9.0 February 13, 2024 10:03
@jbiset jbiset marked this pull request as ready for review February 23, 2024 19:22
@jbiset jbiset changed the title Refactor and redesign endpoints summary charts Refactoring and redesign endpoints summary charts Feb 23, 2024
@lucianogorza lucianogorza self-requested a review February 23, 2024 19:42
@lucianogorza
Copy link
Contributor

lucianogorza commented Feb 23, 2024

CR

Test

Test Chrome Firefox Safari
Check that the visualizations are rendered as shown in the evidence 🟢
Check responsive version of visualizations rendering 🟡
Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents 🟢
Check that filters are applied when interacting with the Agents by status legend 🟢
Check that filters are applied when interacting with the Agents by OS legend 🔴
Check that filters are applied when interacting with the Agents by Group legend 🔴
Check that filters are applied when interacting with the Filter outdated agents button
Check the link to the "How to update agents" documentation in the Outdated popover

Details

🟢 Check that the visualizations are rendered as shown in the evidence

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟡 Check responsive version of visualizations rendering

Chrome - 🟡

image
image

In mobile (width: 414px) the charts overflow the screen
image

Firefox - ⚫

Safari - ⚫

🟢 Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 Check that filters are applied when interacting with the Agents by status legend

Chrome - 🟢

image
image

Firefox - ⚫

Safari - ⚫

🔴 Check that filters are applied when interacting with the Agents by OS legend

Chrome - 🔴

image

The filter doesn't apply for unknown option
image

Firefox - ⚫

Safari - ⚫

🔴 Check that filters are applied when interacting with the Agents by Group legend

Chrome - 🔴

There are two combinations: default,group1 and group1,default that get the same agents (2 agents). Maybe we have to process the data from the API to detect duplicated cases and aggregate them.
image
image

Groups charts are confusing, i think is better to summarize by one group, and maybe show the top 5 and the Other category.
image

Firefox - ⚫

Safari - ⚫

⚫ Check that filters are applied when interacting with the Filter outdated agents button

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Check the link to the "How to update agents" documentation in the Outdated popover

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

@yenienserrano
Copy link
Member

yenienserrano commented Feb 23, 2024

Test

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

Steps to test:

  • Go to Endpoints summary and test following:
Test Chrome Firefox Safari
Check that the visualizations are rendered as shown in the evidence 🟢
Check responsive version of visualizations rendering 🟢
Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents 🟢
Check that filters are applied when interacting with the Agents by status legend 🟢
Check that filters are applied when interacting with the Agents by OS legend 🟡
Check that filters are applied when interacting with the Agents by Group legend 🟡
Check that filters are applied when interacting with the Filter outdated agents button 🟡
Check the link to the "How to update agents" documentation in the Outdated popover 🟢

Details

🟢 Check that the visualizations are rendered as shown in the evidence

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 Check responsive version of visualizations rendering

Chrome - 🟢

image
image
image

Firefox - ⚫

Safari - ⚫

🟢 Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 Check that filters are applied when interacting with the Agents by status legend

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟡 Check that filters are applied when interacting with the Agents by OS legend

2 requests for each filtered legend

Chrome - 🟡

windows

image
image

unknown

image
image

Firefox - ⚫

Safari - ⚫

🟡 Check that filters are applied when interacting with the Agents by Group legend

2 requests for each filtered legend

Chrome - 🟡

image
image

Firefox - ⚫

Safari - ⚫

🟡 Check that filters are applied when interacting with the Filter outdated agents button

2 requests for each filtered legend and one of the requests is incomplete

Chrome - 🟡

image
image

Firefox - ⚫

Safari - ⚫

🟢 Check the link to the "How to update agents" documentation in the Outdated popover

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

@JuanGarriuz
Copy link
Member

JuanGarriuz commented Feb 26, 2024

Test

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

Steps to test:

  • Go to Endpoints summary and test following:
Test Chrome Firefox Safari
Check that the visualizations are rendered as shown in the evidence 🟢
Check responsive version of visualizations rendering 🟢
Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents 🟢
Check that filters are applied when interacting with the Agents by status legend 🟢
Check that filters are applied when interacting with the Agents by OS legend 🟢
Check that filters are applied when interacting with the Agents by Group legend 🟢
Check that filters are applied when interacting with the Filter outdated agents button
Check the link to the "How to update agents" documentation in the Outdated popover 🟢

Details

🟢 Check that the visualizations are rendered as shown in the evidence

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 Check responsive version of visualizations rendering

Chrome - 🟢

image
image

Firefox - ⚫

Safari - ⚫

🟢 Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 Check that filters are applied when interacting with the Agents by status legend

Chrome - 🟢

image
image
image

Firefox - ⚫

Safari - ⚫

🟢 Check that filters are applied when interacting with the Agents by OS legend

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

⚫ Check that filters are applied when interacting with the Filter outdated agents button

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

🟢 Check the link to the "How to update agents" documentation in the Outdated popover

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

Copy link
Member

@yenienserrano yenienserrano left a comment

Choose a reason for hiding this comment

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

Will the graphs only be updated when the page is loaded?

Because the agent table has a refresh button, and they may need to change the graph results.

image

image

@lucianogorza
Copy link
Contributor

lucianogorza commented Feb 27, 2024

CR 🟢

Test 🟢

Test Chrome Firefox Safari
Check that the visualizations are rendered as shown in the evidence 🟢
Check responsive version of visualizations rendering 🟢
Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents 🟢
Check that filters are applied when interacting with the Agents by status legend 🟢
Check that filters are applied when interacting with the Agents by OS legend 🟢
Check that filters are applied when interacting with the Agents by Group legend 🟢
Check that filters are applied when interacting with the Filter outdated agents button
Check the link to the "How to update agents" documentation in the Outdated popover

Details

🟢 Check that the visualizations are rendered as shown in the evidence

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 Check responsive version of visualizations rendering

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 Check that filters are applied when interacting with the Agents by status legend

Chrome - 🟢

image
image

Firefox - ⚫

Safari - ⚫

🟢 Check that filters are applied when interacting with the Agents by OS legend

Chrome - 🟢

image
image

Firefox - ⚫

Safari - ⚫

🟢 Check that filters are applied when interacting with the Agents by Group legend

Chrome - 🟢

image
image

Firefox - ⚫

Safari - ⚫

🟢 Check that filters are applied when interacting with the Filter outdated agents button

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 Check the link to the "How to update agents" documentation in the Outdated popover

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

lucianogorza
lucianogorza previously approved these changes Feb 27, 2024
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

Copy link
Contributor

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

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

Main plugin code coverage (Jest) test % values
Statements 12.33% ( 4288 / 34757 )
Branches 8.08% ( 1855 / 22931 )
Functions 11.87% ( 988 / 8323 )
Lines 12.5% ( 4164 / 33290 )

@Tostti
Copy link
Member

Tostti commented Feb 28, 2024

Test

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

Steps to test:

  • Go to Endpoints summary and test following:
Test Chrome Firefox Safari
Check that the visualizations are rendered as shown in the evidence 🟢
Check responsive version of visualizations rendering 🟢
Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents 🟢
Check that filters are applied when interacting with the Agents by status legend 🟢
Check that filters are applied when interacting with the Agents by OS legend 🟢
Check that filters are applied when interacting with the Agents by Group legend 🟢
Check that filters are applied when interacting with the Filter outdated agents button 🟢
Check the link to the "How to update agents" documentation in the Outdated popover 🟢

Details

🟢Check that the visualizations are rendered as shown in the evidence

Chrome - ⚫

Firefox - ⚫

Safari - 🟢

image
image

🟢 Check responsive version of visualizations rendering

Chrome - ⚫

Firefox - ⚫

Safari - 🟢

image
image

🟢 Check that the filter outdated agents button in the outdated agents component is disabled, using a real manager that does not have outdated agents

Chrome - ⚫

Firefox - ⚫

Safari - 🟢

image
image

🟢 Check that filters are applied when interacting with the Agents by status legend

Chrome - ⚫

Firefox - ⚫

Safari - 🟢

image

image

🟢 Check that filters are applied when interacting with the Agents by OS legend

Chrome - ⚫

Firefox - ⚫

Safari - 🟢

image

image

🟢 Check that filters are applied when interacting with the Agents by group legend

Chrome - ⚫

Firefox - ⚫

Safari - 🟢

image
image

🟢 Check that filters are applied when interacting with the Filter outdated agents button

Chrome - ⚫

Firefox - ⚫

Safari - 🟢

image
image

🟢 Check the link to the "How to update agents" documentation in the Outdated popover

Chrome - ⚫

Firefox - ⚫

Safari - 🟢

image
image

Copy link
Member

@Tostti Tostti left a comment

Choose a reason for hiding this comment

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

LGTM

@Tostti Tostti merged commit f3fe46b into 4.9.0 Feb 28, 2024
4 checks passed
@Tostti Tostti deleted the enhancement/6258-refactor-and-redesign-endpoints-summary-charts branch February 28, 2024 15:22
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.

Refactoring and redesign Endpoints Summary charts
6 participants