Commit 6687409e by Marcus Efraimsson

prometheus: fix variable query to fallback correctly to series query

Using a query of for example up or up{job=job1}
parent 1290087b
......@@ -329,4 +329,8 @@ export class PrometheusDatasource {
}
return Math.ceil(date.valueOf() / 1000);
}
getOriginalMetricName(labelData) {
return this.resultTransformer.getOriginalMetricName(labelData);
}
}
......@@ -121,7 +121,7 @@ export default class PrometheusMetricFindQuery {
var self = this;
return this.datasource.metadataRequest(url).then(function(result) {
return _.map(result.data.data, function(metric) {
return _.map(result.data.data, metric => {
return {
text: self.datasource.getOriginalMetricName(metric),
expandable: true,
......
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