From c58989c41976c50ae097fbca92b4c3b9076c3301 Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Tue, 12 Nov 2024 16:13:29 +0000 Subject: [PATCH] [ML] Anomaly detection: Adds spacer below split card chart in job wizard (#199708) Adds a spacer below the chart so the `Add metric` label doesn't appear like it is underneath the cards due to their drop shadow. Recommend viewing the diff with whitespace hidden as the change looks larger than it actually is. image vs image --- .../components/split_cards/split_cards.tsx | 69 ++++++++++--------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/split_cards/split_cards.tsx b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/split_cards/split_cards.tsx index d09791941a379..96692ab073738 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/split_cards/split_cards.tsx +++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/split_cards/split_cards.tsx @@ -97,42 +97,45 @@ export const SplitCards: FC> = memo( } return ( - - - {(fieldValues.length === 0 || numberOfDetectors === 0) && <>{children}} - {fieldValues.length > 0 && numberOfDetectors > 0 && splitField !== null && ( - - {(jobType === JOB_TYPE.MULTI_METRIC || jobType === JOB_TYPE.GEO) && ( - + <> + + + {(fieldValues.length === 0 || numberOfDetectors === 0) && <>{children}} + {fieldValues.length > 0 && numberOfDetectors > 0 && splitField !== null && ( + + {(jobType === JOB_TYPE.MULTI_METRIC || jobType === JOB_TYPE.GEO) && ( + +
+ +
+ +
+ )} + + {getBackPanels()} +
- + {fieldValues[0]}
- -
- )} - - {getBackPanels()} - -
- {fieldValues[0]} -
- - <>{children} -
-
- )} -
-
+ + <>{children} + + + )} + + + {splitField !== null ? : null} + ); } );