mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
prometheus: fix variable query to fallback correctly to series query
Using a query of for example up or up{job=job1}
This commit is contained in:
parent
1290087b78
commit
6687409efb
@ -329,4 +329,8 @@ export class PrometheusDatasource {
|
|||||||
}
|
}
|
||||||
return Math.ceil(date.valueOf() / 1000);
|
return Math.ceil(date.valueOf() / 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getOriginalMetricName(labelData) {
|
||||||
|
return this.resultTransformer.getOriginalMetricName(labelData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ export default class PrometheusMetricFindQuery {
|
|||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
return this.datasource.metadataRequest(url).then(function(result) {
|
return this.datasource.metadataRequest(url).then(function(result) {
|
||||||
return _.map(result.data.data, function(metric) {
|
return _.map(result.data.data, metric => {
|
||||||
return {
|
return {
|
||||||
text: self.datasource.getOriginalMetricName(metric),
|
text: self.datasource.getOriginalMetricName(metric),
|
||||||
expandable: true,
|
expandable: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user