mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 14:59:41 +02:00
fix(volumes): update the external, unused badges and used by col [r8s-105] (#12302)
This commit is contained in:
parent
44d6c0885e
commit
469a4e94c2
8 changed files with 62 additions and 28 deletions
|
@ -1,7 +1,6 @@
|
|||
import { Database } from 'lucide-react';
|
||||
|
||||
import { Authorized, useAuthorizations } from '@/react/hooks/useUser';
|
||||
import KubernetesVolumeHelper from '@/kubernetes/helpers/volumeHelper';
|
||||
import { useEnvironmentId } from '@/react/hooks/useEnvironmentId';
|
||||
|
||||
import { refreshableSettings } from '@@/datatables/types';
|
||||
|
@ -20,6 +19,7 @@ import { useNamespacesQuery } from '../../namespaces/queries/useNamespacesQuery'
|
|||
import { useAllVolumesQuery } from '../queries/useVolumesQuery';
|
||||
import { isSystemNamespace } from '../../namespaces/queries/useIsSystemNamespace';
|
||||
import { useDeleteVolumes } from '../queries/useDeleteVolumes';
|
||||
import { isVolumeUsed } from '../utils';
|
||||
|
||||
import { columns } from './columns';
|
||||
|
||||
|
@ -68,7 +68,7 @@ export function VolumesDatatable() {
|
|||
disableSelect={!hasWriteAuth}
|
||||
isRowSelectable={({ original: volume }) =>
|
||||
!isSystemNamespace(volume.ResourcePool.Namespace.Name, namespaces) &&
|
||||
!KubernetesVolumeHelper.isUsed(volume)
|
||||
!isVolumeUsed(volume)
|
||||
}
|
||||
renderTableActions={(selectedItems) => (
|
||||
<Authorized authorizations="K8sVolumesW">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue