Skip to content

Commit 24172fc

Browse files
vaibhavinbayareatorkelo
authored andcommitted
Added feature request "predict value" in moving averages pipeline agg (grafana#5689)
issue-id: grafana#5688
1 parent d28726b commit 24172fc

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

public/app/plugins/datasource/elasticsearch/partials/metric_agg.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
5353
<input type="text" class="gf-form-input max-width-12" ng-change="onChangeInternal()" ng-model="agg.settings.model" blur="onChange()" spellcheck='false'>
5454
</div>
5555

56+
<div class="gf-form offset-width-7" ng-if="agg.type === 'moving_avg'">
57+
<label class="gf-form-label width-10">Predict</label>
58+
<input type="number" class="gf-form-input max-width-12" ng-model="agg.settings.predict" ng-blur="onChangeInternal()" spellcheck='false'>
59+
</div>
60+
5661
<div class="gf-form offset-width-7" ng-if="agg.type === 'percentiles'">
5762
<label class="gf-form-label width-10">Percentiles</label>
5863
<input type="text" class="gf-form-input max-width-12" ng-model="agg.settings.percents" array-join ng-blur="onChange()"></input>

public/app/plugins/datasource/elasticsearch/query_def.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ function (_) {
7272
pipelineOptions: {
7373
'moving_avg' : [
7474
{text: 'window', default: 5},
75-
{text: 'model', default: 'simple'}
75+
{text: 'model', default: 'simple'},
76+
{text: 'predict', default: 0}
7677
],
7778
'derivative': [
7879
{text: 'unit', default: undefined},

0 commit comments

Comments
 (0)