ソースを参照

Fix for cloudwatch datasource requesting too many datapoints (#6544)

The range checking in _getPeriod appeared to be using a different variable than the period that had just been calculated for its bounds checks.
Andrew McDonald 9 年 前
コミット
b98f817d68
1 ファイル変更2 行追加2 行削除
  1. 2 2
      public/app/plugins/datasource/cloudwatch/datasource.js

+ 2 - 2
public/app/plugins/datasource/cloudwatch/datasource.js

@@ -78,10 +78,10 @@ function (angular, _, moment, dateMath, kbn, CloudWatchAnnotationQuery) {
       } else {
         period = kbn.interval_to_seconds(templateSrv.replace(target.period, options.scopedVars));
       }
-      if (query.period < 60) {
+      if (period < 60) {
         period = 60;
       }
-      if (range / query.period >= 1440) {
+      if (range / period >= 1440) {
         period = Math.ceil(range / 1440 / 60) * 60;
       }