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

[Security Solution][Bug fix] alerts table over 10k results #145441

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

christineweng
Copy link
Contributor

@christineweng christineweng commented Nov 16, 2022

This PR aims to address:

Background

On Alerts page -> Events table -> Event Rendered view, when there are over 10,000 alerts, upon clicking the last page, a warning message appears.

image

The pop up is expected behavior according to documentation from: https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html .

By default, you cannot use from and size to page through more than 10,000 hits. This limit is a safeguard set by the index.max_result_window index setting.

After

Currently the Grid view has a safeguard in place, where if there are more than 10k results, it will not show the last page, hence preventing user from clicking it and seeing the error pop up.

  • This PR applies the same approach by wrapping the EventRenderView component with the EuiDataGridContainer.
  • This PR also renamed EuiDataGridContainer to EuiEventTableContainer to indicate broader use.

When there are over 10k records, last page is not available in pagination, and it is the same in Event Rendered View as in Grid view:

Screen.Recording.2022-11-16.at.1.09.47.PM.mov

@christineweng christineweng added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes v6.8.6 Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team labels Nov 16, 2022
@christineweng christineweng self-assigned this Nov 16, 2022
@christineweng christineweng marked this pull request as ready for review November 16, 2022 20:31
@christineweng christineweng requested a review from a team as a code owner November 16, 2022 20:31
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@christineweng christineweng enabled auto-merge (squash) November 16, 2022 20:39
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
timelines 74.7KB 74.8KB +47.0B
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 108 113 +5
securitySolution 441 447 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 67 73 +6
osquery 109 115 +6
securitySolution 518 524 +6
total +20

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @christineweng

@@ -140,7 +140,7 @@ const EmptyHeaderCellRender: ComponentType = () => null;

const gridStyle: EuiDataGridStyle = { border: 'none', fontSize: 's', header: 'underline' };

const EuiDataGridContainer = styled.div<{ hideLastPage: boolean }>`
const EuiEventTableContainer = styled.div<{ hideLastPage: boolean }>`
ul.euiPagination__list {
li.euiPagination__item:last-child {
${({ hideLastPage }) => `${hideLastPage ? 'display:none' : ''}`};
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, why we should hide this, but seems to be the reason.

Copy link
Contributor

@YulNaumenko YulNaumenko left a comment

Choose a reason for hiding this comment

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

Tested locally. The problem is fixed.
LGTM!

@christineweng christineweng merged commit 3c77ec0 into elastic:main Nov 16, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 16, 2022
…45441)

This PR aims to address:
- elastic#142965

### Background
On Alerts page -> Events table -> Event Rendered view, when there are
over 10,000 alerts, upon clicking the last page, a warning message
appears.

<img width="800" alt="image"
src="https://user-images.githubusercontent.com/18648970/202265598-5d9d657c-4918-408e-9f92-bcaafc904757.png">

The pop up is expected behavior according to documentation from:
https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html
.

> By default, you cannot use from and size to page through more than
10,000 hits. This limit is a safeguard set by the
[index.max_result_window](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window)
index setting.

### After
Currently the Grid view has a safeguard in place, where if there are
more than 10k results, it will not show the last page, hence preventing
user from clicking it and seeing the error pop up.
- This PR applies the same approach by wrapping the `EventRenderView`
component with the `EuiDataGridContainer`.
- This PR also renamed `EuiDataGridContainer` to
`EuiEventTableContainer` to indicate broader use.

When there are over 10k records, last page is not available in
pagination, and it is the same in Event Rendered View as in Grid view:

https://user-images.githubusercontent.com/18648970/202271379-309cbb3c-5da6-4c46-9814-beeca39d1f36.mov
(cherry picked from commit 3c77ec0)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 16, 2022
…45441)

This PR aims to address:
- elastic#142965

### Background
On Alerts page -> Events table -> Event Rendered view, when there are
over 10,000 alerts, upon clicking the last page, a warning message
appears.

<img width="800" alt="image"
src="https://user-images.githubusercontent.com/18648970/202265598-5d9d657c-4918-408e-9f92-bcaafc904757.png">

The pop up is expected behavior according to documentation from:
https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html
.

> By default, you cannot use from and size to page through more than
10,000 hits. This limit is a safeguard set by the
[index.max_result_window](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window)
index setting.

