From f342cf300ee491f09ccb66307979fda983db3c22 Mon Sep 17 00:00:00 2001 From: David Jumani Date: Wed, 7 Sep 2022 12:25:23 +0530 Subject: [PATCH] ui: Fix netowrkid not passed in deployvm (#6711) Fixes the issue of the networkid not being passed when deploying a VM This is caused when the first template selected is a deploy-as-is one and the nicToNetworkSelection not being reset when selecting a new template --- ui/src/views/compute/DeployVM.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index 1566806883d..39946eeabc8 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -2158,6 +2158,7 @@ export default { }, fetchTemplateNics (template) { var nics = [] + this.nicToNetworkSelection = [] if (template && template.deployasisdetails && Object.keys(template.deployasisdetails).length > 0) { var keys = Object.keys(template.deployasisdetails) keys = keys.filter(key => key.startsWith('network-')) @@ -2169,7 +2170,6 @@ export default { return a.InstanceID - b.InstanceID }) if (this.options.networks && this.options.networks.length > 0) { - this.nicToNetworkSelection = [] for (var i = 0; i < nics.length; ++i) { var nic = nics[i] nic.id = nic.InstanceID