mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 22:39: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,6 +1,5 @@
|
|||
import { CellContext } from '@tanstack/react-table';
|
||||
|
||||
import KubernetesVolumeHelper from '@/kubernetes/helpers/volumeHelper';
|
||||
import { useEnvironmentId } from '@/react/hooks/useEnvironmentId';
|
||||
|
||||
import { Link } from '@@/Link';
|
||||
|
@ -9,6 +8,7 @@ import { ExternalBadge } from '@@/Badge/ExternalBadge';
|
|||
import { UnusedBadge } from '@@/Badge/UnusedBadge';
|
||||
|
||||
import { useNamespacesQuery } from '../../namespaces/queries/useNamespacesQuery';
|
||||
import { isVolumeExternal, isVolumeUsed } from '../utils';
|
||||
|
||||
import { VolumeViewModel } from './types';
|
||||
import { helper } from './columns.helper';
|
||||
|
@ -44,8 +44,8 @@ export function NameCell({
|
|||
<SystemBadge />
|
||||
) : (
|
||||
<>
|
||||
{KubernetesVolumeHelper.isExternalVolume(item) && <ExternalBadge />}
|
||||
{!KubernetesVolumeHelper.isUsed(item) && <UnusedBadge />}
|
||||
{isVolumeExternal(item) && <ExternalBadge />}
|
||||
{!isVolumeUsed(item) && <UnusedBadge />}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue