diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/_classification_exploration.scss b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/_classification_exploration.scss index 2b3460a39042e..94874a4e320e7 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/_classification_exploration.scss +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/_classification_exploration.scss @@ -1,4 +1,7 @@ -/* Workaround for EuiDataGrid within a Flex Layout */ +/* + Workaround for EuiDataGrid within a Flex Layout, + this tricks browsers treating the width as a px value instead of % +*/ .mlDataFrameAnalyticsClassification { width: calc(100% - 0px); } @@ -7,13 +10,26 @@ padding: 0 5%; } +/* + The following two classes are a workaround to avoid having EuiDataGrid in a flex layout + and just uses a legacy approach for a two column layout so we don't break IE11. +*/ +.mlDataFrameAnalyticsClassification__confusionMatrix:after { + content: ""; + display: table; + clear: both; +} + .mlDataFrameAnalyticsClassification__actualLabel { - min-width: 70px; + float: left; + width: 70px; padding-top: $euiSize * 4.2; } -/* EuiDataGrid needs a minWidth of 480px, otherwise the columns options will disappear if you hide all columns. */ +/* + Gives EuiDataGrid a min-width of 480px, otherwise the columns options will disappear if you hide all columns. +*/ .mlDataFrameAnalyticsClassification__dataGridMinWidth { min-width: 480px; - width: 90%; + width: calc(100% - 0px); } diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/evaluate_panel.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/evaluate_panel.tsx index 6024870d0bc64..45f883c4ccd94 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/evaluate_panel.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/evaluate_panel.tsx @@ -292,153 +292,133 @@ export const EvaluatePanel: FC = ({ jobConfig, jobStatus, searchQuery }) data-test-subj="mlDFAnalyticsClassificationExplorationEvaluatePanel" className="mlDataFrameAnalyticsClassification" > - - - - - - - {i18n.translate( - 'xpack.ml.dataframe.analytics.classificationExploration.evaluateJobIdTitle', - { - defaultMessage: 'Evaluation of classification job ID {jobId}', - values: { jobId: jobConfig.id }, - } - )} - - - - {jobStatus !== undefined && ( - - {getTaskStateBadge(jobStatus)} - - )} - - - - - +
+ + + + {i18n.translate( - 'xpack.ml.dataframe.analytics.classificationExploration.classificationDocsLink', + 'xpack.ml.dataframe.analytics.classificationExploration.evaluateJobIdTitle', { - defaultMessage: 'Classification evaluation docs ', + defaultMessage: 'Evaluation of classification job ID {jobId}', + values: { jobId: jobConfig.id }, } )} - + + + + {jobStatus !== undefined && ( + + {getTaskStateBadge(jobStatus)} - - - {error !== null && ( + )} + - + + {i18n.translate( + 'xpack.ml.dataframe.analytics.classificationExploration.classificationDocsLink', + { + defaultMessage: 'Classification evaluation docs ', + } + )} + - )} - {error === null && ( - - - - - {getHelpText(dataSubsetTitle)} - - - +
+ {error !== null && } + {error === null && ( + +
+ + + {getHelpText(dataSubsetTitle)} + + + + + +
+ {docsCount !== null && ( + + + + )} + {/* BEGIN TABLE ELEMENTS */} + +
+
+ + + +
+
+ {columns.length > 0 && columnsData.length > 0 && ( + <> +
+ + + +
+ + - - - - {docsCount !== null && ( - - - - - - )} - {/* BEGIN TABLE ELEMENTS */} - - - - - - - - - {columns.length > 0 && columnsData.length > 0 && ( - - - - - - - - - - - - - )} - - - - - )} - {/* END TABLE ELEMENTS */} - + + )} +
+
+
+ )} + {/* END TABLE ELEMENTS */} ); };