From 16bb286729ce6d1028cfe4d288539eeaa58aabdd Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Thu, 31 Oct 2013 12:03:20 -0700 Subject: [PATCH] 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. --- ui/index.jsp | 15 +++++++++------ ui/scripts/system.js | 30 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/ui/index.jsp b/ui/index.jsp index a4e3e4cbcac..56a4b27f6dd 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -1110,7 +1110,7 @@ view-all-title="" view-all-target="systemVms"> -
  • +
  •   @@ -1118,12 +1118,15 @@ view-all-title="" view-all-target="virtualRouters">
  • +
  • + +   + + " + view-all-target="sockets"> +
  • - -
    -
    -
      -
      diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 088cb3cff59..2a522f45db9 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, @@ -7131,6 +7132,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; } }