mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
fix(influxdb): influxdb data source did not use right http abstraction for metric queries, fixes #2919
This commit is contained in:
parent
f0a13b2a0d
commit
c831369974
@ -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"
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user