From 503ff893c74d403073da0d919a2bd1f5dee0a36d Mon Sep 17 00:00:00 2001 From: pzl Date: Thu, 5 Nov 2020 14:55:13 -0500 Subject: [PATCH 1/5] toss a callout in there --- .../management/pages/endpoint_hosts/view/index.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index 670e8dc965ad9..f282d1f88a140 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -63,6 +63,8 @@ import { useKibana } from '../../../../../../../../src/plugins/kibana_react/publ import { APP_ID } from '../../../../../common/constants'; import { LinkToApp } from '../../../../common/components/endpoint/link_to_app'; +const MAX_PAGINATED_ITEM = 9999; + const EndpointListNavLink = memo<{ name: string; href: string; @@ -637,6 +639,14 @@ export const EndpointList = () => { values={{ totalItemCount }} /> + {totalItemCount > MAX_PAGINATED_ITEM && ( + + + + )} )} From f4bd4493ca05172e16a6f778fc792d0bcaa9bfbb Mon Sep 17 00:00:00 2001 From: pzl Date: Tue, 10 Nov 2020 14:47:24 -0500 Subject: [PATCH 2/5] cap table last-page to 10k'th --- .../public/management/pages/endpoint_hosts/view/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index f282d1f88a140..ccb555d37b355 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -147,16 +147,18 @@ export const EndpointList = () => { const { formatUrl, search } = useFormatUrl(SecurityPageName.administration); const dispatch = useDispatch<(a: EndpointAction) => void>(); + // cap ability to page at 10k records. (max_result_window) + const maxPageCount = totalItemCount > MAX_PAGINATED_ITEM ? MAX_PAGINATED_ITEM : totalItemCount; const paginationSetup = useMemo(() => { return { pageIndex, pageSize, - totalItemCount, + totalItemCount: maxPageCount, pageSizeOptions: [...MANAGEMENT_PAGE_SIZE_OPTIONS], hidePerPageOptions: false, }; - }, [pageIndex, pageSize, totalItemCount]); + }, [pageIndex, pageSize, maxPageCount]); const onTableChange = useCallback( ({ page }: { page: { index: number; size: number } }) => { From 1f5220b91a7ee76b51e8e3e74f2572981a175de3 Mon Sep 17 00:00:00 2001 From: pzl Date: Tue, 10 Nov 2020 14:48:11 -0500 Subject: [PATCH 3/5] only display 10k max message *on last page* --- .../public/management/pages/endpoint_hosts/view/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index ccb555d37b355..2f52005c92446 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -641,7 +641,7 @@ export const EndpointList = () => { values={{ totalItemCount }} /> - {totalItemCount > MAX_PAGINATED_ITEM && ( + {totalItemCount > MAX_PAGINATED_ITEM && (pageIndex + 1) * pageSize >= MAX_PAGINATED_ITEM && ( Date: Thu, 12 Nov 2020 13:33:22 -0500 Subject: [PATCH 4/5] update endpoint table with subset count --- .../pages/endpoint_hosts/view/index.tsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index 2f52005c92446..11cbabe543243 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -635,20 +635,20 @@ export const EndpointList = () => { {hasListData && ( <> - - - {totalItemCount > MAX_PAGINATED_ITEM && (pageIndex + 1) * pageSize >= MAX_PAGINATED_ITEM && ( - + {totalItemCount > MAX_PAGINATED_ITEM + 1 ? ( - - )} + ) : ( + + )} + )} From c5b1898700f0d16305f600f9940c2b098dbcead1 Mon Sep 17 00:00:00 2001 From: pzl Date: Thu, 12 Nov 2020 13:54:03 -0500 Subject: [PATCH 5/5] I guess you can't have the same id for either-or text --- .../public/management/pages/endpoint_hosts/view/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index 11cbabe543243..25b012ed68625 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -637,7 +637,7 @@ export const EndpointList = () => { {totalItemCount > MAX_PAGINATED_ITEM + 1 ? (