Commit 51d2534f by Carl Bergquist Committed by GitHub

Merge pull request #5994 from mtanda/prometheus_fix_legend_template

(prometheus) fix template variable expansion in legend
parents aa80b52c 9d09e5bb
......@@ -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) {
......
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