From 7f5c6ca18daf51785998837a306d93a1c5fa3c06 Mon Sep 17 00:00:00 2001 From: Leonidas Loucas Date: Mon, 10 Mar 2014 02:50:11 -0700 Subject: [PATCH] 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 --- src/app/panels/graphite/module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/panels/graphite/module.js b/src/app/panels/graphite/module.js index fc67d75f6d2..05a609192c7 100644 --- a/src/app/panels/graphite/module.js +++ b/src/app/panels/graphite/module.js @@ -230,7 +230,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) { $scope.updateTimeRange = function () { $scope.range = filterSrv.timeRange(); $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'; if ($scope.range) {