Updated Branches: refs/heads/master c090a2df7 -> 16bb28672
Sockets: new UI flow -Removes socket display from the main infra. dashboard and onto a separate page. This is due to performance issues with the API calls that query each hypervisor's socket data. -Convert socket display to a list view, for simplicity/consistency. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/16bb2867 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/16bb2867 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/16bb2867 Branch: refs/heads/master Commit: 16bb286729ce6d1028cfe4d288539eeaa58aabdd Parents: c090a2d Author: Brian Federle <brian.fede...@citrix.com> Authored: Thu Oct 31 12:03:20 2013 -0700 Committer: Brian Federle <brian.fede...@citrix.com> Committed: Thu Oct 31 12:03:20 2013 -0700 ---------------------------------------------------------------------- ui/index.jsp | 15 +++++++++------ ui/scripts/system.js | 30 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16bb2867/ui/index.jsp ---------------------------------------------------------------------- diff --git a/ui/index.jsp b/ui/index.jsp index a4e3e4c..56a4b27 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -1110,7 +1110,7 @@ view-all-title="<fmt:message key="label.system.vms"/>" view-all-target="systemVms"><fmt:message key="label.view.all"/></span> </li> - <li class="block last virtual-routers"> + <li class="block virtual-routers"> <span class="header"><fmt:message key="label.virtual.routers"/></span> <span class="icon"> </span> <span class="overview total" data-item="virtualRouterCount"></span> @@ -1118,12 +1118,15 @@ view-all-title="<fmt:message key="label.virtual.routers"/>" view-all-target="virtualRouters"><fmt:message key="label.view.all"/></span> </li> + <li class="block sockets"> + <span class="header"><fmt:message key="label.sockets"/></span> + <span class="icon"> </span> + <span class="overview total" data-item="socketCount"></span> + <span class="button view-all sockets" + view-all-title="<fmt:message key="label.sockets"/>" + view-all-target="sockets"><fmt:message key="label.view.all"/></span> + </li> </ul> - - <div class="socket-info"> - <div class="title"><fmt:message key="label.hypervisors"/></div> - <ul></ul> - </div> </div> </div> http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16bb2867/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 088cb3c..2a522f4 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -387,6 +387,7 @@ var hypervisors = json.listhypervisorsresponse.hypervisor; complete($.extend(data, { + socketCount: 0, socketInfo: $(hypervisors).map(function(index, hypervisor) { return { name: hypervisor.name, @@ -7132,6 +7133,35 @@ }); return listView; + }, + + sockets: function() { + var listView = { + id: 'sockets', + fields: { + hypervisor: { label: 'label.hypervisor' }, + sockets: { label: 'label.sockets' }, + hosts: { label: 'label.hosts' } + }, + dataProvider: function(args) { + $.ajax({ + url: createURL('listHypervisors'), + success: function(json) { + args.response.success({ + data: $(json.listhypervisorsresponse.hypervisor).map(function(index, hypervisor) { + return { + hypervisor: hypervisor.name, + sockets: 0, + hosts: 0 + }; + }) + }); + } + }); + } + }; + + return listView; } } }