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

Added query results limit when the search exceed 10000 hits #6106

Merged
merged 8 commits into from
Nov 8, 2023

Conversation

Machi3mfl
Copy link
Member

@Machi3mfl Machi3mfl commented Nov 8, 2023

Description

This PR, adds a callout showing a warning message when the inventory table exceeds the 10000 hits.

Closes #6097

Added hits count and warning tooltip

Screenshot 2023-11-08 at 11 50 21

Screen.Recording.2023-11-08.at.11.50.39.mov

CSV export limited to 10000 rows

Screenshot 2023-11-08 at 12 13 50

Testing

To test the solution it's necessary to create the wazuh-states-vulnerabilities index and inject docs:
#5763 (comment)

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 Machi3mfl requested a review from a team as a code owner November 8, 2023 03:49
@Machi3mfl Machi3mfl changed the base branch from master to 4.8.0 November 8, 2023 12:07
@lucianogorza lucianogorza self-requested a review November 8, 2023 15:04
@Machi3mfl Machi3mfl changed the title Added warnings when the search exceed 10000 hits Added query results limit when the search exceed 10000 hits Nov 8, 2023
Copy link
Contributor

@lucianogorza lucianogorza left a comment

Choose a reason for hiding this comment

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

All hits 🟢

all_hits

Export CSV 🔴

image

Only export the last request (1000 hits in this case)

image

Filtered hits 🟢

filtered_hits

Export CSV 🔴

Only export the last request (405 hits in this case)

image

@lucianogorza
Copy link
Contributor

Filtered hits

Export CSV 🟢

image

image

LGTM

Copy link
Contributor

github-actions bot commented Nov 8, 2023

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.95% ( 167 / 217 )
Branches 53.53% ( 53 / 99 )
Functions 60.86% ( 28 / 46 )
Lines 76.95% ( 167 / 217 )

@jbiset jbiset self-requested a review November 8, 2023 17:41
@lucianogorza
Copy link
Contributor

CR 🟢

Test 🟢

Copy link
Contributor

github-actions bot commented Nov 8, 2023

Main plugin code coverage (Jest) test % values
Statements 11.96% ( 4111 / 34371 )
Branches 8.16% ( 1888 / 23137 )
Functions 11.25% ( 920 / 8174 )
Lines 12.12% ( 3996 / 32957 )

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 🟢

All Hits 🟢

all_hits

Filtered Hits 🟢

filtered_hits

Export All Hits 🟢

export_all_hits

Export Filtered Hits 🟢

export_filtered_hits_1235

@Machi3mfl Machi3mfl merged commit 059c2bd into 4.8.0 Nov 8, 2023
3 checks passed
@Machi3mfl Machi3mfl deleted the fix/6097-search-exceed-10000-hits branch November 8, 2023 20:19
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.

[Vulnerabilities dashboards] Search error when results exceed 10000 elements
3 participants