mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
InfluxDB: support for InfluxDB v0.8 'list series' response schema, Fixes #610
This commit is contained in:
parent
7dc422887c
commit
70521f0756
@ -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) {
|
||||
return _.map(data, function(series) {
|
||||
return series.name;
|
||||
});
|
||||
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; // influxdb < 1.7
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user