Elasticsearch: Exclude pipeline aggregations from order by options (#28620) (#28873)

(cherry picked from commit 135b83e17f)

Co-authored-by: Chris Cowan <chris@chriscowan.us>
This commit is contained in:
Grot (@grafanabot)
2020-11-06 09:23:52 +00:00
committed by GitHub
co-authored by Chris Cowan
parent c03fbac5db
commit c9a6e09235
@@ -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 });
}
});