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 <hang1.liu@linux.intel.com>
This commit is contained in:
hangliu1 2022-05-21 16:18:49 +08:00 committed by acrnsi-robot
parent c60c89d3de
commit 82232f7f75
1 changed files with 2 additions and 1 deletions

View File

@ -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()
}