incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [2/2] git commit: refs/heads/ui-multiple-nics - Multiple IPs per NIC: Fixes
Date Wed, 13 Mar 2013 18:06:58 GMT
Updated Branches:
  refs/heads/ui-multiple-nics 70164aa3b -> 66a6520e4


Multiple IPs per NIC: Fixes

-Remove redundant columns from NIC IPs list view

-Fix remove, add action to use correct data from API response


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

Branch: refs/heads/ui-multiple-nics
Commit: 66a6520e4db870a02289e3170984a8eaf051b8de
Parents: 7566424
Author: Brian Federle <brian.federle@citrix.com>
Authored: Wed Mar 13 11:06:48 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Wed Mar 13 11:06:48 2013 -0700

----------------------------------------------------------------------
 ui/scripts/network.js |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/66a6520e/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index b4e50db..15ead8c 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1119,6 +1119,7 @@
           id: 'secondaryNicIps',
           label: 'label.ips',
           fields: {
+            virtualmachinedisplayname: { label: 'label.vm.name' },
             ipaddress: {
               label: 'label.ips',
               converter: function(text, item) {
@@ -1128,15 +1129,6 @@
 
                 return text;
               }
-            },
-            zonename: { label: 'label.zone' },
-            virtualmachinedisplayname: { label: 'label.vm.name' },
-            state: {
-              converter: function(str) {
-                // For localization
-                return str;
-              },
-              label: 'label.state', indicator: { 'Allocated': 'on', 'Released': 'off' }
             }
           },
           actions: {
@@ -1163,7 +1155,13 @@
                     args.response.success({
                       _custom: {
                         getUpdatedItem: function(data) {
-
+                          return $.extend(
+                            data.queryasyncjobresultresponse.jobresult.nicsecondaryip,
+                            {
+                              zoneid: args.context.instances[0].zoneid,
+                              virtualmachinedisplayname: args.context.instances[0].displayname
+                            }
+                          );
                         },
                         jobId: json.addiptovmnicresponse.jobid
                       }
@@ -1194,7 +1192,6 @@
                   data: $(ips).map(function(index, ip) {
                     return $.extend(ip, {
                       zoneid: args.context.instances[0].zoneid,
-                      zonename: args.context.instances[0].zonename,
                       virtualmachinedisplayname: args.context.instances[0].displayname
                     });
                   })
@@ -1213,7 +1210,7 @@
                   $.ajax({
                     url: createURL('removeIpFromNic'),
                     data: {
-                      id: args.context.secondaryNicIps[0].ipaddress
+                      id: args.context.secondaryNicIps[0].id
                     },
                     success: function(json) {
                       args.response.success({


Mime
View raw message