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 ? ( + + ) : ( + + )}