mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 23:53:25 -06:00
Revert "feat(influxdb): add support for 0.11.0 tags"
This reverts commit b73d196c6b
.
This commit is contained in:
parent
04a887dafa
commit
83b7397398
@ -109,7 +109,7 @@ export function InfluxDatasource(instanceSettings, $q, backendSrv, templateSrv)
|
||||
return $q.reject(err);
|
||||
}
|
||||
|
||||
return this._seriesQuery(interpolated).then((results) => {
|
||||
return this._seriesQuery(interpolated).then(function (results) {
|
||||
if (!results || results.results.length === 0) { return []; }
|
||||
|
||||
var influxResults = results.results[0];
|
||||
@ -118,9 +118,9 @@ export function InfluxDatasource(instanceSettings, $q, backendSrv, templateSrv)
|
||||
}
|
||||
|
||||
var series = influxResults.series[0];
|
||||
return _.map(series.values, (value) => {
|
||||
return _.map(series.values, function(value) {
|
||||
if (_.isArray(value)) {
|
||||
return { text: this.getValueBasedOnInfluxVersion(value) };
|
||||
return { text: value[0] };
|
||||
} else {
|
||||
return { text: value };
|
||||
}
|
||||
@ -128,12 +128,6 @@ export function InfluxDatasource(instanceSettings, $q, backendSrv, templateSrv)
|
||||
});
|
||||
};
|
||||
|
||||
this.getValueBasedOnInfluxVersion = function(value) {
|
||||
//influxdb 0.10.0 sends the value in first position
|
||||
//influxdb 0.11.0 sends the value in second position
|
||||
return value[1] || value[0];
|
||||
};
|
||||
|
||||
this._seriesQuery = function(query) {
|
||||
return this._influxRequest('GET', '/query', {q: query, epoch: 'ms'});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user