mirror of https://github.com/portainer/portainer
fix(docker/stacks): show orphaned stacks option [EE-6149] (#10346)
parent
66ca73f98b
commit
b80fcb0467
|
@ -1,7 +1,6 @@
|
||||||
import { Table } from '@tanstack/react-table';
|
import { Table } from '@tanstack/react-table';
|
||||||
|
|
||||||
import { Authorized } from '@/react/hooks/useUser';
|
import { Authorized } from '@/react/hooks/useUser';
|
||||||
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
|
||||||
|
|
||||||
import { ColumnVisibilityMenu } from '@@/datatables/ColumnVisibilityMenu';
|
import { ColumnVisibilityMenu } from '@@/datatables/ColumnVisibilityMenu';
|
||||||
import { TableSettingsMenu } from '@@/datatables';
|
import { TableSettingsMenu } from '@@/datatables';
|
||||||
|
@ -35,22 +34,21 @@ export function TableSettingsMenus({
|
||||||
value={tableState.hiddenColumns}
|
value={tableState.hiddenColumns}
|
||||||
/>
|
/>
|
||||||
<TableSettingsMenu>
|
<TableSettingsMenu>
|
||||||
{isBE && (
|
<Authorized authorizations="EndpointResourcesAccess">
|
||||||
<Authorized authorizations="EndpointResourcesAccess">
|
<Checkbox
|
||||||
<Checkbox
|
id="setting_all_orphaned_stacks"
|
||||||
id="setting_all_orphaned_stacks"
|
label="Show all orphaned stacks"
|
||||||
label="Show all orphaned stacks"
|
checked={tableState.showOrphanedStacks}
|
||||||
checked={tableState.showOrphanedStacks}
|
onChange={(e) => {
|
||||||
onChange={(e) => {
|
tableState.setShowOrphanedStacks(e.target.checked);
|
||||||
tableState.setShowOrphanedStacks(e.target.checked);
|
tableInstance.setGlobalFilter((filter: object) => ({
|
||||||
tableInstance.setGlobalFilter((filter: object) => ({
|
...filter,
|
||||||
...filter,
|
showOrphanedStacks: e.target.checked,
|
||||||
showOrphanedStacks: e.target.checked,
|
}));
|
||||||
}));
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
</Authorized>
|
||||||
</Authorized>
|
|
||||||
)}
|
|
||||||
<TableSettingsMenuAutoRefresh
|
<TableSettingsMenuAutoRefresh
|
||||||
value={tableState.autoRefreshRate}
|
value={tableState.autoRefreshRate}
|
||||||
onChange={(value) => tableState.setAutoRefreshRate(value)}
|
onChange={(value) => tableState.setAutoRefreshRate(value)}
|
||||||
|
|
Loading…
Reference in New Issue