Commit 293fd93e by Torkel Ödegaard

fix(elasticsearch): fixed predict default value, fixes #7145

parent 6960fb46
......@@ -73,7 +73,7 @@ function (angular, _, queryDef) {
$scope.validateModel = function() {
$scope.index = _.indexOf(bucketAggs, $scope.agg);
$scope.isFirst = $scope.index === 0;
$scope.isLast = $scope.index === bucketAggs.length - 1;
$scope.bucketAggCount = bucketAggs.length;
var settingsLinkText = "";
var settings = $scope.agg.settings || {};
......
......@@ -23,7 +23,7 @@
<label class="gf-form-label" ng-if="isFirst">
<a class="pointer" ng-click="addBucketAgg()"><i class="fa fa-plus"></i></a>
</label>
<label class="gf-form-label" ng-if="!isFirst">
<label class="gf-form-label" ng-if="bucketAggCount > 1">
<a class="pointer" ng-click="removeBucketAgg()"><i class="fa fa-minus"></i></a>
</label>
</div>
......
......@@ -73,7 +73,7 @@ function (_) {
'moving_avg' : [
{text: 'window', default: 5},
{text: 'model', default: 'simple'},
{text: 'predict', default: 0}
{text: 'predict', default: undefined}
],
'derivative': [
{text: 'unit', default: undefined},
......
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