From 9b84b8851810c181f588bb5b92690696ca999809 Mon Sep 17 00:00:00 2001 From: Lucas Costa Date: Thu, 28 Apr 2016 19:23:45 -0300 Subject: [PATCH 1/2] Add support to Elasticsearch precision_threshold --- public/app/plugins/datasource/elasticsearch/metric_agg.js | 5 +++++ .../datasource/elasticsearch/partials/metric_agg.html | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/public/app/plugins/datasource/elasticsearch/metric_agg.js b/public/app/plugins/datasource/elasticsearch/metric_agg.js index 7fb227ab5b5..ecf4e16378e 100644 --- a/public/app/plugins/datasource/elasticsearch/metric_agg.js +++ b/public/app/plugins/datasource/elasticsearch/metric_agg.js @@ -68,6 +68,11 @@ function (angular, _, queryDef) { } switch($scope.agg.type) { + case 'cardinality': { + var precision_threshold = $scope.agg.settings.precision_threshold || ''; + $scope.settingsLinkText = 'Precision threshold: ' + precision_threshold; + break; + } case 'percentiles': { $scope.agg.settings.percents = $scope.agg.settings.percents || [25,50,75,95,99]; $scope.settingsLinkText = 'Values: ' + $scope.agg.settings.percents.join(','); diff --git a/public/app/plugins/datasource/elasticsearch/partials/metric_agg.html b/public/app/plugins/datasource/elasticsearch/partials/metric_agg.html index 24582baf8d1..faa12b5693d 100644 --- a/public/app/plugins/datasource/elasticsearch/partials/metric_agg.html +++ b/public/app/plugins/datasource/elasticsearch/partials/metric_agg.html @@ -58,6 +58,11 @@ +
+ + +
+
From 8f8ee28e6430b57e01aa29ab9593c2cfd59921f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 18 Jul 2016 14:06:31 +0200 Subject: [PATCH 2/2] docs(): updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a66686fea5..3ead9a12704 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * **SingleStat**: Add seriename as option in singlestat panel, closes [#4740](https://github.com/grafana/grafana/issues/4740) * **Localization**: Week start day now dependant on browser locale setting, closes [#3003](https://github.com/grafana/grafana/issues/3003) * **Templating**: Update panel repeats for variables that change on time refresh, closes [#5021](https://github.com/grafana/grafana/issues/5021) +* **Elasticsearch**: Support to set Precision Threshold for Unique Count metric, closes [#4689](https://github.com/grafana/grafana/issues/4689) # 3.1.0 stable (2016-07-12)