Commit 9d09e5bb by Mitsuhiro Tanda

(prometheus) fix template variable expansion in legend

parent d11bc57c
......@@ -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