### After
Currently the Grid view has a safeguard in place, where if there are
more than 10k results, it will not show the last page, hence preventing
user from clicking it and seeing the error pop up.
- This PR applies the same approach by wrapping the `EventRenderView`
component with the `EuiDataGridContainer`.
- This PR also renamed `EuiDataGridContainer` to
`EuiEventTableContainer` to indicate broader use.

When there are over 10k records, last page is not available in
pagination, and it is the same in Event Rendered View as in Grid view:

https://user-images.githubusercontent.com/18648970/202271379-309cbb3c-5da6-4c46-9814-beeca39d1f36.mov
(cherry picked from commit 3c77ec0)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
6.8 Backport failed because of merge conflicts
7.17 Backport failed because of merge conflicts
8.5
8.6

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 145441

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 17, 2022
…5441) (#145482)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[Security Solution][Bug fix] alerts table over 10k results
(#145441)](#145441)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"christineweng","email":"18648970+christineweng@users.noreply.github.com"},"sourceCommit":{"committedDate":"2022-11-16T23:38:43Z","message":"[Security
Solution][Bug fix] alerts table over 10k results (#145441)\n\nThis PR
aims to address:\r\n-
https://github.com/elastic/kibana/issues/142965\r\n\r\n###
Background\r\nOn Alerts page -> Events table -> Event Rendered view,
when there are\r\nover 10,000 alerts, upon clicking the last page, a
warning message\r\nappears.\r\n\r\n<img width=\"800\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/18648970/202265598-5d9d657c-4918-408e-9f92-bcaafc904757.png\">\r\n\r\nThe
pop up is expected behavior according to documentation
from:\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html\r\n.\r\n\r\n>
By default, you cannot use from and size to page through more
than\r\n10,000 hits. This limit is a safeguard set by
the\r\n[index.max_result_window](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window)\r\nindex
setting.\r\n\r\n\r\n### After\r\nCurrently the Grid view has a safeguard
in place, where if there are\r\nmore than 10k results, it will not show
the last page, hence preventing\r\nuser from clicking it and seeing the
error pop up.\r\n- This PR applies the same approach by wrapping the
`EventRenderView`\r\ncomponent with the `EuiDataGridContainer`.\r\n-
This PR also renamed `EuiDataGridContainer`
to\r\n`EuiEventTableContainer` to indicate broader use.\r\n\r\nWhen
there are over 10k records, last page is not available in\r\npagination,
and it is the same in Event Rendered View as in Grid
view:\r\n\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/18648970/202271379-309cbb3c-5da6-4c46-9814-beeca39d1f36.mov","sha":"3c77ec063387ee1c7545774d069f134d55eabe2b","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v6.8.6","Team:Threat
Hunting","Team: SecuritySolution","Team:Threat
Hunting:Investigations","v8.7.0"],"number":145441,"url":"https://github.com/elastic/kibana/pull/145441","mergeCommit":{"message":"[Security
Solution][Bug fix] alerts table over 10k results (#145441)\n\nThis PR
aims to address:\r\n-
https://github.com/elastic/kibana/issues/142965\r\n\r\n###
Background\r\nOn Alerts page -> Events table -> Event Rendered view,
when there are\r\nover 10,000 alerts, upon clicking the last page, a
warning message\r\nappears.\r\n\r\n<img width=\"800\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/18648970/202265598-5d9d657c-4918-408e-9f92-bcaafc904757.png\">\r\n\r\nThe
pop up is expected behavior according to documentation
from:\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html\r\n.\r\n\r\n>
By default, you cannot use from and size to page through more
than\r\n10,000 hits. This limit is a safeguard set by
the\r\n[index.max_result_window](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window)\r\nindex
setting.\r\n\r\n\r\n### After\r\nCurrently the Grid view has a safeguard
in place, where if there are\r\nmore than 10k results, it will not show
the last page, hence preventing\r\nuser from clicking it and seeing the
error pop up.\r\n- This PR applies the same approach by wrapping the
`EventRenderView`\r\ncomponent with the `EuiDataGridContainer`.\r\n-
This PR also renamed `EuiDataGridContainer`
to\r\n`EuiEventTableContainer` to indicate broader use.\r\n\r\nWhen
there are over 10k records, last page is not available in\r\npagination,
and it is the same in Event Rendered View as in Grid
view:\r\n\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/18648970/202271379-309cbb3c-5da6-4c46-9814-beeca39d1f36.mov","sha":"3c77ec063387ee1c7545774d069f134d55eabe2b"}},"sourceBranch":"main","suggestedTargetBranches":["6.8"],"targetPullRequestStates":[{"branch":"6.8","label":"v6.8.6","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145441","number":145441,"mergeCommit":{"message":"[Security
Solution][Bug fix] alerts table over 10k results (#145441)\n\nThis PR
aims to address:\r\n-
https://github.com/elastic/kibana/issues/142965\r\n\r\n###
Background\r\nOn Alerts page -> Events table -> Event Rendered view,
when there are\r\nover 10,000 alerts, upon clicking the last page, a
warning message\r\nappears.\r\n\r\n<img width=\"800\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/18648970/202265598-5d9d657c-4918-408e-9f92-bcaafc904757.png\">\r\n\r\nThe
pop up is expected behavior according to documentation
from:\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html\r\n.\r\n\r\n>
By default, you cannot use from and size to page through more
than\r\n10,000 hits. This limit is a safeguard set by
the\r\n[index.max_result_window](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window)\r\nindex
setting.\r\n\r\n\r\n### After\r\nCurrently the Grid view has a safeguard
in place, where if there are\r\nmore than 10k results, it will not show
the last page, hence preventing\r\nuser from clicking it and seeing the
error pop up.\r\n- This PR applies the same approach by wrapping the
`EventRenderView`\r\ncomponent with the `EuiDataGridContainer`.\r\n-
This PR also renamed `EuiDataGridContainer`
to\r\n`EuiEventTableContainer` to indicate broader use.\r\n\r\nWhen
there are over 10k records, last page is not available in\r\npagination,
and it is the same in Event Rendered View as in Grid
view:\r\n\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/18648970/202271379-309cbb3c-5da6-4c46-9814-beeca39d1f36.mov","sha":"3c77ec063387ee1c7545774d069f134d55eabe2b"}}]}]
BACKPORT-->

Co-authored-by: christineweng <18648970+christineweng@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Nov 17, 2022
…5441) (#145481)

# Backport

This will backport the following commits from `main` to `8.5`:
- [[Security Solution][Bug fix] alerts table over 10k results
(#145441)](#145441)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"christineweng","email":"18648970+christineweng@users.noreply.github.com"},"sourceCommit":{"committedDate":"2022-11-16T23:38:43Z","message":"[Security
Solution][Bug fix] alerts table over 10k results (#145441)\n\nThis PR
aims to address:\r\n-
https://github.com/elastic/kibana/issues/142965\r\n\r\n###
Background\r\nOn Alerts page -> Events table -> Event Rendered view,
when there are\r\nover 10,000 alerts, upon clicking the last page, a
warning message\r\nappears.\r\n\r\n<img width=\"800\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/18648970/202265598-5d9d657c-4918-408e-9f92-bcaafc904757.png\">\r\n\r\nThe
pop up is expected behavior according to documentation
from:\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html\r\n.\r\n\r\n>
By default, you cannot use from and size to page through more
than\r\n10,000 hits. This limit is a safeguard set by
the\r\n[index.max_result_window](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window)\r\nindex
setting.\r\n\r\n\r\n### After\r\nCurrently the Grid view has a safeguard
in place, where if there are\r\nmore than 10k results, it will not show
the last page, hence preventing\r\nuser from clicking it and seeing the
error pop up.\r\n- This PR applies the same approach by wrapping the
`EventRenderView`\r\ncomponent with the `EuiDataGridContainer`.\r\n-
This PR also renamed `EuiDataGridContainer`
to\r\n`EuiEventTableContainer` to indicate broader use.\r\n\r\nWhen
there are over 10k records, last page is not available in\r\npagination,
and it is the same in Event Rendered View as in Grid
view:\r\n\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/18648970/202271379-309cbb3c-5da6-4c46-9814-beeca39d1f36.mov","sha":"3c77ec063387ee1c7545774d069f134d55eabe2b","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v6.8.6","Team:Threat
Hunting","Team: SecuritySolution","Team:Threat
Hunting:Investigations","v8.7.0"],"number":145441,"url":"https://github.com/elastic/kibana/pull/145441","mergeCommit":{"message":"[Security
Solution][Bug fix] alerts table over 10k results (#145441)\n\nThis PR
aims to address:\r\n-
https://github.com/elastic/kibana/issues/142965\r\n\r\n###
Background\r\nOn Alerts page -> Events table -> Event Rendered view,
when there are\r\nover 10,000 alerts, upon clicking the last page, a
warning message\r\nappears.\r\n\r\n<img width=\"800\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/18648970/202265598-5d9d657c-4918-408e-9f92-bcaafc904757.png\">\r\n\r\nThe
pop up is expected behavior according to documentation
from:\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html\r\n.\r\n\r\n>
By default, you cannot use from and size to page through more
than\r\n10,000 hits. This limit is a safeguard set by
the\r\n[index.max_result_window](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window)\r\nindex
setting.\r\n\r\n\r\n### After\r\nCurrently the Grid view has a safeguard
in place, where if there are\r\nmore than 10k results, it will not show
the last page, hence preventing\r\nuser from clicking it and seeing the
error pop up.\r\n- This PR applies the same approach by wrapping the
`EventRenderView`\r\ncomponent with the `EuiDataGridContainer`.\r\n-
This PR also renamed `EuiDataGridContainer`
to\r\n`EuiEventTableContainer` to indicate broader use.\r\n\r\nWhen
there are over 10k records, last page is not available in\r\npagination,
and it is the same in Event Rendered View as in Grid
view:\r\n\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/18648970/202271379-309cbb3c-5da6-4c46-9814-beeca39d1f36.mov","sha":"3c77ec063387ee1c7545774d069f134d55eabe2b"}},"sourceBranch":"main","suggestedTargetBranches":["6.8"],"targetPullRequestStates":[{"branch":"6.8","label":"v6.8.6","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145441","number":145441,"mergeCommit":{"message":"[Security
Solution][Bug fix] alerts table over 10k results (#145441)\n\nThis PR
aims to address:\r\n-
https://github.com/elastic/kibana/issues/142965\r\n\r\n###
Background\r\nOn Alerts page -> Events table -> Event Rendered view,
when there are\r\nover 10,000 alerts, upon clicking the last page, a
warning message\r\nappears.\r\n\r\n<img width=\"800\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/18648970/202265598-5d9d657c-4918-408e-9f92-bcaafc904757.png\">\r\n\r\nThe
pop up is expected behavior according to documentation
from:\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html\r\n.\r\n\r\n>
By default, you cannot use from and size to page through more
than\r\n10,000 hits. This limit is a safeguard set by
the\r\n[index.max_result_window](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window)\r\nindex
setting.\r\n\r\n\r\n### After\r\nCurrently the Grid view has a safeguard
in place, where if there are\r\nmore than 10k results, it will not show
the last page, hence preventing\r\nuser from clicking it and seeing the
error pop up.\r\n- This PR applies the same approach by wrapping the
`EventRenderView`\r\ncomponent with the `EuiDataGridContainer`.\r\n-
This PR also renamed `EuiDataGridContainer`
to\r\n`EuiEventTableContainer` to indicate broader use.\r\n\r\nWhen
there are over 10k records, last page is not available in\r\npagination,
and it is the same in Event Rendered View as in Grid
view:\r\n\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/18648970/202271379-309cbb3c-5da6-4c46-9814-beeca39d1f36.mov","sha":"3c77ec063387ee1c7545774d069f134d55eabe2b"}}]}]
BACKPORT-->

Co-authored-by: christineweng <18648970+christineweng@users.noreply.github.com>
benakansara pushed a commit to benakansara/kibana that referenced this pull request Nov 17, 2022
…45441)

This PR aims to address:
- elastic#142965

### Background
On Alerts page -> Events table -> Event Rendered view, when there are
over 10,000 alerts, upon clicking the last page, a warning message
appears.

<img width="800" alt="image"
src="https://user-images.githubusercontent.com/18648970/202265598-5d9d657c-4918-408e-9f92-bcaafc904757.png">

The pop up is expected behavior according to documentation from:
https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html
.

> By default, you cannot use from and size to page through more than
10,000 hits. This limit is a safeguard set by the
[index.max_result_window](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window)
index setting.


### After
Currently the Grid view has a safeguard in place, where if there are
more than 10k results, it will not show the last page, hence preventing
user from clicking it and seeing the error pop up.
- This PR applies the same approach by wrapping the `EventRenderView`
component with the `EuiDataGridContainer`.
- This PR also renamed `EuiDataGridContainer` to
`EuiEventTableContainer` to indicate broader use.

When there are over 10k records, last page is not available in
pagination, and it is the same in Event Rendered View as in Grid view:




https://user-images.githubusercontent.com/18648970/202271379-309cbb3c-5da6-4c46-9814-beeca39d1f36.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team Team:Threat Hunting Security Solution Threat Hunting Team v6.8.6 v8.5.2 v8.6.0 v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants