From 4d6bd4325ef45f1544b1124acbe489fc924ff299 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Mon, 6 Oct 2014 17:31:34 +0200 Subject: [PATCH] Feature #3227: Only strip HOSTS from vCenter hypervisors --- src/sunstone/public/js/plugins/hosts-tab.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 63a8276a82..30f1a4a095 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -760,11 +760,18 @@ function updateHostInfo(request,host){ var stripped_host_template = {}; var unshown_values = {}; - for (key in host_info.TEMPLATE) - if(!key.match(/HOST/)) - stripped_host_template[key]=host_info.TEMPLATE[key]; - else - unshown_values[key]=host_info.TEMPLATE[key]; + if (host_info.TEMPLATE.HYPERVISOR.toLowerCase() != "vcenter") + { + stripped_host_template = host_info.TEMPLATE; + } + else + { + for (key in host_info.TEMPLATE) + if(!key.match(/HOST/)) + stripped_host_template[key]=host_info.TEMPLATE[key]; + else + unshown_values[key]=host_info.TEMPLATE[key]; + } //Information tab var info_tab = {