Skip to content

Commit 85baae1

Browse files
committed
feat(influxdb): added back fill option to editor, forgot to add it in the new updated query editor
1 parent 8174b9f commit 85baae1

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

public/app/plugins/datasource/influxdb/partials/query.editor.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,23 @@
112112
<metric-segment-model property="groupBy.interval" get-options="getGroupByTimeIntervals()" on-change="get_data()">
113113
</metric-segment>
114114
</li>
115+
<li class="dropdown" ng-if="groupBy.type === 'time'">
116+
<a class="tight-form-item pointer" data-toggle="dropdown" bs-tooltip="'Insert missing values, important when stacking'" data-placement="right">
117+
<span ng-show="target.fill">
118+
fill ({{target.fill}})
119+
</span>
120+
<span ng-show="!target.fill">
121+
no fill
122+
</span>
123+
</a>
124+
<ul class="dropdown-menu">
125+
<li><a ng-click="setFill('')">no fill</a></li>
126+
<li><a ng-click="setFill('0')">fill (0)</a></li>
127+
<li><a ng-click="setFill('null')">fill (null)</a></li>
128+
<li><a ng-click="setFill('none')">fill (none)</a></li>
129+
<li><a ng-click="setFill('previous')">fill (previous)</a></li>
130+
</ul>
131+
</li>
115132
<li ng-if="groupBy.type === 'tag'">
116133
<metric-segment-model property="groupBy.key" get-options="getTagOptions()" on-change="get_data()"></metric-segment>
117134
</li>

public/app/plugins/datasource/influxdb/queryCtrl.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ function (angular, _, InfluxQueryBuilder) {
199199
.then(null, $scope.handleQueryError);
200200
};
201201

202+
$scope.setFill = function(fill) {
203+
$scope.target.fill = fill;
204+
$scope.get_data();
205+
};
206+
202207
$scope.tagSegmentUpdated = function(segment, index) {
203208
$scope.tagSegments[index] = segment;
204209

0 commit comments

Comments
 (0)