From a94de51e5eeb565f8c6b7cbd3b91f160db7403a6 Mon Sep 17 00:00:00 2001 From: Aman Date: Wed, 7 Mar 2018 19:36:42 +0530 Subject: [PATCH] Add color to prefix and postfix in singlestat --- public/app/plugins/panel/singlestat/module.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/singlestat/module.ts b/public/app/plugins/panel/singlestat/module.ts index 611a9a55287..776033536dd 100644 --- a/public/app/plugins/panel/singlestat/module.ts +++ b/public/app/plugins/panel/singlestat/module.ts @@ -426,14 +426,16 @@ class SingleStatCtrl extends MetricsPanelCtrl { var body = '
'; if (panel.prefix) { - body += getSpan('singlestat-panel-prefix', panel.prefixFontSize, panel.prefix); + var prefix = applyColoringThresholds(data.value, panel.prefix); + body += getSpan('singlestat-panel-prefix', panel.prefixFontSize, prefix); } var value = applyColoringThresholds(data.value, data.valueFormatted); body += getSpan('singlestat-panel-value', panel.valueFontSize, value); if (panel.postfix) { - body += getSpan('singlestat-panel-postfix', panel.postfixFontSize, panel.postfix); + var postfix = applyColoringThresholds(data.value, panel.postfix); + body += getSpan('singlestat-panel-postfix', panel.postfixFontSize, postfix); } body += '
';