rhtyd closed pull request #2782: add ipaddress input field to 'Add network to 
VM' form
URL: https://github.com/apache/cloudstack/pull/2782
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 4e89cdb1d80..1a2a6409cca 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -2642,16 +2642,29 @@
                                                     }
                                                 });
                                             }
+                                        },
+                                        ipaddress: {
+                                            label: 'label.ip.address',
+                                            validation: {
+                                                required: false,
+                                                ipv4: true
+                                            }
                                         }
                                     }
                                 },
                                 action: function(args) {
+                                    var dataObj = {
+                                        virtualmachineid: 
args.context.instances[0].id,
+                                        networkid: args.data.networkid,
+                                    };
+
+                                    if (args.data.ipaddress) {
+                                        dataObj.ipaddress = 
args.data.ipaddress;
+                                    }
+
                                     $.ajax({
                                         url: 
createURL('addNicToVirtualMachine'),
-                                        data: {
-                                            virtualmachineid: 
args.context.instances[0].id,
-                                            networkid: args.data.networkid
-                                        },
+                                        data: dataObj,
                                         success: function(json) {
                                             args.response.success({
                                                 _custom: {


 

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


With regards,
Apache Git Services

Reply via email to