mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 23:53:25 -06:00
Support OpenTSDB 2.2 fill policies, closes #3802
This commit is contained in:
parent
28fabadeae
commit
bbfdbaf952
@ -272,6 +272,10 @@ function (angular, _, dateMath) {
|
||||
}
|
||||
|
||||
query.downsample = interval + "-" + target.downsampleAggregator;
|
||||
|
||||
if (target.downsampleFillPolicy !== "none") {
|
||||
query.downsample += "-" + target.downsampleFillPolicy;
|
||||
}
|
||||
}
|
||||
|
||||
query.tags = angular.copy(target.tags);
|
||||
|
@ -104,8 +104,20 @@
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item query-keyword">
|
||||
Disable downsampling <editor-checkbox text="" model="target.disableDownsampling" change="targetBlur()"></editor-checkbox>
|
||||
<li class="tight-form-item query-keyword">
|
||||
Fill policy
|
||||
<tip>Available since OpenTSDB 2.2</tip>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<select ng-model="target.downsampleFillPolicy" class="tight-form-input input-small"
|
||||
ng-options="agg for agg in fillPolicies"
|
||||
ng-change="targetBlur()">
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item query-keyword">
|
||||
Disable downsampling <editor-checkbox text="" model="target.disableDownsampling" change="targetBlur()"></editor-checkbox>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -13,6 +13,7 @@ function (angular, _, kbn) {
|
||||
$scope.init = function() {
|
||||
$scope.target.errors = validateTarget($scope.target);
|
||||
$scope.aggregators = ['avg', 'sum', 'min', 'max', 'dev', 'zimsum', 'mimmin', 'mimmax'];
|
||||
$scope.fillPolicies = ['none', 'nan', 'null', 'zero'];
|
||||
|
||||
if (!$scope.target.aggregator) {
|
||||
$scope.target.aggregator = 'sum';
|
||||
@ -22,6 +23,10 @@ function (angular, _, kbn) {
|
||||
$scope.target.downsampleAggregator = 'avg';
|
||||
}
|
||||
|
||||
if (!$scope.target.downsampleFillPolicy) {
|
||||
$scope.target.downsampleFillPolicy = 'none';
|
||||
}
|
||||
|
||||
$scope.datasource.getAggregators().then(function(aggs) {
|
||||
$scope.aggregators = aggs;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user