You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sh...@apache.org on 2022/09/07 06:55:30 UTC

[cloudstack] branch 4.17 updated: ui: Fix netowrkid not passed in deployvm (#6711)

This is an automated email from the ASF dual-hosted git repository.

shwstppr pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.17 by this push:
     new f342cf300e ui: Fix netowrkid not passed in deployvm (#6711)
f342cf300e is described below

commit f342cf300ee491f09ccb66307979fda983db3c22
Author: David Jumani <dj...@gmail.com>
AuthorDate: Wed Sep 7 12:25:23 2022 +0530

    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 1566806883..39946eeabc 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