mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
fix(edge/stack): edge stack env table pagination and action [EE-6836] (#11837)
This commit is contained in:
parent
014a590704
commit
659abe553d
3 changed files with 17 additions and 9 deletions
|
@ -9,14 +9,19 @@ import { EnvironmentId } from '@/react/portainer/environments/types';
|
|||
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
||||
|
||||
import { Datatable } from '@@/datatables';
|
||||
import { useTableStateWithoutStorage } from '@@/datatables/useTableState';
|
||||
import { PortainerSelect } from '@@/form-components/PortainerSelect';
|
||||
import { createPersistedStore } from '@@/datatables/types';
|
||||
import { useTableState } from '@@/datatables/useTableState';
|
||||
|
||||
import { useEdgeStack } from '../../queries/useEdgeStack';
|
||||
|
||||
import { EdgeStackEnvironment } from './types';
|
||||
import { columns } from './columns';
|
||||
|
||||
const tableKey = 'edge-stacks-environment';
|
||||
|
||||
const settingsStore = createPersistedStore(tableKey);
|
||||
|
||||
export function EnvironmentsDatatable() {
|
||||
const {
|
||||
params: { stackId },
|
||||
|
@ -40,7 +45,7 @@ export function EnvironmentsDatatable() {
|
|||
'status',
|
||||
(value) => (value ? parseInt(value, 10) : undefined)
|
||||
);
|
||||
const tableState = useTableStateWithoutStorage('name');
|
||||
const tableState = useTableState(settingsStore, tableKey);
|
||||
const environmentsQuery = useEnvironmentList({
|
||||
pageLimit: tableState.pageSize,
|
||||
page: page + 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue