From 57e0b966e9c07f28615d29da40fc10cb3f530731 Mon Sep 17 00:00:00 2001 From: Conghui Date: Mon, 23 May 2022 11:39:57 +0800 Subject: [PATCH] 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 --- .../configurator/packages/configurator/src/pages/Config.vue | 6 +++++- 1 file changed, 5 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 e6d8d8f14..b6a5405b1 100644 --- a/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue +++ b/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue @@ -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() @@ -408,7 +412,7 @@ export default { } }) .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) { console.log("error" + err)