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

Replace common components vuls module #6235

Merged
merged 11 commits into from Dec 29, 2023

Conversation

Machi3mfl
Copy link
Member

@Machi3mfl Machi3mfl commented Dec 20, 2023

Description

This PR replaces and removes duplicated data grid, search bar, and doc viewer components/hooks.

Closes #6222

Tests

Preconditions
Add index wazuh-states-vulnerabilities with data following the comment

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

Dashboard tab

Test Chrome Firefox Safari
Check all the data is shown correctly (check all dashboard components are completed with data) in tops, metrics, table, etc)
Click on add filter and check if the filter is applied
Check dashboard table pagination works
Apply filters using the search bar input
Apply filters using the search bar add filter feature
Check dashboard responsive layout (mobile)
  • Check all the data is shown correctly (check all dashboard components are completed with data) in tops, metrics, table, etc)
Screen.Recording.2023-12-26.at.08.45.20.mov
  • Click on add filter and check if the filter is applied
Screen.Recording.2023-12-26.at.08.47.16.mov
  • Check dashboard table pagination works
Screen.Recording.2023-12-26.at.08.48.32.mov
  • Apply filters using the search bar input
Screen.Recording.2023-12-26.at.08.49.40.mov
  • Apply filters using the search bar add filter feature
Screen.Recording.2023-12-26.at.08.51.03.mov
  • Check dashboard responsive layout (vertical align in mobile)
Screen.Recording.2023-12-26.at.09.51.11.mov

Inventory tab

Test Chrome Firefox Safari
Check all inventory table header features (sort, show/hide columns, density, etc)
Check document detail flyout
Apply filters using search bar input
Apply filters using the search bar add filter feature
  • Check all inventory table header features (sort, show/hide columns, density, etc)

Screen Recording 2023-12-26 at 08.54.43

  • Check document detail flyout
Screen.Recording.2023-12-26.at.08.57.21.mov
  • Apply filters using search bar input
Screen.Recording.2023-12-26.at.08.57.59.mov
  • Apply filters using the search bar add filter feature
Screen.Recording.2023-12-26.at.08.59.11.mov

Global

Test Chrome Firefox Safari
Check filters persistence between tabs (inventory, dashboard)
Compare results between the inventory table and dashboard table
  • Check filters persistence between tabs (inventory, dashboard)
Screen.Recording.2023-12-26.at.09.52.01.mov
  • Compare results between the inventory table and dashboard table
Screen.Recording.2023-12-29.at.01.09.59.mov

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 requested a review from a team as a code owner December 20, 2023 12:05
@jbiset jbiset self-requested a review December 26, 2023 14:05
CHANGELOG.md Outdated Show resolved Hide resolved
@jbiset
Copy link
Member

jbiset commented Dec 26, 2023

🔴 There is an import resolution problem in the FIM module that has become outdated with the changes in this PR

image

Copy link
Member

@jbiset jbiset left a comment

Choose a reason for hiding this comment

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

Note

I use the script on scripts/vulnerabilities-events-injector/dataInjectScript.py to insert vulnerability index and data index.
I use 2.11 OSD to test.

CR: 🟡 (Check comments)

Test 🟢

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

Dashboard tab

Test Chrome Firefox Safari
Check all the data is shown correctly (check all dashboard components are completed with data) in tops, metrics, table, etc) 🟢
Click on add filter and check if the filter is applied 🟢
Check dashboard table pagination works 🟢
Apply filters using the search bar input 🟢
Apply filters using the search bar add filter feature 🟢
Check dashboard responsive layout (mobile) 🟢
  • Check all the data is shown correctly (check all dashboard components are completed with data) in tops, metrics, table, etc) 🟢
Evidence_1.webm
  • Click on add filter and check if the filter is applied 🟢
Evidence_2.webm
  • Check dashboard table pagination works 🟢
Evidence_3.webm
  • Apply filters using the search bar input 🟢
Evidence_4.webm
  • Apply filters using the search bar add filter feature 🟢
Evidence_5.webm
  • Check dashboard responsive layout (vertical align in mobile) 🟢
Evidence_6.webm

Inventory tab

Test Chrome Firefox Safari
Check all inventory table header features (sort, show/hide columns, density, etc) 🟢
Check document detail flyout 🟢
Apply filters using search bar input 🟢
Apply filters using the search bar add filter feature 🟢
  • Check all inventory table header features (sort, show/hide columns, density, etc) 🟢
