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 wrong cleaned filters when browser back button is triggered #6771

Merged
merged 122 commits into from
Jul 1, 2024

Conversation

Machi3mfl
Copy link
Member

@Machi3mfl Machi3mfl commented Jun 13, 2024

Description

This PR, solves #6762

Evidence

Before

Screen.Recording.2024-06-11.at.14.40.31.mov

After

Screen.Recording.2024-06-14.at.10.35.23.mov

Test

Navigate to the module, switch between tabs and use the browser back button, the fixed filters must not disappear

Screen.Recording.2024-06-14.at.10.48.55.mov

Check flyout discover from inventory or control tab (MITRE ATT&CK and all Security Operations Menu Options - PCI, GPDR, etc)

  • Use the filters and check the request filters, must have the filters from the main search bar, hidden filters, and user filters
Screen.Recording.2024-06-14.at.10.38.47.mov

Check the dashboard and discover (Events tab)

  • Use the filters, pin, and unpin agent and check the request filters, must have the fixed filters, user filters and hidden filters

Dashboard

Screen.Recording.2024-06-14.at.10.52.29.mov

Events

Screen.Recording.2024-06-14.at.10.54.27.mov

Check the Github and Office365 Panel tab

  • Check the request filters to and pin/unpin agent
Screen.Recording.2024-06-14.at.11.10.11.mov
  • Check the filters when a row panel is clicked
Screen.Recording.2024-06-18.at.07.56.07.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

Desvelao and others added 30 commits May 20, 2024 14:52
- Create basic router
- Remove initilization of AngularJS app
- Replace AngularJS injector usage by ReactJS
- Create route resolvers
  - ip
  - wzConfig
- Adapt components to the usage of route resolvers
- Fix an error related to circular dependency
- Port route resolvers
  - getSavedSearch
  - nestedResolve
  - savedSearch
- WzAgentSelectorWrapper
- ToastNotificationsModal
- WzUpdatesNotification
- useRootScope hook
- withModuleTabLoader HOC
- Dashboard component
- Remove AngularJS services:
  - DiscoverPendingUpdates
  - LoadedVisualizations
  - RawVisualizations
  - VisHandlers
- Remove components:
  - KibanaVis
  - ClusterTimelions
  - KibanaVisWrapper
  - Metrics
  - WzVisualize
  - WzFilterBar
- Remove components
  - SecurityAlerts
- Redux actions and reducers related to deprecated visualizations
- AngularJS services
  - DataFactory
  - region-maps
  - theming
  - VisFactoryService
- AngularJS filter: orderObjectBy
…erabilities > Inventory based on server API data
- Remove ModulesHelper service
- Remove hook: useRefreshAngularDiscover
@Desvelao
Copy link
Member

Desvelao commented Jun 20, 2024

Test

🟢 Navigate to the module, switch between tabs and use the browser back button, the fixed filters must not disappear
image

🟢 Check flyout discover from inventory or control tab (MITRE ATT&CK and all Security Operations Menu Options - PCI, GPDR, etc)
Duplicated filter related to allowed agents:
image
image
image

🟢 Check the dashboard and discover (Events tab)
image

🔴 Check the Github and Office365 Panel tab
🔴 The filter related to the selection should appear on the selector
image
See 4.8.0 for compare
image

image
image
image

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.

Missed Changelog

@Machi3mfl
Copy link
Member Author

Fixed bug mentioned by @Desvelao in commit 2e139c0

Screen.Recording.2024-06-24.at.13.38.53.mov

@Machi3mfl
Copy link
Member Author

Missed Changelog

Fixed in 03cb3e1

@chantal-kelm chantal-kelm self-requested a review June 25, 2024 09:31
@chantal-kelm
Copy link
Member

chantal-kelm commented Jun 25, 2024

Test

🟢 Navigate to the module, switch between tabs and use the browser back button, the fixed filters must not disappear

Grabacion.de.pantalla.2024-06-25.a.la.s.6.38.36.a.m.mov

🟢 Check flyout discover from inventory or control tab (MITRE ATT&CK and all Security Operations Menu Options - PCI, GPDR, etc)

  • Use the filters and check the request filters, must have the filters from the main search bar, hidden filters, and user filters
Grabacion.de.pantalla.2024-06-25.a.la.s.6.50.21.a.m.mov

🟢 Check the dashboard and discover (Events tab)

  • Use the filters, pin, and unpin agent and check the request filters, must have the fixed filters, user filters and hidden filters

Dashboard

Grabacion.de.pantalla.2024-06-25.a.la.s.6.58.43.a.m.mov

Events

Grabacion.de.pantalla.2024-06-25.a.la.s.7.51.46.a.m.mov

🟢 Check the Github and Office365 Panel tab

  • Check the request filters to and pin/unpin agent
Grabacion.de.pantalla.2024-06-25.a.la.s.8.14.15.a.m.mov
  • Check the filters when a row panel is clicked
Grabacion.de.pantalla.2024-06-25.a.la.s.8.29.21.a.m.mov

@Desvelao
Copy link
Member

chantal-kelm
chantal-kelm previously approved these changes Jun 25, 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: ✅

JuanGarriuz
JuanGarriuz previously approved these changes Jun 26, 2024
@Machi3mfl Machi3mfl dismissed stale reviews from JuanGarriuz and chantal-kelm via 7f29967 June 26, 2024 11:24
Copy link
Contributor

Wazuh Core plugin code coverage (Jest) test % values
Statements 45.96% ( 399 / 868 )
Branches 41.97% ( 157 / 374 )
Functions 44.01% ( 136 / 309 )
Lines 46.16% ( 397 / 860 )

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 13.64% ( 3989 / 29228 )
Branches 9.1% ( 1744 / 19149 )
Functions 13.35% ( 943 / 7062 )
Lines 13.83% ( 3886 / 28090 )

Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

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

LGTM!

@lucianogorza lucianogorza merged commit f46916b into 4.9.0 Jul 1, 2024
4 checks passed
@lucianogorza lucianogorza deleted the fix/6762-wrong-cleaned-filters branch July 1, 2024 12:19
@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.

Wrong cleaned filter when browser back button is triggered
7 participants