show volume encryption in vm detail volume tab

Signed-off-by: andy.lee <andy.lee@suse.com>
This commit is contained in:
andy.lee
2024-10-23 17:01:31 +02:00
committed by Francesco Torchia
parent 958e97f769
commit db21093670
8 changed files with 90 additions and 37 deletions
+10 -2
View File
@@ -418,8 +418,10 @@ export default {
let size = '10Gi';
const imageResource = this.images.find( I => this.imageId === I.id);
const isIsoImage = /iso$/i.test(imageResource?.imageSuffix);
const imageSize = Math.max(imageResource?.status?.size, imageResource?.status?.virtualSize);
const isEncrypted = imageResource?.isEncrypted || false;
if (isIsoImage) {
bus = 'sata';
@@ -447,6 +449,7 @@ export default {
storageClassName: '',
image: this.imageId,
volumeMode: 'Block',
isEncrypted
});
} else {
out = _disks.map( (DISK, index) => {
@@ -523,7 +526,11 @@ export default {
minExponent: 3,
});
const volumeStatus = this.pvcs.find(P => P.id === `${ this.value.metadata.namespace }/${ volumeName }`)?.relatedPV?.metadata?.annotations?.[HCI_ANNOTATIONS.VOLUME_ERROR];
const pvc = this.pvcs.find(P => P.id === `${ this.value.metadata.namespace }/${ volumeName }`);
const volumeStatus = pvc?.relatedPV?.metadata?.annotations?.[HCI_ANNOTATIONS.VOLUME_ERROR];
const isEncrypted = pvc?.isEncrypted || false;
return {
id: randomStr(5),
@@ -543,7 +550,8 @@ export default {
hotpluggable,
volumeStatus,
dataSource,
namespace
namespace,
isEncrypted
};
});
}