From c9a6e09235df2a2deb3800537a84b21563f23f45 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Fri, 6 Nov 2020 14:53:52 +0530 Subject: [PATCH] Elasticsearch: Exclude pipeline aggregations from order by options (#28620) (#28873) (cherry picked from commit 135b83e17f8def56529815a34dfda2117e1655f0) Co-authored-by: Chris Cowan --- public/app/plugins/datasource/elasticsearch/query_def.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/elasticsearch/query_def.ts b/public/app/plugins/datasource/elasticsearch/query_def.ts index 56720e80847..43295c6a0fb 100644 --- a/public/app/plugins/datasource/elasticsearch/query_def.ts +++ b/public/app/plugins/datasource/elasticsearch/query_def.ts @@ -246,7 +246,7 @@ export function getMovingAvgSettings(model: any, filtered: boolean) { export function getOrderByOptions(target: any) { const metricRefs: any[] = []; _.each(target.metrics, metric => { - if (metric.type !== 'count') { + if (metric.type !== 'count' && !isPipelineAgg(metric.type)) { metricRefs.push({ text: describeMetric(metric), value: metric.id }); } });