5b9976433f
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>
16 lines
441 B
TypeScript
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()}`;
|
|
}
|