Просмотр исходного кода

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

Leonidas Loucas 11 лет назад
Родитель
Сommit
7f5c6ca18d
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/app/panels/graphite/module.js

+ 1 - 1
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) {