Commit 8f73328e by Torkel Ödegaard

Fixed datasource proxy and session timeout issue for OpenTSDB, #1667

parent b5112aee
...@@ -10,7 +10,7 @@ function (angular, _, kbn) { ...@@ -10,7 +10,7 @@ function (angular, _, kbn) {
var module = angular.module('grafana.services'); var module = angular.module('grafana.services');
module.factory('OpenTSDBDatasource', function($q, $http, templateSrv) { module.factory('OpenTSDBDatasource', function($q, backendSrv, templateSrv) {
function OpenTSDBDatasource(datasource) { function OpenTSDBDatasource(datasource) {
this.type = 'opentsdb'; this.type = 'opentsdb';
...@@ -73,7 +73,7 @@ function (angular, _, kbn) { ...@@ -73,7 +73,7 @@ function (angular, _, kbn) {
data: reqBody data: reqBody
}; };
return $http(options); return backendSrv.datasourceRequest(options);
}; };
OpenTSDBDatasource.prototype.performSuggestQuery = function(query, type) { OpenTSDBDatasource.prototype.performSuggestQuery = function(query, type) {
...@@ -85,7 +85,7 @@ function (angular, _, kbn) { ...@@ -85,7 +85,7 @@ function (angular, _, kbn) {
q: query q: query
} }
}; };
return $http(options).then(function(result) { return backendSrv.datasourceRequest(options).then(function(result) {
return result.data; return result.data;
}); });
}; };
......
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