Evidence_7.webm
  • Check document detail flyout 🟢
Evidence_8.webm
  • Apply filters using search bar input 🟢
Evidence_9.webm
  • Apply filters using the search bar add filter feature 🟢
Evidence_10.webm

Global

Test Chrome Firefox Safari
Check filters persistence between tabs (inventory, dashboard) 🟢
  • Check filters persistence between tabs (inventory, dashboard) 🟢
Evidence_11.webm

@lucianogorza lucianogorza self-requested a review December 27, 2023 14:24
@lucianogorza
Copy link
Member

lucianogorza commented Dec 27, 2023

Tests

Dashboard tab

Test Chrome Firefox Safari
Check all the data is shown correctly (check all dashboard components are completed with data) in tops, metrics, table, etc) 🟢
Click on add filter and check if the filter is applied 🟢
Check dashboard table pagination works 🟢
Apply filters using the search bar input 🟢
Apply filters using the search bar add filter feature 🟢
Check dashboard responsive layout (mobile) 🟢
  • Check all the data is shown correctly (check all dashboard components are completed with data) in tops, metrics, table, etc) 🟢
Evidence_1.webm
  • Click on add filter and check if the filter is applied 🟢
Evidence_2.webm
  • Check dashboard table pagination works 🟢
Evidence_3.webm
  • Apply filters using the search bar input 🟢

image

  • Apply filters using the search bar add filter feature 🟢
Evidence_4.webm
  • Check dashboard responsive layout (vertical align in mobile) 🟢
Evidence_6.webm

Inventory tab

Test Chrome Firefox Safari
Check all inventory table header features (sort, show/hide columns, density, etc) 🟡
Check document detail flyout 🟡
Apply filters using search bar input 🟢
Apply filters using the search bar add filter feature 🟢
  • Check all inventory table header features (sort, show/hide columns, density, etc) 🟡

Sort 🟢

image

Show/hide🟢

image
image

Hide all and export 🟡

When hide all columns and press Export formated button nothing happened. Maybe we could show a message.
image
image

Export formated button 🟡

Should be Export formatted

Density 🟢

image
image

  • Check document detail flyout 🟡

The information is correct. I suggest giving more space to make reading more comfortable. Some letters are cut (like the "g" in the screenshot).
image

  • Apply filters using search bar input 🟢

image

  • Apply filters using the search bar add filter feature 🟢

image

Global

Test Chrome Firefox Safari
Check filters persistence between tabs (inventory, dashboard) 🟢
  • Check filters persistence between tabs (inventory, dashboard) 🟢

image

image

Copy link
Member

@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.

LGMT

Look the suggestions in this comment

@Machi3mfl
Copy link
Member Author

Machi3mfl commented Dec 29, 2023

Thanks, @lucianogorza for your suggestions.
I'd decide to apply them.

Hide all and export

When hide all columns and press Export formated button nothing happened. Maybe we could show a message.

Now, The export button is disable when all the columns table are hidden

Screenshot 2023-12-29 at 01 13 58

Check document detail flyout

The information is correct. I suggest giving more space to make reading more comfortable. Some letters are cut (like the "g" in the screenshot).

After checking the code, I found a CSS class that cut off the letters in every row. Then i removed it and the letters are shown correctly.

Screenshot 2023-12-29 at 01 26 43

Copy link
Contributor

Wazuh Core plugin code coverage (Jest) test % values
Statements 22.02% ( 176 / 799 )
Branches 19.55% ( 79 / 404 )
Functions 14.63% ( 36 / 246 )
Lines 22.23% ( 173 / 778 )

Copy link
Contributor

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.33% ( 171 / 224 )
Branches 57.57% ( 57 / 99 )
Functions 61.7% ( 29 / 47 )
Lines 76.33% ( 171 / 224 )

Copy link
Contributor

Main plugin code coverage (Jest) test % values
Statements 11.3% ( 3880 / 34317 )
Branches 7.5% ( 1704 / 22696 )
Functions 10.88% ( 893 / 8203 )
Lines 11.48% ( 3771 / 32846 )

@Machi3mfl Machi3mfl merged commit d7ba9d3 into master Dec 29, 2023
4 checks passed
@Machi3mfl Machi3mfl deleted the feat/6222-replace-common-components-vuls-module branch December 29, 2023 17:38
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] Replace discover children components in vulnerabilities modules tab
3 participants