config-tools: bugfix for saving configuration

When user delete all the VMs from UI, and click 'Save' button, a warning
message should appear to show that at least one VM is needed.

Tracked-On: #7532
Signed-off-by: Conghui <conghui.chen@intel.com>
This commit is contained in:
Conghui 2022-05-23 11:39:57 +08:00 committed by acrnsi-robot
parent 73f0d2795d
commit 57e0b966e9

View File

@ -349,6 +349,10 @@ export default {
return errorFlag
},
saveScenario() {
if (_.isEmpty(this.scenario.vm)) {
alert("Please add at least one VM")
return
}
let errorFlag = false
errorFlag = this.confirmVmName()
this.assignVMID()