prevent display icon if this.volumes is empty array

Signed-off-by: andy.lee <andy.lee@suse.com>
This commit is contained in:
andy.lee 2025-02-05 14:06:12 +08:00
parent 2bb65801d9
commit c75755a527
No known key found for this signature in database
GPG Key ID: 10911689462678C7

View File

@ -640,6 +640,10 @@ export default class VirtVm extends HarvesterResource {
}
get encryptedVolumeType() {
if (!this.volumes || this.volumes.length === 0) {
return 'none';
}
if (this.volumes.every((vol) => vol.isEncrypted)) {
return 'all';
} else if (this.volumes.some((vol) => vol.isEncrypted)) {