Skip to content

Commit 3cc8a88

Browse files
authored
[Security Solution] Note 10k object paging limit on Endpoint list (#82889) (#83345)
1 parent 2a2cc9a commit 3cc8a88

File tree

1 file changed

+19
-7
lines changed
  • x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view

1 file changed

+19
-7
lines changed

x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ import { useKibana } from '../../../../../../../../src/plugins/kibana_react/publ
6363
import { APP_ID } from '../../../../../common/constants';
6464
import { LinkToApp } from '../../../../common/components/endpoint/link_to_app';
6565

66+
const MAX_PAGINATED_ITEM = 9999;
67+
6668
const EndpointListNavLink = memo<{
6769
name: string;
6870
href: string;
@@ -145,16 +147,18 @@ export const EndpointList = () => {
145147
const { formatUrl, search } = useFormatUrl(SecurityPageName.administration);
146148

147149
const dispatch = useDispatch<(a: EndpointAction) => void>();
150+
// cap ability to page at 10k records. (max_result_window)
151+
const maxPageCount = totalItemCount > MAX_PAGINATED_ITEM ? MAX_PAGINATED_ITEM : totalItemCount;
148152

149153
const paginationSetup = useMemo(() => {
150154
return {
151155
pageIndex,
152156
pageSize,
153-
totalItemCount,
157+
totalItemCount: maxPageCount,
154158
pageSizeOptions: [...MANAGEMENT_PAGE_SIZE_OPTIONS],
155159
hidePerPageOptions: false,
156160
};
157-
}, [pageIndex, pageSize, totalItemCount]);
161+
}, [pageIndex, pageSize, maxPageCount]);
158162

159163
const onTableChange = useCallback(
160164
({ page }: { page: { index: number; size: number } }) => {
@@ -631,11 +635,19 @@ export const EndpointList = () => {
631635
{hasListData && (
632636
<>
633637
<EuiText color="subdued" size="xs" data-test-subj="endpointListTableTotal">
634-
<FormattedMessage
635-
id="xpack.securitySolution.endpoint.list.totalCount"
636-
defaultMessage="{totalItemCount, plural, one {# Host} other {# Hosts}}"
637-
values={{ totalItemCount }}
638-
/>
638+
{totalItemCount > MAX_PAGINATED_ITEM + 1 ? (
639+
<FormattedMessage
640+
id="xpack.securitySolution.endpoint.list.totalCount.limited"
641+
defaultMessage="Showing {limit} of {totalItemCount, plural, one {# Host} other {# Hosts}}"
642+
values={{ totalItemCount, limit: MAX_PAGINATED_ITEM + 1 }}
643+
/>
644+
) : (
645+
<FormattedMessage
646+
id="xpack.securitySolution.endpoint.list.totalCount"
647+
defaultMessage="{totalItemCount, plural, one {# Host} other {# Hosts}}"
648+
values={{ totalItemCount }}
649+
/>
650+
)}
639651
</EuiText>
640652
<EuiHorizontalRule margin="xs" />
641653
</>

0 commit comments

Comments
 (0)