mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
Merge pull request #5994 from mtanda/prometheus_fix_legend_template
(prometheus) fix template variable expansion in legend
This commit is contained in:
commit
51d2534f6a
@ -257,7 +257,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
|
||||
return this.getOriginalMetricName(labelData);
|
||||
}
|
||||
|
||||
return this.renderTemplate(options.legendFormat, labelData) || '{}';
|
||||
return this.renderTemplate(templateSrv.replace(options.legendFormat), labelData) || '{}';
|
||||
};
|
||||
|
||||
this.renderTemplate = function(aliasPattern, aliasData) {
|
||||
|
Loading…
Reference in New Issue
Block a user