mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 08:18:10 -05:00
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.
This commit is contained in:
committed by
Torkel Ödegaard
parent
e04d27c0b0
commit
b98f817d68
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user