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:
@@ -4,6 +4,7 @@ import { HCI } from '../../types';
|
||||
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
|
||||
import { LONGHORN_DRIVER } from '@shell/config/types';
|
||||
import { DATA_ENGINE_V1, DATA_ENGINE_V2 } from '../../models/harvester/persistentvolumeclaim';
|
||||
import { isInternalStorageClass } from '../../utils/storage-class';
|
||||
|
||||
export const LVM_DRIVER = 'lvm.driver.harvesterhci.io';
|
||||
|
||||
@@ -85,4 +86,22 @@ export default class HciStorageClass extends StorageClass {
|
||||
get thirdPartyStorageFeatureEnabled() {
|
||||
return this.$rootGetters['harvester-common/getFeatureEnabled']('thirdPartyStorage');
|
||||
}
|
||||
|
||||
isInternalStorageClass() {
|
||||
return isInternalStorageClass(this.metadata?.name);
|
||||
}
|
||||
|
||||
get availableActions() {
|
||||
let out = super.availableActions || [];
|
||||
|
||||
out = out.map((action) => {
|
||||
if ((action.action === 'setDefault' || action.action === 'setAsDefault' || action.action === 'promptRemove') && this.isInternalStorageClass()) {
|
||||
return { ...action, enabled: false };
|
||||
}
|
||||
|
||||
return action;
|
||||
});
|
||||
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user