mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
support cloudwatch high resolution query
This commit is contained in:
@@ -106,7 +106,7 @@ export default class CloudWatchDatasource {
|
||||
if (period < 1) {
|
||||
period = 1;
|
||||
}
|
||||
if (range / period >= 1440) {
|
||||
if (!target.highResolution && range / period >= 1440) {
|
||||
period = Math.ceil(range / 1440 / periodUnit) * periodUnit;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,11 @@
|
||||
</ul>
|
||||
</info-popover>
|
||||
</div>
|
||||
<div class="gf-form">
|
||||
<gf-form-switch class="gf-form" label="HighRes" label-class="width-5" checked="target.highResolution" on-change="onChange()">
|
||||
</gf-form-switch>
|
||||
</div>
|
||||
|
||||
<div class="gf-form gf-form--grow">
|
||||
<div class="gf-form-label gf-form-label--grow"></div>
|
||||
</div>
|
||||
|
||||
@@ -27,6 +27,7 @@ export class CloudWatchQueryParameterCtrl {
|
||||
target.dimensions = target.dimensions || {};
|
||||
target.period = target.period || '';
|
||||
target.region = target.region || 'default';
|
||||
target.highResolution = target.highResolution || false;
|
||||
|
||||
$scope.regionSegment = uiSegmentSrv.getSegmentForValue($scope.target.region, 'select region');
|
||||
$scope.namespaceSegment = uiSegmentSrv.getSegmentForValue($scope.target.namespace, 'select namespace');
|
||||
|
||||
Reference in New Issue
Block a user