Commit 7f5c6ca1 by Leonidas Loucas

round up maxDataPoints to nearest integer in request. graphite 0.9.x and 0.9.12…

round up maxDataPoints to nearest integer in request. graphite 0.9.x and 0.9.12 seem to treat decimal maxDataPoints badly returning enourmous amounts of data
parent 9de60a9a
...@@ -230,7 +230,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) { ...@@ -230,7 +230,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope.updateTimeRange = function () { $scope.updateTimeRange = function () {
$scope.range = filterSrv.timeRange(); $scope.range = filterSrv.timeRange();
$scope.rangeUnparsed = filterSrv.timeRange(false); $scope.rangeUnparsed = filterSrv.timeRange(false);
$scope.resolution = ($(window).width() * ($scope.panel.span / 12)) / 2; $scope.resolution = Math.ceil(($(window).width() * ($scope.panel.span / 12)) / 2);
$scope.interval = '10m'; $scope.interval = '10m';
if ($scope.range) { if ($scope.range) {
......
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