From c4216a3817e2418aa5c7fcfa2770aaca1d893fb7 Mon Sep 17 00:00:00 2001 From: Wu Zhou Date: Wed, 18 May 2022 17:05:54 +0800 Subject: [PATCH] config-tools: vuart widget's vm_name changes when edited When vm_name is edited in in the vm tab, the vuart connection widget's vm_name field should change to the new name. Add name replacing in form change event. Tracked-On: #7506 Signed-off-by: Wu Zhou --- .../packages/configurator/src/pages/Config.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 441adeb05..4acb2f243 100644 --- a/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue +++ b/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue @@ -297,6 +297,17 @@ export default { } } } + if (hvdata.hasOwnProperty('vuart_connections')) { + for (let key in hvdata.vuart_connections.vuart_connection) { + let connection = hvdata.vuart_connections.vuart_connection[key] + for (let key1 in connection.endpoint) { + let ep = connection.endpoint[key1]; + if (ep.vm_name === oldname) { + ep.vm_name = newname + } + } + } + } }, assignVMID() { let vm_priority = {