mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-11-26 18:40:51 +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:
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');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user