|
@@ -132,8 +132,8 @@ function (angular, _, kbn, InfluxSeries) {
|
|
|
return new InfluxSeries({ seriesList: results, annotation: annotation }).getAnnotations();
|
|
return new InfluxSeries({ seriesList: results, annotation: annotation }).getAnnotations();
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
InfluxDatasource.prototype.listColumns = function(seriesName) {
|
|
InfluxDatasource.prototype.listColumns = function(seriesName) {
|
|
|
|
|
+
|
|
|
return this._seriesQuery('select * from /' + seriesName + '/ limit 1').then(function(data) {
|
|
return this._seriesQuery('select * from /' + seriesName + '/ limit 1').then(function(data) {
|
|
|
if (!data) {
|
|
if (!data) {
|
|
|
return [];
|
|
return [];
|
|
@@ -184,6 +184,7 @@ function (angular, _, kbn, InfluxSeries) {
|
|
|
function retry(deferred, callback, delay) {
|
|
function retry(deferred, callback, delay) {
|
|
|
return callback().then(undefined, function(reason) {
|
|
return callback().then(undefined, function(reason) {
|
|
|
if (reason.status !== 0 || reason.status >= 300) {
|
|
if (reason.status !== 0 || reason.status >= 300) {
|
|
|
|
|
+ reason.message = 'InfluxDB Error: <br/>' + reason.data;
|
|
|
deferred.reject(reason);
|
|
deferred.reject(reason);
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
@@ -227,7 +228,7 @@ function (angular, _, kbn, InfluxSeries) {
|
|
|
inspect: { type: 'influxdb' },
|
|
inspect: { type: 'influxdb' },
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- return $http(options).success(function (data) {
|
|
|
|
|
|
|
+ return $http(options).then(function (data) {
|
|
|
deferred.resolve(data);
|
|
deferred.resolve(data);
|
|
|
});
|
|
});
|
|
|
}, 10);
|
|
}, 10);
|