Implement volumeEncryption feature flag

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia
2024-11-12 11:50:40 +01:00
parent 780106f32a
commit 48a93f6c9c
9 changed files with 75 additions and 46 deletions
@@ -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;
}