mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
singlestat: fix for variable
in the prefix or postfix fields and when adding a gauge. Previously the template variable substition was only done when not rendering the gauge.
This commit is contained in:
parent
814d164e5b
commit
b241b98196
@ -402,9 +402,9 @@ class SingleStatCtrl extends MetricsPanelCtrl {
|
||||
}
|
||||
|
||||
function getValueText() {
|
||||
var result = panel.prefix ? panel.prefix : '';
|
||||
var result = panel.prefix ? templateSrv.replace(panel.prefix, data.scopedVars) : '';
|
||||
result += data.valueFormatted;
|
||||
result += panel.postfix ? panel.postfix : '';
|
||||
result += panel.postfix ? templateSrv.replace(panel.postfix, data.scopedVars) : '';
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user