From 562a3271bd40f637512fc3cf18f8eb22d2ccfcdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Wed, 4 Nov 2015 16:06:46 +0100 Subject: [PATCH] Bug #4117: Hide VM cpu & mem when showback is disabled, show VM disk cost in storage tab (cherry picked from commit f4a2d332dadb0a9f33cd2cc2f6e486bb113fb224) --- .../app/tabs/vms-tab/panels/capacity/html.hbs | 4 ++++ .../app/tabs/vms-tab/panels/storage/html.hbs | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/sunstone/public/app/tabs/vms-tab/panels/capacity/html.hbs b/src/sunstone/public/app/tabs/vms-tab/panels/capacity/html.hbs index cc5b293f1d..2ce49fa7a1 100644 --- a/src/sunstone/public/app/tabs/vms-tab/panels/capacity/html.hbs +++ b/src/sunstone/public/app/tabs/vms-tab/panels/capacity/html.hbs @@ -22,8 +22,10 @@ {{tr "CPU"}} {{tr "VCPU"}} {{tr "MEMORY"}} + {{#isFeatureEnabled "showback"}} {{tr "Cost / CPU"}} {{tr "Cost / MByte"}} + {{/isFeatureEnabled}} @@ -32,8 +34,10 @@ {{valOrDefault element.TEMPLATE.CPU '-'}} {{valOrDefault element.TEMPLATE.VCPU '-'}} {{humanizeSize "MB" element.TEMPLATE.MEMORY}} + {{#isFeatureEnabled "showback"}} {{valOrDefault element.TEMPLATE.CPU_COST '-'}} {{valOrDefault element.TEMPLATE.MEMORY_COST '-'}} + {{/isFeatureEnabled}} {{#isTabActionEnabled "vms-tab" "VM.resize"}} {{#if resizeStateEnabled}} diff --git a/src/sunstone/public/app/tabs/vms-tab/panels/storage/html.hbs b/src/sunstone/public/app/tabs/vms-tab/panels/storage/html.hbs index c2dcd489af..7a064a0c96 100644 --- a/src/sunstone/public/app/tabs/vms-tab/panels/storage/html.hbs +++ b/src/sunstone/public/app/tabs/vms-tab/panels/storage/html.hbs @@ -42,4 +42,18 @@ + {{#isFeatureEnabled "showback"}} +
+
+ + + + + + + +
{{tr "Cost / MByte"}}{{valOrDefault element.TEMPLATE.DISK_COST '-'}}
+
+
+ {{/isFeatureEnabled}}