mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 13:16:05 +08:00
Add volume and image encryption feature
Signed-off-by: andy.lee <andy.lee@suse.com>
This commit is contained in:
@@ -37,7 +37,7 @@ export default class HciPv extends HarvesterResource {
|
||||
return [
|
||||
{
|
||||
action: 'exportImage',
|
||||
enabled: this.hasAction('export'),
|
||||
enabled: this.hasAction('export') && !this.isEncrypted,
|
||||
icon: 'icon icon-copy',
|
||||
label: this.t('harvester.action.exportImage')
|
||||
},
|
||||
@@ -213,6 +213,14 @@ export default class HciPv extends HarvesterResource {
|
||||
return false;
|
||||
}
|
||||
|
||||
get isEncrypted() {
|
||||
const inStore = this.$rootGetters['currentProduct'].inStore;
|
||||
|
||||
const longhornVolume = this.$rootGetters[`${ inStore }/all`](LONGHORN.VOLUMES).find(v => v.metadata?.name === this.spec?.volumeName);
|
||||
|
||||
return longhornVolume?.spec.encrypted || false;
|
||||
}
|
||||
|
||||
get longhornVolume() {
|
||||
const inStore = this.$rootGetters['currentProduct'].inStore;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user