mirror of https://github.com/rancher/dashboard.git
filter bound PVs when creating PVC
This commit is contained in:
parent
bc5bec82b0
commit
cc2af79b09
|
|
@ -50,8 +50,18 @@ export default {
|
||||||
return this.storageClasses.map(sc => sc.metadata.name);
|
return this.storageClasses.map(sc => sc.metadata.name);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
unboundPVs() {
|
||||||
|
return this.persistentVolumes.reduce((total, each) => {
|
||||||
|
if (each?.status?.phase !== 'bound') {
|
||||||
|
total.push(each);
|
||||||
|
}
|
||||||
|
|
||||||
|
return total;
|
||||||
|
}, []);
|
||||||
|
},
|
||||||
|
|
||||||
persistentVolumeNames() {
|
persistentVolumeNames() {
|
||||||
return this.persistentVolumes.map(pv => pv.metadata.name);
|
return this.unboundPVs.map(pv => pv.metadata.name);
|
||||||
},
|
},
|
||||||
|
|
||||||
...mapGetters({ t: 'i18n/t' })
|
...mapGetters({ t: 'i18n/t' })
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue