Skip to content

Commit

Permalink
Merge branch '8.x' into backport/8.x/pr-198433
Browse files Browse the repository at this point in the history
  • Loading branch information
Ikuni17 authored Oct 30, 2024
2 parents 848cdcd + 5a4a17f commit 1e34f17
Show file tree
Hide file tree
Showing 19 changed files with 385 additions and 420 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ export const getFieldsMatchingFilterFromState = (
} => {
return Object.fromEntries(
Object.entries(state.fields.byId).filter(([_, fieldId]) =>
filteredDataTypes.includes(TYPE_DEFINITION[state.fields.byId[fieldId.id].source.type].label)
filteredDataTypes.includes(getTypeLabelFromField(state.fields.byId[fieldId.id].source))
)
);
};
Expand All @@ -646,9 +646,7 @@ export const getFieldsFromState = (
const getField = (fieldId: string) => {
if (filteredDataTypes) {
if (
filteredDataTypes.includes(
TYPE_DEFINITION[normalizedFields.byId[fieldId].source.type].label
)
filteredDataTypes.includes(getTypeLabelFromField(normalizedFields.byId[fieldId].source))
) {
return normalizedFields.byId[fieldId];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import {
deNormalizeRuntimeFields,
getAllFieldTypesFromState,
getFieldsFromState,
getTypeLabelFromField,
} from './lib';
import { useMappingsState, useDispatch } from './mappings_state_context';
import { TYPE_DEFINITION } from './constants';

interface Args {
onChange?: OnUpdateHandler;
Expand Down Expand Up @@ -56,7 +56,7 @@ export const useMappingsStateListener = ({ onChange, value, status }: Args) => {
const allFieldsTypes = getAllFieldTypesFromState(deNormalize(normalize(mappedFields)));
return allFieldsTypes.map((dataType) => ({
checked: undefined,
label: TYPE_DEFINITION[dataType].label,
label: getTypeLabelFromField({ type: dataType }),
'data-test-subj': `indexDetailsMappingsSelectFilter-${dataType}`,
}));
}, [mappedFields]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import 'pages/analytics_exploration/components/regression_exploration/index';
@import 'pages/job_map/components/index';
@import 'pages/analytics_management/components/analytics_list/index';
@import 'pages/analytics_management/components/create_analytics_button/index';
@import 'pages/analytics_creation/components/index';
@import 'pages/analytics_creation/components/index';

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,16 @@ interface Props {
}

export const ClassificationExploration: FC<Props> = ({ jobId }) => (
<div className="mlDataFrameAnalyticsClassification">
<ExplorationPageWrapper
jobId={jobId}
title={i18n.translate(
'xpack.ml.dataframe.analytics.classificationExploration.tableJobIdTitle',
{
defaultMessage: 'Destination index for classification job ID {jobId}',
values: { jobId },
}
)}
EvaluatePanel={EvaluatePanel}
FeatureImportanceSummaryPanel={FeatureImportanceSummaryPanel}
/>
</div>
<ExplorationPageWrapper
jobId={jobId}
title={i18n.translate(
'xpack.ml.dataframe.analytics.classificationExploration.tableJobIdTitle',
{
defaultMessage: 'Destination index for classification job ID {jobId}',
values: { jobId },
}
)}
EvaluatePanel={EvaluatePanel}
FeatureImportanceSummaryPanel={FeatureImportanceSummaryPanel}
/>
);
Loading

0 comments on commit 1e34f17

Please sign in to comment.