From 66c6547e7ce52dc5809962bb8b37039e5f3b2310 Mon Sep 17 00:00:00 2001 From: Morten Fangel Date: Tue, 15 Oct 2019 13:16:08 +0200 Subject: [PATCH] Elasticsearch: Adds support for region annotations (#17602) It is now possible to specify a field containing time-end in Elasticsearch annotations. Any annotations with a time-end will become a region between time and time-end. Any annotations without the time-end field will remain a single-point annotation. Ref #10589 --- .../features/datasources/elasticsearch.md | 1 + .../datasource/elasticsearch/datasource.ts | 39 +++++++++++++++++-- .../partials/annotations.editor.html | 4 ++ 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/docs/sources/features/datasources/elasticsearch.md b/docs/sources/features/datasources/elasticsearch.md index 7da6234422b..c25a0724e78 100644 --- a/docs/sources/features/datasources/elasticsearch.md +++ b/docs/sources/features/datasources/elasticsearch.md @@ -180,6 +180,7 @@ Name | Description ------------ | ------------- Query | You can leave the search query blank or specify a lucene query Time | The name of the time field, needs to be date field. +Time End | Optional name of the time end field, needs to be date field. If set, then annotations will be marked as a regions between time and time-end. Text | Event description field. Tags | Optional field name to use for event tags (can be an array or a CSV string). diff --git a/public/app/plugins/datasource/elasticsearch/datasource.ts b/public/app/plugins/datasource/elasticsearch/datasource.ts index 4ae3dbdbd13..191d9b6824b 100644 --- a/public/app/plugins/datasource/elasticsearch/datasource.ts +++ b/public/app/plugins/datasource/elasticsearch/datasource.ts @@ -119,22 +119,40 @@ export class ElasticDatasource extends DataSourceApiTime +
+ Time End + +
Text