You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/09/13 23:17:25 UTC
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 "listVirtualMachines&detail
Updated Branches:
refs/heads/master 8aaa5abc0 -> 8737762bd
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/master
Commit: 8737762bdefb1c5b44c6d8a8e5dd9ac9dc4af768
Parents: 8aaa5ab
Author: Jessica Wang <je...@citrix.com>
Authored: Thu Sep 13 14:05:29 2012 -0700
Committer: Jessica Wang <je...@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
});
})
});