mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
Implement volumeEncryption feature flag
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
@@ -61,4 +61,12 @@ export default class HciStorageClass extends StorageClass {
|
||||
get isLonghornV2() {
|
||||
return this.provisioner === LONGHORN_DRIVER && this.longhornVersion === DATA_ENGINE_V2;
|
||||
}
|
||||
|
||||
get longhornV2LVMSupport() {
|
||||
return this.$rootGetters['harvester-common/getFeatureEnabled']('longhornV2LVMSupport');
|
||||
}
|
||||
|
||||
get volumeEncryptionFeatureEnabled() {
|
||||
return this.$rootGetters['harvester-common/getFeatureEnabled']('volumeEncryption');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,14 +59,14 @@ export default class HciVmImage extends HarvesterResource {
|
||||
},
|
||||
{
|
||||
action: 'encryptImage',
|
||||
enabled: !this.isEncrypted,
|
||||
enabled: this.volumeEncryptionFeatureEnabled && !this.isEncrypted,
|
||||
icon: 'icon icon-lock',
|
||||
label: this.t('harvester.action.encryptImage'),
|
||||
disabled: !this.isReady,
|
||||
},
|
||||
{
|
||||
action: 'decryptImage',
|
||||
enabled: this.isEncrypted,
|
||||
enabled: this.volumeEncryptionFeatureEnabled && this.isEncrypted,
|
||||
icon: 'icon icon-unlock',
|
||||
label: this.t('harvester.action.decryptImage'),
|
||||
disabled: !this.isReady,
|
||||
@@ -381,6 +381,10 @@ export default class HciVmImage extends HarvesterResource {
|
||||
];
|
||||
}
|
||||
|
||||
get volumeEncryptionFeatureEnabled() {
|
||||
return this.$rootGetters['harvester-common/getFeatureEnabled']('volumeEncryption');
|
||||
}
|
||||
|
||||
download() {
|
||||
window.location.href = this.links.download;
|
||||
}
|
||||
|
||||
@@ -1151,6 +1151,10 @@ export default class VirtVm extends HarvesterResource {
|
||||
return this.$rootGetters['harvester-common/getFeatureEnabled']('schedulingVMBackup');
|
||||
}
|
||||
|
||||
get volumeEncryptionFeatureEnabled() {
|
||||
return this.$rootGetters['harvester-common/getFeatureEnabled']('volumeEncryption');
|
||||
}
|
||||
|
||||
setInstanceLabels(val) {
|
||||
if ( !this.spec?.template?.metadata?.labels ) {
|
||||
set(this, 'spec.template.metadata.labels', {});
|
||||
|
||||
Reference in New Issue
Block a user