mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add support for Offset in elasticsearch datasource, date_histogram aggregation, fixes grafana #12653
This commit is contained in:
parent
efcbb92b3f
commit
9825484176
@ -70,6 +70,16 @@
|
||||
</label>
|
||||
<input class="gf-form-input max-width-12" type="number" ng-model="agg.settings.trimEdges" ng-change="onChangeInternal()">
|
||||
</div>
|
||||
<div class="gf-form offset-width-7">
|
||||
<label class="gf-form-label width-10">
|
||||
Offset
|
||||
<info-popover mode="right-normal">
|
||||
Interval Offset
|
||||
</info-popover>
|
||||
</label>
|
||||
<input class="gf-form-input max-width-12" type="text" ng-model="agg.settings.offset" ng-change="onChangeInternal()">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div ng-if="agg.type === 'histogram'">
|
||||
|
@ -71,6 +71,7 @@ export class ElasticQueryBuilder {
|
||||
esAgg.min_doc_count = settings.min_doc_count || 0;
|
||||
esAgg.extended_bounds = { min: '$timeFrom', max: '$timeTo' };
|
||||
esAgg.format = 'epoch_millis';
|
||||
esAgg.offset = settings.offset || '0';
|
||||
|
||||
if (esAgg.interval === 'auto') {
|
||||
esAgg.interval = '$__interval';
|
||||
|
Loading…
Reference in New Issue
Block a user