-
Notifications
You must be signed in to change notification settings - Fork 187
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
Fixed Inventory checks table filters by stats #4999
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review
Tests
Legend:
🟢 Pass
🟡 Warning
🔴 Fail
Results:
Scenario | Result |
---|---|
1 | 🟢 |
2 | 🟢 |
3 | 🔴 |
Details:
Scenario 3 - 🔴
I found a problem by clicking on the Not applicable
result count indicator, the table doesn't display any results.
I reviewed the request done when adding this filter and it uses the result
query paramater with not applicable
value. This value is not the correct one to get the expected checks.
If we review the value for any check that the UI displays as Not applicable
, we see this is an empty string.
So, we expected if we change the value of the result
query parameter to an empty string, we could get the expected results. By my tests, it is not working, so I guess the Wazuh API could not be expecting this case. We should consult it with the @wazuh/framework team.
In previous versions (ex: 4.3.10), this worked correctly and this was because in that version, all the checks are obtained and the filter are managed in the frontend.
We had a meeting with @davidjiglesias and maybe we could get a workaround: For another hand, we could remove the empty string as a possible value of We should review the suggestions for |
Fixed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: ✅
Test: ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.4-7.16 4.4-7.16
# Navigate to the new working tree
cd .worktrees/backport-4.4-7.16
# Create a new branch
git switch --create backport-4999-to-4.4-7.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6e8c94263c5faeb0d02b2b38786d4026b20fb137
# Push it to GitHub
git push --set-upstream origin backport-4999-to-4.4-7.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-7.16 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.4-2.4-wzd 4.4-2.4-wzd
# Navigate to the new working tree
cd .worktrees/backport-4.4-2.4-wzd
# Create a new branch
git switch --create backport-4999-to-4.4-2.4-wzd
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6e8c94263c5faeb0d02b2b38786d4026b20fb137
# Push it to GitHub
git push --set-upstream origin backport-4999-to-4.4-2.4-wzd
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-2.4-wzd Then, create a pull request where the |
* Fixed checks table filters by stats * Updated CHANGELOG * Fixed no applicable filter (cherry picked from commit 6e8c942)
* Fixed checks table filters by stats * Updated CHANGELOG * Fixed no applicable filter (cherry picked from commit 6e8c942)
* Fixed checks table filters by stats * Updated CHANGELOG * Fixed no applicable filter (cherry picked from commit 6e8c942)
) (#5004) Fixed Inventory checks table filters by stats (#4999) * Fixed checks table filters by stats * Updated CHANGELOG * Fixed no applicable filter (cherry picked from commit 6e8c942) Co-authored-by: Maximiliano Ibarra <[email protected]>
…4999) (#5005) Fixed Inventory checks table filters by stats (#4999) * Fixed checks table filters by stats * Updated CHANGELOG * Fixed no applicable filter (cherry picked from commit 6e8c942) Co-authored-by: Maximiliano Ibarra <[email protected]>
Description
Hi Team, This PR fixes the behavior when the Inventory Stat is clicked.
Closes #4952
Test case
Peek.2022-12-14.13-36.mp4
Tests
Scenario The user can add a filter by clicking on the result count indicator (Pass) of the Security configuration assessment
policy checks
Given SCA data is available
When the user is seeing the table of checks of a Security configuration assessment
policy
And the user clicks on any result count indicator
Then a filter must be added to the search bar
And the table should be filtered by the added filter
Scenario The user can add a filter by clicking on the result count indicator (Fail) of the Security configuration assessment
policy checks
Given SCA data is available
When the user is seeing the table of checks of a Security configuration assessment
policy
And the user clicks on any result count indicator
Then a filter must be added to the search bar
And the table should be filtered by the added filter
Scenario The user can add a filter by clicking on the result count indicator (Not applicable) of the Security configuration assessment
policy checks
Given SCA data is available
When the user is seeing the table of checks of a Security configuration assessment
policy
And the user clicks on any result count indicator
Then a filter must be added to the search bar
And the table should be filtered by the added filter
Check List
yarn test:jest