Commit a94de51e by Aman

Add color to prefix and postfix in singlestat

parent 310d7406
......@@ -426,14 +426,16 @@ class SingleStatCtrl extends MetricsPanelCtrl {
var body = '<div class="singlestat-panel-value-container">';
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 += '</div>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment