Browse Source

added support for maxDataPoints

Torkel Ödegaard 12 years ago
parent
commit
b4cd48a79c

+ 18 - 0
grafana.sublime-project

@@ -0,0 +1,18 @@
+{
+	"folders":
+	[
+		{
+			"follow_symlinks": true,
+			"path": ".",
+			"folder_exclude_patterns": [
+				"node_modules"
+			]
+		}
+	],
+	"settings":
+	{
+		"tab_size": 2,
+		"translate_tabs_to_spaces": true,
+		"trim_trailing_white_space_on_save": true
+	}
+}

File diff suppressed because it is too large
+ 70 - 0
grafana.sublime-workspace


+ 1 - 1
src/app/panels/graphite/editor.html

@@ -7,7 +7,7 @@
   	<div class="row-fluid">
   		<div class="span12">
     		<input type="text" ng-model="target.target" class="input-large" style="width:95%" ng-model-onblur ng-change="get_data()" />
-    		<i ng-click="panel.targets = _.without(panel.targets, target)" class="pointer icon-remove" style="position: relative; top: -5px; left: 5px;"></i>
+    		<i ng-click="panel.targets = _.without(panel.targets, target)" class="pointer icon-remove" ng-change="get_data()" style="position: relative; top: -5px; left: 5px;"></i>
     	</div>
     </div>
   </div>

+ 3 - 3
src/app/panels/graphite/graphiteSrv.js

@@ -11,7 +11,7 @@ function ($, RQ, config) {
     raw = raw || false;
     var clean_options = [];
     //var internal_options = ['_t'];
-    var graphite_options = ['target', 'targets', 'from', 'until', 'rawData', 'format'];
+    var graphite_options = ['target', 'targets', 'from', 'until', 'rawData', 'format', 'maxDataPoints'];
     var graphite_png_options = ['areaMode', 'width', 'height', 'template', 'margin', 'bgcolor',
                          'fgcolor', 'fontName', 'fontSize', 'fontBold', 'fontItalic',
                          'yMin', 'yMax', 'colorList', 'title', 'vtitle', 'lineMode',
@@ -55,7 +55,6 @@ function ($, RQ, config) {
         clean_options.push(key + "=" + encodeURIComponent(value));
       }
     });
-
     return clean_options;
   }
 
@@ -65,7 +64,8 @@ function ($, RQ, config) {
       var graphOptions = {
         from: $.plot.formatDate(options.range.from, '%H%:%M_%Y%m%d'),
         until: $.plot.formatDate(options.range.to, '%H%:%M_%Y%m%d'),
-        targets: options.targets
+        targets: options.targets,
+        maxDataPoints: options.maxDataPoints
       }
 
       var graphiteParameters = build_graphite_options(graphOptions, true);

+ 2 - 0
src/app/panels/graphite/module.html

@@ -103,7 +103,9 @@
     </span>
   </form>
   <center><img ng-show='panel.loading && _.isUndefined(data)' src="img/load_big.gif"></center>
+
   <div histogram-chart class="pointer histogram-chart" params="{{panel}}"></div>
+
   <span ng-show="panel.legend" ng-repeat='series in data' class="histogram-legend">
       <i class='icon-circle' ng-style="{color: series.info.color}"></i>
       <span class='small histogram-legend-item'>

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

@@ -298,7 +298,8 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
 
       var graphiteLoadOptions = {
         range: range,
-        targets: $scope.panel.targets
+        targets: $scope.panel.targets,
+        maxDataPoints: $scope.panel.span * 100
       };
 
       var result = RQ.sequence([

Some files were not shown because too many files changed in this diff