mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-15 14:11:46 +00:00
feat: add restore failed message in VM state description (#448)
Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
parent
182d92d80b
commit
66eac96575
@ -1164,6 +1164,13 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
return this.t('harvester.virtualMachine.hotplug.restartVMMessage');
|
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;
|
return this.ingoreVMMessage ? '' : super.stateDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user