mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
chore: disable vmstate-persistence and longhorn-static StorageClasses (#377)
* chore: disable vmstate-persistence and longhorn-static StorageClasses Signed-off-by: Nick Chung <nick.chung@suse.com> * chore: allow internal storage class deletions in image and volumn Signed-off-by: Nick Chung <nick.chung@suse.com> * chore: remove deletion tooltips in image and volume pages Signed-off-by: Nick Chung <nick.chung@suse.com> * chore: rollback style changes of image and volume lists Signed-off-by: Nick Chung <nick.chung@suse.com> --------- Signed-off-by: Nick Chung <nick.chung@suse.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import { ucFirst } from '@shell/utils/string';
|
||||
import { LVM_DRIVER } from '../../../../models/harvester/storage.k8s.io.storageclass';
|
||||
import { DATA_ENGINE_V2 } from '../../../../models/harvester/persistentvolumeclaim';
|
||||
import { GIBIBYTE } from '../../../../utils/unit';
|
||||
import { isInternalStorageClass } from '../../../../utils/storage-class';
|
||||
import { VOLUME_MODE } from '@pkg/harvester/config/types';
|
||||
|
||||
export default {
|
||||
@@ -118,11 +119,18 @@ export default {
|
||||
|
||||
storageClassOptions() {
|
||||
return this.storageClasses.filter((s) => !s.parameters?.backingImage).map((s) => {
|
||||
const label = s.isDefault ? `${ s.name } (${ this.t('generic.default') })` : s.name;
|
||||
let label = s.isDefault ? `${ s.name } (${ this.t('generic.default') })` : s.name;
|
||||
let disabled = false;
|
||||
|
||||
if (isInternalStorageClass(s.name)) {
|
||||
label += ` (${ this.t('harvester.storage.internal.label') })`;
|
||||
disabled = true;
|
||||
}
|
||||
|
||||
return {
|
||||
label,
|
||||
value: s.name,
|
||||
disabled
|
||||
};
|
||||
}) || [];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user