Commit 26232406 by utkarshcmu

Fill Policy visible only in <=2.2

parent 908e8577
......@@ -63,12 +63,11 @@
</select>
</li>
<li class="tight-form-item query-keyword" style="width: 59px">
<li class="tight-form-item query-keyword" style="width: 59px" ng-if="ctrl.tsdbVersion == 2">
Fill
<tip>Available since OpenTSDB 2.2</tip>
</li>
<li>
<li ng-if="ctrl.tsdbVersion == 2">
<select ng-model="ctrl.target.downsampleFillPolicy" class="tight-form-input input-small"
ng-options="agg for agg in ctrl.fillPolicies"
ng-change="ctrl.targetBlur()">
......
......@@ -8,6 +8,7 @@ export class OpenTsQueryCtrl extends QueryCtrl {
static templateUrl = 'partials/query.editor.html';
aggregators: any;
fillPolicies: any;
tsdbVersion: any;
aggregator: any;
downsampleInterval: any;
downsampleAggregator: any;
......@@ -26,6 +27,8 @@ export class OpenTsQueryCtrl extends QueryCtrl {
this.aggregators = ['avg', 'sum', 'min', 'max', 'dev', 'zimsum', 'mimmin', 'mimmax'];
this.fillPolicies = ['none', 'nan', 'null', 'zero'];
this.tsdbVersion = this.datasource.tsdbVersion;
if (!this.target.aggregator) {
this.target.aggregator = 'sum';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment