From 3cc8a8835944ad44adbac1d1c4f42ff3e87b5db8 Mon Sep 17 00:00:00 2001 From: Dan Panzarella Date: Fri, 13 Nov 2020 08:42:52 -0500 Subject: [PATCH] [Security Solution] Note 10k object paging limit on Endpoint list (#82889) (#83345) --- .../pages/endpoint_hosts/view/index.tsx | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 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 670e8dc965ad9..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 @@ -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; @@ -145,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 } }) => { @@ -631,11 +635,19 @@ export const EndpointList = () => { {hasListData && ( <> - + {totalItemCount > MAX_PAGINATED_ITEM + 1 ? ( + + ) : ( + + )}