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

Implement embeddable dashboard on PCI DSS #6504

Merged
merged 32 commits into from
May 7, 2024

Conversation

Desvelao
Copy link
Member

@Desvelao Desvelao commented Mar 13, 2024

Description

This pull request replaces the Dashboard tab and adapts the Panels tab on PCI DSS application

Issues Resolved

#6502

Evidence

image
image
image
image

Test

Go to PCI DSS > Dashboard:

Each visualization, if applicable, must have interaction so that it adds the corresponding filter(s) upon clicking.
The visualizations have to be updated according to the filters applied in the searchbar.
The visualizations have to be updated when a search is performed in the searchbar.
If there are no results, the corresponding message must appear that there are no results and the visualizations should not be rendered.
If there is SampleData, the corresponding SampleData message must appear.
If an agent is pinned, the views must be updated and changed to the agent view, if applicable.
Check filter behavior with respect to hide alerts, allow agents and filter order.

Go to PCI DSS > Controls
Check the requirements filters on the on the left side filters the requirements on the right side
Click on the requirement to open the flyout and interact with the search bar and links, they should work as expected. The search should take into account optionally the allowed agents and the hide manager alerts plugin setting if enabled.
In the details flyout click on the show on dashboard and events links, they should display this tabs with a filter related to the selected requirement
The link on the flyout table should redirect to Endpoint Summary and Rules respectively

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

@Desvelao Desvelao self-assigned this Mar 13, 2024
@Desvelao Desvelao linked an issue Mar 13, 2024 that may be closed by this pull request
6 tasks
Copy link
Contributor

Wazuh Core plugin code coverage (Jest) test % values
Statements 45.37% ( 397 / 875 )
Branches 41.31% ( 157 / 380 )
Functions 43.83% ( 135 / 308 )
Lines 45.61% ( 395 / 866 )

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 10.78% ( 3751 / 34786 )
Branches 7.26% ( 1653 / 22763 )
Functions 10.48% ( 870 / 8294 )
Lines 10.93% ( 3645 / 33341 )

@Desvelao Desvelao marked this pull request as ready for review April 26, 2024 14:00
…o feat/6502-implement-embeddable-dashboard-on-pci-dss
@JuanGarriuz JuanGarriuz self-requested a review May 3, 2024 07:37
@JuanGarriuz
Copy link
Member

JuanGarriuz commented May 3, 2024

Test 🔴

When the user unpins the agent, the agent is not removed from the url.

Grabacion.2024-04-30.110838.mp4

…o feat/6502-implement-embeddable-dashboard-on-pci-dss
@lucianogorza lucianogorza self-requested a review May 3, 2024 15:32
@lucianogorza
Copy link
Contributor

lucianogorza commented May 3, 2024

CR 🟢

Test 🟡

Dashboard

  • 🟡 Go to PCI DSS > Dashboard:
Details

The errors must be fixed in the PR #6594

image
image

  • 🟡 Remove unpinned agent:
Details

When the user unpins the agent, the agent is not removed from the url. The error is not responsibility of the PR.

unpin-agent.webm
  • Each visualization, if applicable, must have interaction so that it adds the corresponding filter(s) upon clicking.
Details
filter-interaction.webm
  • The visualizations have to be updated according to the filters applied in the searchbar.
Details

image

  • The visualizations have to be updated when a search is performed in the searchbar.
Details

image

  • If there are no results, the corresponding message must appear that there are no results and the visualizations should not be rendered.
Details

image

  • If there is SampleData, the corresponding SampleData message must appear.
Details

image

  • If an agent is pinned, the views must be updated and changed to the agent view, if applicable.
Details

image

  • Check filter behavior with respect to hide alerts, allow agents and filter order.
Details

Hide manager alerts: false

image

Hide manager alerts: true

image

Controls

Go to PCI DSS > Controls

  • Check the requirements filters on the on the left side filters the requirements on the right side
Details
left-filters.webm
  • 🟡 Click on the requirement to open the flyout and interact with the search bar and links, they should work as expected. The search should take into account optionally the allowed agents and the hide manager alerts plugin setting if enabled.
Details
flyout.webm

🟡 When the flyout is opened, the query is repeated. The error is not responsibility of the PR.

image

  • In the details flyout click on the show on dashboard and events links, they should display this tabs with a filter related to the selected requirement
Details

Dashboard link

dashboard.webm

Events link

events.webm
  • The link on the flyout table should redirect to Endpoint Summary and Rules respectively
Details

Agent

agent.webm

Rule

rule.webm

…o feat/6502-implement-embeddable-dashboard-on-pci-dss
@Desvelao
Copy link
Member Author

Desvelao commented May 6, 2024

@lucianogorza , this toast appears due the old visualizations related to the PCI DSS were removed from the backend side and in the development branch, there is logic related to the old dashboard. When we remove this logic, the toast should not appear.

Related image:
https:/wazuh/wazuh-dashboard-plugins/assets/103193307/d1a57a99-fe5a-410d-ab79-f79b7f137095

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.

  • When the user unpins the agent, the agent is not removed from the url.
  • In Controls Tab, when the flyout is opened, the query is repeated

Those errors are not responsibility of this PR.

Details in comment #6504 (comment)

@Desvelao
Copy link
Member Author

Desvelao commented May 7, 2024

@lucianogorza ,

When the user unpins the agent, the agent is not removed from the url.

This is happening in other modules too and it should be related to the button to unpin the agent. Other co-workers are experiencing this problem and this should not be a reason to block the pull request

In Controls Tab, when the flyout is opened, the query is repeated

The repeated request is happening too on MITRE ATT&CK > Framework that is similar to the Controls tab. I was researching about this topic and it seems a possible bug related to a change of dependency of the effect that does the API request of the discover table.

@Desvelao Desvelao requested a review from lucianogorza May 7, 2024 13:30
JuanGarriuz
JuanGarriuz previously approved these changes May 7, 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.

LGTM!!!

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

@Desvelao Desvelao merged commit e4fbb24 into 4.9.0 May 7, 2024
1 check passed
@Desvelao Desvelao deleted the feat/6502-implement-embeddable-dashboard-on-pci-dss branch May 7, 2024 14:03
@asteriscos asteriscos mentioned this pull request Aug 21, 2024
74 tasks
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.

[Remove discover] Implement embeddable dashboard on PCI DSS module
3 participants