Преглед изворни кода

Fixes #45, zero values treated as null values

Torkel Ödegaard пре 12 година
родитељ
комит
beda378314
3 измењених фајлова са 2 додато и 7 уклоњено
  1. 1 1
      src/app/panels/graphite/module.js
  2. 1 1
      src/app/panels/graphite/timeSeries.js
  3. 0 5
      src/config.js

+ 1 - 1
src/app/panels/graphite/module.js

@@ -338,7 +338,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
         var time_series = new timeSeries.ZeroFilled(tsOpts);
         var time_series = new timeSeries.ZeroFilled(tsOpts);
 
 
         _.each(targetData.datapoints, function(valueArray) {
         _.each(targetData.datapoints, function(valueArray) {
-          if (valueArray[0]) {
+          if (valueArray[0] !== null) {
             time_series.addValue(valueArray[1] * 1000, valueArray[0]);
             time_series.addValue(valueArray[1] * 1000, valueArray[0]);
           }
           }
         });
         });

+ 1 - 1
src/app/panels/graphite/timeSeries.js

@@ -218,7 +218,7 @@ function (_, Interval) {
   ts.ZeroFilled.prototype._getNoZeroFlotPairs = function (result, time) {
   ts.ZeroFilled.prototype._getNoZeroFlotPairs = function (result, time) {
 
 
     // add the current time
     // add the current time
-    if(this._data[time]){
+    if(this._data[time] !== null){
       result.push([ time, this._data[time]]);
       result.push([ time, this._data[time]]);
     }
     }
 
 

+ 0 - 5
src/config.js

@@ -15,11 +15,6 @@ function (Settings) {
      */
      */
     elasticsearch: "http://"+window.location.hostname+":9200",
     elasticsearch: "http://"+window.location.hostname+":9200",
 
 
-    /**
-      If you have _all query disabled on Elastic search then this must be set to true
-      https://github.com/torkelo/grafana/issues/24
-    **/
-    elasticsearch_all_disabled: false,
     /**
     /**
      * graphite-web url:
      * graphite-web url:
      * For Basic authentication use: http://username:password@domain.com
      * For Basic authentication use: http://username:password@domain.com