feat: add restore failed message in VM state description (#448)

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee 2025-08-04 14:09:26 +08:00 committed by GitHub
parent 182d92d80b
commit 66eac96575
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1164,6 +1164,13 @@ export default class VirtVm extends HarvesterResource {
return this.t('harvester.virtualMachine.hotplug.restartVMMessage');
}
const restoreConditions = this.restoreResource?.status?.conditions || [];
const restoreError = restoreConditions.find((s) => s.error === true && s.reason === 'Error' && s.type === 'Ready');
if (restoreError?.message) {
return restoreError.message;
}
return this.ingoreVMMessage ? '' : super.stateDescription;
}