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 <wu.zhou@intel.com>
This commit is contained in:
Wu Zhou 2022-05-18 17:05:54 +08:00 committed by acrnsi-robot
parent e106766b9e
commit c4216a3817
1 changed files with 11 additions and 0 deletions

View File

@ -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 = {