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

Fixes redirects to specific techniques #6882

Conversation

yenienserrano
Copy link
Member

@yenienserrano yenienserrano commented Jul 29, 2024

Description

Fixes the back button when navigating to a specific rule.mitre.id from events

The view is controlled by the parameters of the url to have more control of the back button.

Changed 2 pie charts to donut charts for application consistency.

Issues Resolved

Evidence

Uploading Screen Recording 2024-07-30 at 4.50.25 PM.mov…

Test

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

UI

Test Chrome Firefox Safari
Navigate from Mitre > Events selecting data from the rule.mitre.id column, once in the flyout you should be able to press the back button and it should work.
navigate between the different tabs of Mitre > intelligence you must change the tabRedirect url parameter
When navigating in Mitre > intelligence view the back button should work.
If the rabRedirect parameter is not present when rendering the view, the parameter must be added.

Details

⚫ Navigate from Mitre > Events selecting data from the rule.mitre.id column, once in the flyout you should be able to press the back button and it should work.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ navigate between the different tabs of Mitre > intelligence you must change the tabRedirect url parameter

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ When navigating in Mitre > intelligence view the back button should work.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ If the rabRedirect parameter is not present when rendering the view, the parameter must be added.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

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

@yenienserrano yenienserrano marked this pull request as draft July 30, 2024 11:40
@yenienserrano yenienserrano marked this pull request as ready for review July 30, 2024 15:22
@chantal-kelm chantal-kelm self-requested a review July 30, 2024 17:00
chantal-kelm
chantal-kelm previously approved these changes Jul 30, 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.

Grabacion.de.pantalla.2024-07-30.a.la.s.1.57.41.p.m.mov
Grabacion.de.pantalla.2024-07-30.a.la.s.1.59.44.p.m.mov

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.

CR: 🟡

Test UI: 🟡

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

UI

Test Chrome Firefox Safari
Navigate from Mitre > Events selecting data from the rule.mitre.id column, once in the flyout you should be able to press the back button and it should work. 🟢 🟢
navigate between the different tabs of Mitre > intelligence you must change the tabRedirect url parameter 🟢 🟢
When navigating in Mitre > intelligence view the back button should work. 🟢 🟢
If the rabRedirect parameter is not present when rendering the view, the parameter must be added. 🟡

Details

🟢 Navigate from Mitre > Events selecting data from the rule.mitre.id column, once in the flyout you should be able to press the back button and it should work.

Chrome - 🟢

Evidence_1_Chrome.webm

Firefox - 🟢

Evidence_1_Firefox.webm

Safari - ⚫

🟢 navigate between the different tabs of Mitre > intelligence you must change the tabRedirect url parameter

Chrome - 🟢

Evidence_2_Chrome.webm

Firefox - 🟢

Evidence_2_Firefox.webm

Safari - ⚫

🟢 When navigating in Mitre > intelligence view the back button should work.

Chrome - 🟢

Evidence_3_Chrome.webm

Firefox - 🟢

Evidence_3_Firefox.webm

Safari - ⚫

🟡 If the tabRedirect parameter is not present when rendering the view, the parameter must be added.

NOTE: Since the effect in charge of adding tabRedirect if it is not alone is executed on the first render. If the URL is changed after the component has already been rendered, the effect does not run.

Chrome - 🟡

Evidence_tabRedirect_yellow.webm

Firefox - ⚫ :

Safari - ⚫

@Desvelao
Copy link
Member

Desvelao commented Jul 31, 2024

Using the search bar on the left panel, the tabRedirect parameter is not modified
image

Another use case:

  1. Select a resource type from the left menu (groups, mitigations, etc...)
  2. Use the search bar and ensure the search is done
  3. Select a resource type from the left menu (groups, mitigations, etc...)
  4. Clicking again on the selected resource, causes the view with the current search is displayed.

Navigating from the Intelligence tab to another tab on the the MITRE ATT&CK module does not remove the tabRedirect query parameter on the URL.

These behaviors should be synced with the URL.

…igating-from-events-to-a-specific-rulemitreid
@yenienserrano
Copy link
Member Author

Using the search bar on the left panel, the tabRedirect parameter is not modified image

Another use case:

  1. Select a resource type from the left menu (groups, mitigations, etc...)
  2. Use the search bar and ensure the search is done
  3. Select a resource type from the left menu (groups, mitigations, etc...)
  4. Clicking again on the selected resource, causes the view with the current search is displayed.

Navigating from the Intelligence tab to another tab on the the MITRE ATT&CK module does not remove the tabRedirect query parameter on the URL.

These behaviors should be synced with the URL.

Currently this is the behavior that the application is having in other views, and due to lack of time it cannot be modified in this edition either.

yenienserrano and others added 2 commits July 31, 2024 16:15
…igating-from-events-to-a-specific-rulemitreid
…igating-from-events-to-a-specific-rulemitreid
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.68% ( 4003 / 29260 )
Branches 9.12% ( 1747 / 19137 )
Functions 13.37% ( 945 / 7067 )
Lines 13.86% ( 3900 / 28126 )

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.

UI

Test Chrome Firefox Safari
Navigate from Mitre > Events selecting data from the rule.mitre.id column, once in the flyout you should be able to press the back button and it should work. 🟢
navigate between the different tabs of Mitre > intelligence you must change the tabRedirect url parameter 🟢
When navigating in Mitre > intelligence view the back button should work. 🟢
If the rabRedirect parameter is not present when rendering the view, the parameter must be added. 🟢

Details

🟢 Navigate from Mitre > Events selecting data from the rule.mitre.id column, once in the flyout you should be able to press the back button and it should work.

Chrome - 🟢

Screen.Recording.2024-07-31.at.13.35.17.mov

Firefox - ⚫

Safari - ⚫

🟢 navigate between the different tabs of Mitre > intelligence you must change the tabRedirect url parameter

Chrome - 🟢

Screen.Recording.2024-07-31.at.13.36.27.mov

Firefox - ⚫

Safari - ⚫

🟢 When navigating in Mitre > intelligence view the back button should work.

Chrome - 🟢

Screen.Recording.2024-07-31.at.13.37.27.mov

Firefox - ⚫

Safari - ⚫

🟢 If the rabRedirect parameter is not present when rendering the view, the parameter must be added.

Chrome - 🟢

Screen.Recording.2024-07-31.at.13.40.29.mov

Firefox - ⚫

Safari - ⚫

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.

CR: 🟢

Test UI: 🟢

🟢 If the rabRedirect parameter is not present when rendering the view, the parameter must be added.

Chrome - 🟢

Evidence_change_URL_Chrome.webm

Firefox - 🟢

Evidence_change_URL_Firefox.webm

Safari - ⚫

🟢 Changed 2 pie charts to donut charts for application consistency.

Chrome - 🟢

image

Firefox - 🟢

image

Safari - ⚫

@lucianogorza lucianogorza merged commit ede74fd into 4.9.0 Jul 31, 2024
5 checks passed
@lucianogorza lucianogorza deleted the bug/6881-back-buttom-does-not-work-when-navigating-from-events-to-a-specific-rulemitreid branch July 31, 2024 17:05
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.

Back button does not work when navigating from events to a specific rule.mitre.id
7 participants