mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 06:19: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
15
app/react/kubernetes/volumes/utils.ts
Normal file
15
app/react/kubernetes/volumes/utils.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import uuidv4 from 'uuid/v4';
|
||||
|
||||
import { VolumeViewModel } from './ListView/types';
|
||||
|
||||
export function isVolumeUsed(volume: VolumeViewModel) {
|
||||
return volume.Applications.length !== 0;
|
||||
}
|
||||
|
||||
export function isVolumeExternal(volume: VolumeViewModel) {
|
||||
return !volume.PersistentVolumeClaim.ApplicationOwner;
|
||||
}
|
||||
|
||||
export function generatedApplicationConfigVolumeName(applicationName: string) {
|
||||
return `config-${applicationName}-${uuidv4()}`;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue