|
|
|
@ -18,6 +18,7 @@ import { TableSettingsProvider } from '@@/datatables/useTableSettings';
|
|
|
|
|
import { useTableState } from '@@/datatables/useTableState';
|
|
|
|
|
|
|
|
|
|
import { useContainers } from '../../containers/queries/containers';
|
|
|
|
|
import { RowProvider } from '../../containers/ListView/ContainersDatatable/RowContext';
|
|
|
|
|
|
|
|
|
|
const storageKey = 'stack-containers';
|
|
|
|
|
const settingsStore = createStore(storageKey);
|
|
|
|
@ -51,6 +52,7 @@ export function StackContainersDatatable({ environment, stackName }: Props) {
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<RowProvider context={{ environment }}>
|
|
|
|
|
<TableSettingsProvider settings={settingsStore}>
|
|
|
|
|
<Datatable
|
|
|
|
|
title="Containers"
|
|
|
|
@ -81,7 +83,9 @@ export function StackContainersDatatable({ environment, stackName }: Props) {
|
|
|
|
|
onChange={(hiddenColumns) => {
|
|
|
|
|
tableState.setHiddenColumns(hiddenColumns);
|
|
|
|
|
tableInstance.setColumnVisibility(
|
|
|
|
|
Object.fromEntries(hiddenColumns.map((col) => [col, false]))
|
|
|
|
|
Object.fromEntries(
|
|
|
|
|
hiddenColumns.map((col) => [col, false])
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}}
|
|
|
|
|
value={tableState.hiddenColumns}
|
|
|
|
@ -99,5 +103,6 @@ export function StackContainersDatatable({ environment, stackName }: Props) {
|
|
|
|
|
emptyContentLabel="No containers found"
|
|
|
|
|
/>
|
|
|
|
|
</TableSettingsProvider>
|
|
|
|
|
</RowProvider>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|