mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 05:06:05 +08:00
Implement volumeEncryption feature flag
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user