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

Add vulnerability detection card in agent overview #7085

Open
wants to merge 9 commits into
base: 4.10.0
Choose a base branch
from

Conversation

Machi3mfl
Copy link
Member

@Machi3mfl Machi3mfl commented Oct 8, 2024

Description

This PR, adds the new vulnerability detection card in the agent overview section.
Also, create the necessary components

Closes #7058

Evidence

Screenshot 2024-10-08 at 5 59 58 PM Screenshot 2024-10-09 at 8 22 20 AM
Screen.Recording.2024-10-09.at.8.25.08.AM.mov
Screen.Recording.2024-10-09.at.8.37.58.AM.mov
Screen.Recording.2024-10-09.at.8.56.58.AM.mov

Test

Test

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

UI

Test Chrome Firefox Safari
Click on Vulnerability KPIs and check if redirects to the dashboard with filters and agent pinned
Click on the Top Packages table link and check if it redirects to the dashboard with filters and agent pinned
Click on the Vulnerability detection panel link and check if it redirects to the dashboard with the agent pinned
Check the entire agent's overview responsive layout
Change the pinned agent and check if the vulnerability detection panel data change

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

@Machi3mfl Machi3mfl linked an issue Oct 8, 2024 that may be closed by this pull request
4 tasks
@chantal-kelm chantal-kelm self-requested a review October 14, 2024 18:36
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

Wazuh Core plugin code coverage (Jest) test % values
Statements 45.5% ( 400 / 879 )
Branches 41.09% ( 157 / 382 )
Functions 43.87% ( 136 / 310 )
Lines 45.69% ( 398 / 871 )

Copy link
Contributor

Main plugin code coverage (Jest) test % values
Statements 14.09% ( 4176 / 29620 )
Branches 9.24% ( 1783 / 19278 )
Functions 13.77% ( 986 / 7157 )
Lines 14.28% ( 4073 / 28505 )

Copy link
Member

@chantal-kelm chantal-kelm left a comment

Choose a reason for hiding this comment

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

Test Chrome Firefox Safari
Click on Vulnerability KPIs and check if redirects to the dashboard with filters and agent pinned 🟢
Click on the Top Packages table link and check if it redirects to the dashboard with filters and agent pinned 🟢
Click on the Vulnerability detection panel link and check if it redirects to the dashboard with the agent pinned 🟢
Check the entire agent's overview responsive layout 🟢
Change the pinned agent and check if the vulnerability detection panel data change 🟢

Click on Vulnerability KPIs and check if redirects to the dashboard with filters and agent pinned

Grabacion.de.pantalla.2024-10-14.a.la.s.3.56.07.p.m.mov

Click on the Top Packages table link and check if it redirects to the dashboard with filters and agent pinned

Grabacion.de.pantalla.2024-10-14.a.la.s.3.58.32.p.m.mov

Click on the Vulnerability detection panel link and check if it redirects to the dashboard with the agent pinned

Grabacion.de.pantalla.2024-10-14.a.la.s.3.59.55.p.m.mov

Check the entire agent's overview responsive layout

Grabacion.de.pantalla.2024-10-14.a.la.s.4.03.03.p.m.mov

Change the pinned agent and check if the vulnerability detection panel data change

Grabacion.de.pantalla.2024-10-14.a.la.s.4.16.27.p.m.mov

Comment on lines +85 to +88
.then(() => setIsLoading(false))
.catch(error => {
setIsLoading(false);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.then(() => setIsLoading(false))
.catch(error => {
setIsLoading(false);
});
.catch(error => {})
.finally(() => setIsLoading(false));

@guidomodarelli
Copy link
Contributor

If you haven't set a dataSource, the result is undefined.

If you don't have the index or indexPattern, you should handle the error, as the result will be undefined.

image

@guidomodarelli
Copy link
Contributor

guidomodarelli commented Oct 16, 2024

If you have the indexPattern but not the index, the filters are not set.

Peek.2024-10-16.10-21.mp4

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.

Add vulnerabilities card to Agent details page
3 participants