wazuh-dashboard-plugins
wazuh-dashboard-plugins copied to clipboard
Handle index pattern selector on discover
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
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
:green_circle: Check the index pattern selected by default in the select match with the stored in browser cookies
: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
: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
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
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 ) |
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 ) |
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 ) |
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)
Check the index pattern selected by default in the select match with the stored in browser cookies
Change index pattern using the select and check if is stored in browser cookies
Check toast error when is selected an index pattern without indices (wazuh-custom-* index)
The cookie must not change and preserve the previous index