feat: show notification if there is VM pending restart (#700)

* feat: show notification if there is VM pending restart

Signed-off-by: Andy Lee <andy.lee@suse.com>

* refactor: update based on comments

Signed-off-by: Andy Lee <andy.lee@suse.com>

* refactor: calculate count from vm names

Signed-off-by: Andy Lee <andy.lee@suse.com>

---------

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee authored and GitHub committed 2026-02-03 16:21:20 +08:00
1 parent 8b9b5b41b7
commit 2db7ee7397
3 files changed
+64 -7

No files matched your search

@@ -1180,11 +1180,15 @@ export default class VirtVm extends HarvesterResource {
);
}
get stateDescription() {
get isRestartRequired() {
const conditions = get(this, 'status.conditions');
const restartRequired = findBy(conditions, 'type', 'RestartRequired');
if (restartRequired && restartRequired.status === 'True') {
return restartRequired && restartRequired.status === 'True';
}
get stateDescription() {
if (this.isRestartRequired) {
return this.t('harvester.virtualMachine.hotplug.restartVMMessage');
}