|
@@ -12,7 +12,7 @@ function (angular, _, dateMath, InfluxSeries, InfluxQueryBuilder) {
|
|
|
|
|
|
|
|
var module = angular.module('grafana.services');
|
|
var module = angular.module('grafana.services');
|
|
|
|
|
|
|
|
- module.factory('InfluxDatasource', function($q, $http, templateSrv) {
|
|
|
|
|
|
|
+ module.factory('InfluxDatasource', function($q, backendSrv, templateSrv) {
|
|
|
|
|
|
|
|
function InfluxDatasource(datasource) {
|
|
function InfluxDatasource(datasource) {
|
|
|
this.type = 'influxdb';
|
|
this.type = 'influxdb';
|
|
@@ -161,7 +161,7 @@ function (angular, _, dateMath, InfluxSeries, InfluxQueryBuilder) {
|
|
|
options.headers.Authorization = self.basicAuth;
|
|
options.headers.Authorization = self.basicAuth;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return $http(options).then(function(result) {
|
|
|
|
|
|
|
+ return backendSrv.datasourceRequest(options).then(function(result) {
|
|
|
return result.data;
|
|
return result.data;
|
|
|
}, function(err) {
|
|
}, function(err) {
|
|
|
if (err.status !== 0 || err.status >= 300) {
|
|
if (err.status !== 0 || err.status >= 300) {
|