mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
fix(edge/devices): search waiting room devices [EE-5895] (#10014)
This commit is contained in:
parent
0ef4aad79a
commit
d514eeec86
3 changed files with 108 additions and 37 deletions
|
@ -9,11 +9,22 @@ import { useEnvironments } from './useEnvironments';
|
|||
|
||||
const storageKey = 'edge-devices-waiting-room';
|
||||
|
||||
const settingsStore = createPersistedStore(storageKey, 'Name');
|
||||
const settingsStore = createPersistedStore(storageKey);
|
||||
|
||||
export function Datatable() {
|
||||
const tableState = useTableState(settingsStore, storageKey);
|
||||
const { data: environments, totalCount, isLoading } = useEnvironments();
|
||||
const {
|
||||
data: environments,
|
||||
totalCount,
|
||||
isLoading,
|
||||
page,
|
||||
setPage,
|
||||
} = useEnvironments({
|
||||
pageLimit: tableState.pageSize,
|
||||
search: tableState.search,
|
||||
});
|
||||
|
||||
const pageCount = Math.ceil(totalCount / tableState.pageSize);
|
||||
|
||||
return (
|
||||
<GenericDatatable
|
||||
|
@ -27,6 +38,9 @@ export function Datatable() {
|
|||
)}
|
||||
isLoading={isLoading}
|
||||
totalCount={totalCount}
|
||||
pageCount={pageCount}
|
||||
page={page}
|
||||
onPageChange={setPage}
|
||||
description={<Filter />}
|
||||
/>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue