From 82232f7f75b3d9a67b8ff75c120e6767acbd9c2d Mon Sep 17 00:00:00 2001 From: hangliu1 Date: Sat, 21 May 2022 16:18:49 +0800 Subject: [PATCH] misc: configurator:Fix delete vm button apearance update activeVMID to make the delete vm button disappear when all VMs are deleted. Tracked-On: #7516 Signed-off-by: hangliu1 --- .../configurator/packages/configurator/src/pages/Config.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue b/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue index be55b9245..7302b68f5 100644 --- a/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue +++ b/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue @@ -241,7 +241,7 @@ export default { msg = "Post-launched VMs require the Service VM. If you proceed, all post-launched VMs and their settings will also be deleted. Are you sure you want to proceed?" isserivevm = true } else { - msg = `Delete this virtual machine VM${this.activeVMID}, launch script will alse be deleted if it exists.` + msg = `Delete this virtual machine VM${this.activeVMID}, launch script will also be deleted if it exists.` } confirm(msg).then((r) => { if (r) { @@ -257,6 +257,7 @@ export default { } this.vmNameChange('', this.scenario.vm[currentVMIndex].name) this.scenario.vm.splice(currentVMIndex, 1); + this.activeVMID = -1; this.updateCurrentFormSchema() this.updateCurrentFormData() }