mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 13:16:05 +08:00
show volume encryption in vm detail volume tab
Signed-off-by: andy.lee <andy.lee@suse.com>
This commit is contained in:
@@ -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
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user