Commit 70521f07 by Torkel Ödegaard

InfluxDB: support for InfluxDB v0.8 'list series' response schema, Fixes #610

parent 7dc42288
......@@ -7,6 +7,7 @@
- [Issue #525](https://github.com/grafana/grafana/issues/525). InfluxDB: Enhanced series aliasing (legend names) with pattern replacements
- [Issue #581](https://github.com/grafana/grafana/issues/581). InfluxDB: Add continuous query in series results (series typeahead).
- [Issue #584](https://github.com/grafana/grafana/issues/584). InfluxDB: Support for alias & alias patterns when using raw query mode
- [Issue #610](https://github.com/grafana/grafana/issues/610). InfluxDB: Support for InfluxdB v0.8 list series response schemea (series typeahead)
**Changes**
- [Issue #536](https://github.com/grafana/grafana/issues/536). Graphite: Use unix epoch for Graphite from/to for absolute time ranges
......
......@@ -127,9 +127,20 @@ function (angular, _, kbn, InfluxSeries) {
InfluxDatasource.prototype.listSeries = function() {
return this.doInfluxRequest('list series').then(function(data) {
if (!data || data.length === 0) {
return [];
}
// influxdb >= 1.8
if (data[0].columns) {
return _.map(data[0].points, function(point) {
return point[1];
});
}
else { // influxdb <= 1.7
return _.map(data, function(series) {
return series.name;
return series.name; // influxdb < 1.7
});
}
});
};
......
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