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 visualization of vulnerabilities evaluation status count #6968

Merged
merged 17 commits into from
Sep 27, 2024

Conversation

Desvelao
Copy link
Member

@Desvelao Desvelao commented Sep 5, 2024

Description

This pull request adds a visualization to the Vulnerabilities Detection > Dashboard related to evaluation status count.

Side changes

  • Fix a rendering problem in the WzDataGrid component that was not using the field formatter

Issues Resolved

#6957

Evidenc

Screen.Recording.2024-09-26.at.12.53.15.PM.mov

Test

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

UI

Test Chrome Firefox Safari
Use the under_evaluation quick filter and check if the data react (toggle the filter)
Apply the under_evaluation quick filter and switch between Dashboard and Inventory tab, the filter must be preserved
Apply the under_evaluation quick filter and switch between Dashboard and Inventory tab, refresh the browser and check if the filter persists
Add the under_evaluation filter and check if the quick filter state changes

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 Sep 5, 2024
@Desvelao Desvelao linked an issue Sep 5, 2024 that may be closed by this pull request
2 tasks
@yenienserrano yenienserrano self-requested a review September 5, 2024 12:21
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.

CR: 🟢
Test: Perhaps color can be added as we have had issues with color when they were black. #6856

image

@guidomodarelli
Copy link
Contributor

🟢 Test
🟢 CR

image

@guidomodarelli guidomodarelli self-requested a review September 5, 2024 13:42
guidomodarelli
guidomodarelli previously approved these changes Sep 5, 2024
@Desvelao
Copy link
Member Author

Desvelao commented Sep 5, 2024

CR: 🟢 Test: Perhaps color can be added as we have had issues with color when they were black. #6856

image

I was reviewing the topic with the label colors. There are no more options available in the visualization creator and taking into account the colors for the labes on the indicators of the Vulnerabilities Detection > Dashboard, I think to differenciate the indicators, we could keep the dark grey (light mode) displayed in the screenshots.

In the case we want to change the color, this could be done using styles, but the visualization definition does not offer more options:
image

Machi3mfl
Machi3mfl previously approved these changes Sep 5, 2024
Copy link
Member

@Machi3mfl Machi3mfl 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: ✅

Screenshot 2024-09-05 at 12 43 24

@asteriscos asteriscos dismissed stale reviews from guidomodarelli and Machi3mfl via df9500e September 17, 2024 18:17
JuanGarriuz
JuanGarriuz previously approved these changes Sep 18, 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!!!

Test

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

UI

Test Chrome Firefox Safari
With vulnerabilities states data, go to Vulnerabilities Detection > Dashboard, and it should display a visulization releated to evaluation status 🟢
With vulnerabilities states data, go to Vulnerabilities Detection > Inventory, and add the wazuh.vulnerability.under_evaluation field to the table and this should display the values in the table cells 🟢

Details

🟢 With vulnerabilities states data, go to Vulnerabilities Detection > Dashboard, and it should display a visulization releated to evaluation status

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 With vulnerabilities states data, go to Vulnerabilities Detection > Inventory, and add the `wazuh.vulnerability.under_evaluation` field to the table and this should display the values in the table cells

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

@chantal-kelm chantal-kelm self-requested a review September 18, 2024 15:19
chantal-kelm
chantal-kelm previously approved these changes Sep 18, 2024
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.

LGTM!!!

Test

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

UI

Test Chrome Firefox Safari
With vulnerabilities states data, go to Vulnerabilities Detection > Dashboard, and it should display a visulization releated to evaluation status 🟢
With vulnerabilities states data, go to Vulnerabilities Detection > Inventory, and add the wazuh.vulnerability.under_evaluation field to the table and this should display the values in the table cells 🟢

Details

🟢 With vulnerabilities states data, go to Vulnerabilities Detection > Dashboard, and it should display a visulization releated to evaluation status

Chrome - 🟢

Captura de pantalla 2024-09-18 a la(s) 12 16 28 p  m

Firefox - ⚫

Safari - ⚫

🟢 With vulnerabilities states data, go to Vulnerabilities Detection > Inventory, and add the `wazuh.vulnerability.under_evaluation` field to the table and this should display the values in the table cells

Chrome - 🟢

Captura de pantalla 2024-09-18 a la(s) 12 19 24 p  m

Firefox - ⚫

Safari - ⚫

@Machi3mfl Machi3mfl dismissed stale reviews from chantal-kelm and JuanGarriuz via 9f95f0c September 26, 2024 15:01
asteriscos
asteriscos previously approved these changes Sep 26, 2024
Copy link
Member

@asteriscos asteriscos 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: 🟢

Peek.2024-09-26.18-26.mp4

chantal-kelm
chantal-kelm previously approved these changes Sep 26, 2024
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.

CR: ✅
TEST: ✅

Grabacion.de.pantalla.2024-09-26.a.la.s.4.45.47.p.m.mov

@chantal-kelm chantal-kelm self-requested a review September 26, 2024 20:02
chantal-kelm
chantal-kelm previously approved these changes Sep 26, 2024
@guidomodarelli
Copy link
Contributor

guidomodarelli commented Sep 26, 2024

Test 🔴
image

Fix the border button

@Machi3mfl
Copy link
Member

Test 🔴 image

Fix the border button

Fixed in commit 0eb91a6

Screenshot 2024-09-26 at 5 20 57 PM Screenshot 2024-09-26 at 5 19 54 PM

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

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 14.09% ( 4175 / 29626 )
Branches 9.18% ( 1771 / 19290 )
Functions 13.75% ( 985 / 7161 )
Lines 14.28% ( 4073 / 28513 )

@asteriscos asteriscos merged commit 930e5d5 into 4.10.0 Sep 27, 2024
5 checks passed
@asteriscos asteriscos deleted the enhancement/6957-vulnerabilies-under-evaluation branch September 27, 2024 09:19
guidomodarelli pushed a commit that referenced this pull request Sep 27, 2024
* chore: rename use-data-grid.ts file

* fix: use the field formatter to render the fields in the WzDataGrid

* feat: add the wazuh.vulnerability.under_evaluation field to the vulnerabilities sample data tool

* feat(vulnerabilities): add visualization related to evaluation status to the dashboard

* changelog: add entry

* fix(changelog): rephrase

* Change visualization to only pending

* Add post fixed filter place to render components

* Add under evaluation filter component

* Apply under evaluation filter in vuls tabs

* Add style to button group in filter

* Apply prettier

* Apply prettier

* Fix style in dark and light theme

* Added changelog

---------

Co-authored-by: Chantal Belén kelm <99441266+chantal-kelm@users.noreply.github.com>
Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Co-authored-by: Maximiliano Ibarra <maximiliano.ibarra@wazuh.com>
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.

User interface toggle for vulnerability evaluation status
7 participants