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

Fix default filters per tab in vulnerabilities module #6188

Conversation

jbiset
Copy link
Member

@jbiset jbiset commented Dec 2, 2023

Description

This pull request solves the problem of maintaining filters between the Dashboard and Inventory tabs in the vulnerabilities module.
In the case of the Events tab, when the use_search_bar_configuration hook of the other tabs is unmounted, the applied filters that do not correspond to the wazuh-alerts index used by the Events tab are cleaned.

Issues Resolved

Evidence

Evidence.webm

Test

  • Navigate to Threat intelligence -> Vulnerability Detection
  • Add/remove filters between Dashboard and Inventory tab. Filters must be kept between these tabs.
  • Go to the Events tab and verify that the vulnerability filters have been removed. You should see the cluster.name and rule.groups filters.
  • When returning to the Dashboard or Inventory tab from Events tba, the filters will be empty.

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 requested a review from a team as a code owner December 2, 2023 16:39
@jbiset jbiset linked an issue Dec 2, 2023 that may be closed by this pull request
@jbiset jbiset self-assigned this Dec 2, 2023
Copy link
Contributor

github-actions bot commented Dec 2, 2023

Wazuh Core plugin code coverage (Jest) test % values
Statements 21.47% ( 186 / 866 )
Branches 18.07% ( 79 / 437 )
Functions 14.22% ( 36 / 253 )
Lines 21.7% ( 183 / 843 )

Copy link
Contributor

github-actions bot commented Dec 2, 2023

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

Copy link
Contributor

github-actions bot commented Dec 2, 2023

Main plugin code coverage (Jest) test % values
Statements 12.08% ( 4159 / 34423 )
Branches 8.17% ( 1889 / 23118 )
Functions 11.53% ( 943 / 8173 )
Lines 12.25% ( 4046 / 33014 )

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!!!

Evidence

image
image
image
image
image

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: ✔️

  • Filters are cleared when a view uses a different index-pattern ✔️
  • Pinned filters with the same index-pattern apply ✔️
  • Views with the same index-pattern apply the previously selected filters ✔️
  • rule.groups filter is applied by default in each module ✔️
Peek.2023-12-04.12-13.mp4

@asteriscos asteriscos merged commit b5be965 into 4.8.0 Dec 4, 2023
4 checks passed
@asteriscos asteriscos deleted the fix/6165-fix-default-filters-per-tab-in-vulnerabilities-module branch December 4, 2023 11:20
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.

Fix default filters per tab in Vulnerabilities module
3 participants