From ce74b1ddc23fd3ab94dbd58064c16f85f49119a9 Mon Sep 17 00:00:00 2001 From: Mattia Rossi Date: Tue, 27 Nov 2018 03:42:20 -0500 Subject: [PATCH] Requested Backend changes, removed link in popover description for the offset field --- pkg/tsdb/elasticsearch/time_series_query.go | 5 +++-- .../datasource/elasticsearch/partials/bucket_agg.html | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/tsdb/elasticsearch/time_series_query.go b/pkg/tsdb/elasticsearch/time_series_query.go index 3e43a26089a..a25c3cf693d 100644 --- a/pkg/tsdb/elasticsearch/time_series_query.go +++ b/pkg/tsdb/elasticsearch/time_series_query.go @@ -134,9 +134,10 @@ func addDateHistogramAgg(aggBuilder es.AggBuilder, bucketAgg *BucketAgg, timeFro a.Interval = "$__interval" } - if bucketAgg.Settings.Get("offset").MustString("") != "" { - a.Offset = bucketAgg.Settings.Get("offset").MustString("") + if offset, err := bucketAgg.Settings.Get("offset").String(); err == nil { + a.Offset = offset } + if missing, err := bucketAgg.Settings.Get("missing").String(); err == nil { a.Missing = &missing } diff --git a/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html b/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html index 9d6b8196e8e..b17f03bced3 100644 --- a/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html +++ b/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html @@ -74,8 +74,7 @@