mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 21:19:35 +00:00
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:
parent
73f0d2795d
commit
57e0b966e9
@ -349,6 +349,10 @@ export default {
|
|||||||
return errorFlag
|
return errorFlag
|
||||||
},
|
},
|
||||||
saveScenario() {
|
saveScenario() {
|
||||||
|
if (_.isEmpty(this.scenario.vm)) {
|
||||||
|
alert("Please add at least one VM")
|
||||||
|
return
|
||||||
|
}
|
||||||
let errorFlag = false
|
let errorFlag = false
|
||||||
errorFlag = this.confirmVmName()
|
errorFlag = this.confirmVmName()
|
||||||
this.assignVMID()
|
this.assignVMID()
|
||||||
@ -408,7 +412,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
alert(`${msg.slice(0,stepDone).join('')} \n All files successfully saved to your working folder ${this.WorkingFolder}`)
|
alert(`${msg.slice(0,stepDone).join('')} \nAll files successfully saved to your working folder ${this.WorkingFolder}`)
|
||||||
})
|
})
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log("error" + err)
|
console.log("error" + err)
|
||||||
|
Loading…
Reference in New Issue
Block a user