cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: updated refs/heads/master to c190b05
Date Tue, 04 Jun 2013 21:04:46 GMT
Updated Branches:
  refs/heads/master 9f564fc77 -> c190b0505


CLOUDSTACK-2185: Allow custom 'ipaddr' argument when creating NIC IP


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c190b050
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c190b050
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c190b050

Branch: refs/heads/master
Commit: c190b05057ee82a700e9387a316c2b7cd4d8ebda
Parents: 9f564fc
Author: Brian Federle <bfederle@gmail.com>
Authored: Tue Jun 4 14:04:14 2013 -0700
Committer: Brian Federle <bfederle@gmail.com>
Committed: Tue Jun 4 14:04:43 2013 -0700

----------------------------------------------------------------------
 ui/scripts/network.js |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c190b050/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index e451de2..0eb17c9 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1549,22 +1549,30 @@
             add: {
               label: 'label.acquire.new.ip',
               addRow: 'true',
+              createForm: {
+                title: 'label.acquire.new.ip',
+                desc: 'message.acquire.new.ip',
+                fields: {
+                  ipaddr: { label: 'label.ip.address' }
+                }
+              },
               messages: {
-                confirm: function(args) {
-                  return 'message.acquire.new.ip';
-                },
                 notification: function(args) {
                   return 'label.acquire.new.ip';
                 }
               },
               action: function(args) {
-                var dataObj = {};
+                var dataObj = {
+                  nicId: args.context.nics[0].id
+                };
+
+                if (args.data.ipaddr) {
+                  dataObj.ipaddr = args.data.ipaddr;
+                }
 
                 $.ajax({
                   url: createURL('addIpToNic'),
-                  data: {
-                    nicId: args.context.nics[0].id
-                  },
+                  data: dataObj,
                   success: function(json) {
                     args.response.success({
                       _custom: {


Mime
View raw message