Commit b4cd48a7 by Torkel Ödegaard

added support for maxDataPoints

parent 24dd2fa1
{
"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
}
}
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span12"> <div class="span12">
<input type="text" ng-model="target.target" class="input-large" style="width:95%" ng-model-onblur ng-change="get_data()" /> <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> </div>
</div> </div>
......
...@@ -11,7 +11,7 @@ function ($, RQ, config) { ...@@ -11,7 +11,7 @@ function ($, RQ, config) {
raw = raw || false; raw = raw || false;
var clean_options = []; var clean_options = [];
//var internal_options = ['_t']; //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', var graphite_png_options = ['areaMode', 'width', 'height', 'template', 'margin', 'bgcolor',
'fgcolor', 'fontName', 'fontSize', 'fontBold', 'fontItalic', 'fgcolor', 'fontName', 'fontSize', 'fontBold', 'fontItalic',
'yMin', 'yMax', 'colorList', 'title', 'vtitle', 'lineMode', 'yMin', 'yMax', 'colorList', 'title', 'vtitle', 'lineMode',
...@@ -55,7 +55,6 @@ function ($, RQ, config) { ...@@ -55,7 +55,6 @@ function ($, RQ, config) {
clean_options.push(key + "=" + encodeURIComponent(value)); clean_options.push(key + "=" + encodeURIComponent(value));
} }
}); });
return clean_options; return clean_options;
} }
...@@ -65,7 +64,8 @@ function ($, RQ, config) { ...@@ -65,7 +64,8 @@ function ($, RQ, config) {
var graphOptions = { var graphOptions = {
from: $.plot.formatDate(options.range.from, '%H%:%M_%Y%m%d'), from: $.plot.formatDate(options.range.from, '%H%:%M_%Y%m%d'),
until: $.plot.formatDate(options.range.to, '%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); var graphiteParameters = build_graphite_options(graphOptions, true);
......
...@@ -103,7 +103,9 @@ ...@@ -103,7 +103,9 @@
</span> </span>
</form> </form>
<center><img ng-show='panel.loading && _.isUndefined(data)' src="img/load_big.gif"></center> <center><img ng-show='panel.loading && _.isUndefined(data)' src="img/load_big.gif"></center>
<div histogram-chart class="pointer histogram-chart" params="{{panel}}"></div> <div histogram-chart class="pointer histogram-chart" params="{{panel}}"></div>
<span ng-show="panel.legend" ng-repeat='series in data' class="histogram-legend"> <span ng-show="panel.legend" ng-repeat='series in data' class="histogram-legend">
<i class='icon-circle' ng-style="{color: series.info.color}"></i> <i class='icon-circle' ng-style="{color: series.info.color}"></i>
<span class='small histogram-legend-item'> <span class='small histogram-legend-item'>
......
...@@ -298,7 +298,8 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) { ...@@ -298,7 +298,8 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
var graphiteLoadOptions = { var graphiteLoadOptions = {
range: range, range: range,
targets: $scope.panel.targets targets: $scope.panel.targets,
maxDataPoints: $scope.panel.span * 100
}; };
var result = RQ.sequence([ var result = RQ.sequence([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment