cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [23/31] git commit: apache jira CLOUDSTACK-86: cloudstack UI - Instances page - NICs tab - fix a bug that got networkname from a wrong position in array of args.context.instances[0].nic. To correct and simplify it, use API response of "listVirtualMachine
Date Fri, 14 Sep 2012 18:21:01 GMT
apache jira CLOUDSTACK-86: cloudstack UI - Instances page - NICs tab - fix a bug that got networkname
from a wrong position in array of args.context.instances[0].nic. To correct and simplify it,
use API response of "listVirtualMachines&details=nics&id=N" instead of API response
of "listVirtualMachines&id=N" in $.map().


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

Branch: refs/heads/javelin
Commit: 8737762bdefb1c5b44c6d8a8e5dd9ac9dc4af768
Parents: 8aaa5ab
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Thu Sep 13 14:05:29 2012 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Thu Sep 13 14:17:03 2012 -0700

----------------------------------------------------------------------
 ui/scripts/instances.js |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8737762b/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 345f456..b18d44c 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1206,15 +1206,13 @@
                      success:function(json) {
                      // Handling the display of network name for a VM under the NICS tabs
                      args.response.success({
-                     data: $.map(args.context.instances[0].nic, function(nic, index) {
-                     var name = 'NIC ' + (index + 1);
-                     var networkname = json.listvirtualmachinesresponse.virtualmachine[0].nic[index].networkname;
+                     data: $.map(json.listvirtualmachinesresponse.virtualmachine[0].nic,
function(nic, index) {
+                     var name = 'NIC ' + (index + 1);                    
                      if (nic.isdefault) {
                           name += ' (' + _l('label.default') + ')';
                           }
                      return $.extend(nic, {
-                        name: name,
-                        networkname: networkname
+                        name: name
                                });
                             })
                         });


Mime
View raw message