wazuh-dashboard-plugins icon indicating copy to clipboard operation
wazuh-dashboard-plugins copied to clipboard

Handle index pattern selector on discover

Open Machi3mfl opened this issue 1 year ago • 3 comments

Description

This PR, adds the feature to the discover component to use the index pattern selected in the index pattern selector positioned on the header.

Closes #6434

Test

in progress

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 avatar Feb 21 '24 18:02 Machi3mfl

Test Chrome Firefox Safari
Check the index pattern list in the select :black_circle: :black_circle: :green_circle:
Check the index pattern selected by default in the select match with the stored in browser cookies :black_circle: :black_circle: :green_circle:
Change index pattern and check if was stored in browser cookies :black_circle: :black_circle: :green_circle:
Check toast error when is selected an index pattern without indices (wazuh-custom-* index) :black_circle: :black_circle: :green_circle:

:green_circle: Check the index pattern list in the select image image
:green_circle: Check the index pattern selected by default in the select match with the stored in browser cookies image
:green_circle: Change index pattern using the select and check if is stored in browser cookies

When the current tab is not the dashboard tab, the app reloads the window

image image
:green_circle: Check toast error when is selected an index pattern without indices (wazuh-custom-* index)

The cookie must not change and preserve the previous index

image

yenienserrano avatar Mar 15 '24 17:03 yenienserrano

When you have more than one index pattern and you refresh the page, the selector does not appear until you navigate to another application.

https://github.com/wazuh/wazuh-dashboard-plugins/assets/63758389/0cbdf572-a238-42d0-83a0-ed3fb18441c9

yenienserrano avatar Mar 15 '24 18:03 yenienserrano

Wazuh Core plugin code coverage (Jest) test % values
Statements 28.94% ( 286 / 988 )
Branches 26.22% ( 107 / 408 )
Functions 26.87% ( 86 / 320 )
Lines 28.68% ( 278 / 969 )

github-actions[bot] avatar Mar 19 '24 20:03 github-actions[bot]

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 )

github-actions[bot] avatar Mar 19 '24 20:03 github-actions[bot]

Main plugin code coverage (Jest) test % values
Statements 12.07% ( 4200 / 34783 )
Branches 7.73% ( 1760 / 22746 )
Functions 10.72% ( 885 / 8255 )
Lines 12.26% ( 4090 / 33342 )

github-actions[bot] avatar Mar 19 '24 20:03 github-actions[bot]

CR 🟢

Test 🟢

Test Chrome Firefox Safari
Check the index pattern list in the select 🟢 :black_circle: :black_circle:
Check the index pattern selected by default in the select match with the stored in browser cookies 🟢 :black_circle: :black_circle:
Change index pattern and check if was stored in browser cookies 🟢 :black_circle: :black_circle:
Check toast error when is selected an index pattern without indices (wazuh-custom-* index) 🟢 :black_circle: :black_circle:
Check the index pattern list in the select

Compare the index patterns shown in the select with the index pattern on the Dashboard Management (only must appear the alerts indexes, exclude monitoring, statistics and vulnerabilities)

image image

Check the index pattern selected by default in the select match with the stored in browser cookies

image

Change index pattern using the select and check if is stored in browser cookies

change-index-pattern.webm

Check toast error when is selected an index pattern without indices (wazuh-custom-* index)

The cookie must not change and preserve the previous index

change-index-pattern-error.webm

lucianogorza avatar Mar 19 '24 20:03 lucianogorza