Files
Steven Kang 5b9976433f feat(k8s): Refactor Volumes page (#2510)
Co-authored-by: Nicholas Loomans <nicholas.loomans@portainer.io>
Co-authored-by: Robbie Cowan <robert.cowan@portainer.io>
Co-authored-by: RHCowan <50324595+RHCowan@users.noreply.github.com>
2026-05-19 10:39:24 +12:00

16 lines
441 B
TypeScript

import uuidv4 from 'uuid/v4';
import { PersistentVolume, VolumeViewModel } from './ListView/types';
export function isVolumeUsed(volume: VolumeViewModel) {
return volume.Applications.length !== 0;
}
export function isPersistentVolumeUsed(volume: PersistentVolume) {
return volume.claimRef !== null;
}
export function generatedApplicationConfigVolumeName(applicationName: string) {
return `config-${applicationName}-${uuidv4()}`;
}