From d82a7d1c645ec4c3ab4e0a77d758d064ba6c283b Mon Sep 17 00:00:00 2001 From: Marta Bondyra Date: Wed, 16 Dec 2020 10:27:00 +0100 Subject: [PATCH] [Lens] add typeToAgg for median (#86078) --- .../indexpattern_datasource/operations/definitions/metrics.tsx | 1 + x-pack/test/functional/apps/lens/smokescreen.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx index bd4f36725f37e..a886bfdaad325 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx @@ -28,6 +28,7 @@ const typeToFn: Record = { max: 'aggMax', avg: 'aggAvg', sum: 'aggSum', + median: 'aggMedian', }; function buildMetricOperation>({ diff --git a/x-pack/test/functional/apps/lens/smokescreen.ts b/x-pack/test/functional/apps/lens/smokescreen.ts index b91399a4a6756..92ea9508cf837 100644 --- a/x-pack/test/functional/apps/lens/smokescreen.ts +++ b/x-pack/test/functional/apps/lens/smokescreen.ts @@ -130,7 +130,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.configureDimension( { dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', - operation: 'avg', + operation: 'median', field: 'bytes', }, 1