From 5bf217c6a820d4acae79f693a2f2a7e1342c607f Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Tue, 9 Jun 2020 10:53:32 +0200 Subject: [PATCH] [ML] increase MAX_NESTING_SUB_AGGS --- x-pack/plugins/transform/public/app/common/pivot_aggs.ts | 2 +- .../components/aggregation_list/sub_aggs_section.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/transform/public/app/common/pivot_aggs.ts b/x-pack/plugins/transform/public/app/common/pivot_aggs.ts index 56ca02d918c98..54dfd9ecda7b1 100644 --- a/x-pack/plugins/transform/public/app/common/pivot_aggs.ts +++ b/x-pack/plugins/transform/public/app/common/pivot_aggs.ts @@ -82,7 +82,7 @@ export type PivotAggDict = { /** * The maximum level of sub-aggregations */ -export const MAX_NESTING_SUB_AGGS = 2; +export const MAX_NESTING_SUB_AGGS = 10; // The internal representation of an aggregation definition. export interface PivotAggsConfigBase { diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/sub_aggs_section.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/sub_aggs_section.tsx index f835e640abf31..82b885bf4f775 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/sub_aggs_section.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/sub_aggs_section.tsx @@ -43,7 +43,7 @@ export const SubAggsSection: FC<{ item: PivotAggsConfig }> = ({ item }) => { ); const isNewSubAggAllowed: boolean = useMemo(() => { - let nestingLevel = 0; + let nestingLevel = 1; let parentItem = item.parentAgg; while (parentItem !== undefined) { nestingLevel++;