From ca067677191288bcb2d165c4edba69b656bf1115 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Mon, 6 Oct 2014 17:01:38 +0200 Subject: [PATCH] Feature #3227: do not show HOST entries in vCenter host template --- src/sunstone/public/js/plugins/hosts-tab.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index c26d1bcf76..63a8276a82 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -756,6 +756,16 @@ function updateHostInfo(request,host){ var cpu_bars = generateCPUProgressBar(host_info); var mem_bars = generateMEMProgressBar(host_info); + // Get rid of the unwanted (for show) HOST keys + 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]; + //Information tab var info_tab = { title : tr("Info"), @@ -832,10 +842,11 @@ function updateHostInfo(request,host){ \
\
' - + insert_extended_template_table(host_info.TEMPLATE, + + insert_extended_template_table(stripped_host_template, "Host", host_info.ID, - "Attributes") + + "Attributes", + unshown_values) + '
\
\ '