Commit f5a17e53 by Mitsuhiro Tanda

minor fix

parent 6f811095
...@@ -95,9 +95,7 @@ function (_) { ...@@ -95,9 +95,7 @@ function (_) {
PrometheusMetricFindQuery.prototype.queryResultQuery = function(query) { PrometheusMetricFindQuery.prototype.queryResultQuery = function(query) {
var end = this.datasource.getPrometheusTime(this.range.to, true); var end = this.datasource.getPrometheusTime(this.range.to, true);
var url = '/api/v1/query?query=' + encodeURIComponent(query) + '&time=' + end; return this.datasource.performInstantQuery({ expr: query }, end)
return this.datasource._request('GET', url)
.then(function(result) { .then(function(result) {
return _.map(result.data.data.result, function(metricData) { return _.map(result.data.data.result, function(metricData) {
var text = metricData.metric.__name__ || ''; var text = metricData.metric.__name__ || '';
......
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