anuragaw commented on a change in pull request #3338: ui: fix enable static nat 
only towards first nic and not on any other interface
URL: https://github.com/apache/cloudstack/pull/3338#discussion_r285848465
 
 

 ##########
 File path: ui/scripts/network.js
 ##########
 @@ -87,12 +87,21 @@
 
         } else { //non-portable IP which has only one NIC
             // Get NIC IPs
+            var data = {
+                virtualmachineid: instance.id,
+            };
+            if (args.context.networkid != undefined) {
+                $.extend(data, {
+                    networkid: args.context.networkid
+                });
+            } else {
+                $.extend(data, {
+                    networkid: network.id
+                });
+            }
 
 Review comment:
   very minor suggestion- Alternate way of writing could be (just to make it 
smaller)-
   ```
   var data = {
            virtualmachineid: instance.id,
            networkid: (args.context.networkid != undefined) ? 
args.context.networkid : network.id
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to