fix(influxdb): influxdb data source did not use right http abstraction for metric queries, fixes #2919

This commit is contained in:
Torkel Ödegaard 2015-10-10 11:46:00 -04:00
parent f0a13b2a0d
commit c831369974
3 changed files with 2 additions and 7 deletions

View File

@ -4,10 +4,6 @@ global:
evaluation_interval: 10s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
# Attach these extra labels to all timeseries collected by this Prometheus instance.
labels:
monitor: 'codelab-monitor'
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
# - "first.rules"

View File

@ -91,7 +91,6 @@ func (scanner *PluginScanner) loadPluginJson(path string) error {
if !exists {
return errors.New("Did not find type property in plugin.json")
}
DataSources[datasourceType.(string)] = pluginJson
}

View File

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