Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ResponsiveActions,
SkeletonTableBody,
} from '@patternfly/react-component-groups';
import { Bullseye, Pagination, Tooltip } from '@patternfly/react-core';
import { Bullseye, Pagination, PaginationVariant, Tooltip } from '@patternfly/react-core';
import {
DataView,
DataViewFilters,
Expand Down Expand Up @@ -134,6 +134,19 @@ export const ConsoleDataView = <
return undefined;
}, [filteredData.length, loaded]);

const paginationTitles = useMemo(
() => ({
ofWord: t('public~of'),
itemsPerPage: t('public~Items per page'),
perPageSuffix: t('public~per page'),
toFirstPageAriaLabel: t('public~Go to first page'),
toPreviousPageAriaLabel: t('public~Go to previous page'),
toNextPageAriaLabel: t('public~Go to next page'),
toLastPageAriaLabel: t('public~Go to last page'),
}),
[t],
);

const dataViewFilterNodes = useMemo<React.ReactNode[]>(() => {
const basicFilters: ReactNode[] = [];

Expand Down Expand Up @@ -221,15 +234,7 @@ export const ConsoleDataView = <
</ResponsiveActions>
}
pagination={
<Pagination
itemCount={filteredData.length}
titles={{
ofWord: t('public~of'),
itemsPerPage: t('public~Items per page'),
perPageSuffix: t('public~per page'),
}}
{...pagination}
/>
<Pagination itemCount={filteredData.length} titles={paginationTitles} {...pagination} />
}
/>
<InnerScrollContainer>
Expand All @@ -246,6 +251,16 @@ export const ConsoleDataView = <
isResizable={isResizable}
/>
</InnerScrollContainer>
<DataViewToolbar
pagination={
<Pagination
itemCount={filteredData.length}
titles={paginationTitles}
variant={PaginationVariant.bottom}
{...pagination}
/>
}
/>
</DataView>
</StatusBox>
);
Expand Down
4 changes: 4 additions & 0 deletions frontend/public/locales/en/public.json
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,10 @@
"Admission Webhook Warning": "Admission Webhook Warning",
"{{kind}} {{name}} violates policy {{warning}}": "{{kind}} {{name}} violates policy {{warning}}",
"Learn more": "Learn more",
"Go to first page": "Go to first page",
"Go to previous page": "Go to previous page",
"Go to next page": "Go to next page",
"Go to last page": "Go to last page",
"Filter by name": "Filter by name",
"Reset column widths": "Reset column widths",
"{{label}} table": "{{label}} table",
Expand Down