From ec191455f4d607e64ca7dfa74cf705ec0f36a083 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 10 Jan 2014 14:17:38 -0800 Subject: [PATCH] CLOUDSTACK-5614: UI > Infrastructure > Sockets > show "N/A" in Socketes column for hypervisors that don't support socket info. --- ui/scripts/system.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 1bda90f6af1..60cb7008117 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -7471,6 +7471,13 @@ $.ajax({ url: createURL('listHypervisors'), success: function(json) { + var supportSocketHypervisors = { + "Hyperv": 1, + "KVM": 1, + "XenServer": 1, + "VMware": 1 + }; + args.response.success({ data: $(json.listhypervisorsresponse.hypervisor).map(function(index, hypervisor) { var totalHostCount = 0; @@ -7514,7 +7521,11 @@ } callListHostsWithPage(true); - + + if ((hypervisor.name in supportSocketHypervisors) == false) { + returnedHostCpusocketsSum = 'N/A'; + } + return { hypervisor: hypervisor.name, hosts: totalHostCount,