mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
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:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user