Torkel Odegaard 12 лет назад
Родитель
Сommit
4152c0653f
2 измененных файлов с 3 добавлено и 4 удалено
  1. 0 1
      src/app/services/dashboard.js
  2. 3 3
      src/app/services/graphite/graphiteDatasource.js

+ 0 - 1
src/app/services/dashboard.js

@@ -55,7 +55,6 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
     // Store a reference to this
     var self = this;
     var filterSrv;
-    var graphiteSrv;
 
     this.current = _.clone(_dash);
     this.last = {};

+ 3 - 3
src/app/services/graphite/graphiteDatasource.js

@@ -16,7 +16,7 @@ function (angular, _, $, config, kbn, moment) {
     this.$q = $q;
     this.filterSrv = filterSrv;
     this.$http = $http;
-  };
+  }
 
   GraphiteDatasource.prototype.query = function(options) {
     try {
@@ -31,7 +31,7 @@ function (angular, _, $, config, kbn, moment) {
       var params = this.buildGraphiteParams(graphOptions);
 
       if (options.format === 'png') {
-        return $q.when(graphiteRenderUrl + '?' + params.join('&'));
+        return this.$q.when(this.url + '/render' + '?' + params.join('&'));
       }
 
       return this.doGraphiteRequest({
@@ -79,7 +79,7 @@ function (angular, _, $, config, kbn, moment) {
       interpolated = this.filterSrv.applyFilterToTarget(query);
     }
     catch(err) {
-      return $q.reject(err);
+      return this.$q.reject(err);
     }
 
     return this.doGraphiteRequest({method: 'GET', url: '/metrics/find/?query=' + interpolated })