[Enterprise Search] Update ML inference field config UI (#162598)

## Summary

Minor updates to ML inference multi-field configuration UI (no
functional changes):
- Add spacer between field selector and selected field list
- Rename labels
- ~Remove "Actions" label (since there's only a single action)~

![Screenshot 2023-07-26 at 17 08
28](48505ac1-69f3-4c89-960b-68bb510ed830)
This commit is contained in:
Adam Demjen 2023-07-27 14:04:47 -04:00 committed by GitHub
parent a3c0914dae
commit b867d42f84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 5 deletions

View file

@ -77,7 +77,14 @@ export const ConfigureFields: React.FC = () => {
<EuiForm component="form">
{isTextExpansionModelSelected ? (
<>
{areInputsDisabled || <MultiFieldMapping />}
{areInputsDisabled ? (
<></>
) : (
<>
<MultiFieldMapping />
<EuiSpacer size="l" />
</>
)}
<SelectedFieldMappings isReadOnly={areInputsDisabled} />
</>
) : (

View file

@ -180,6 +180,10 @@ describe('SelectedFieldMappings', () => {
expect(wrapper.find(EuiBasicTable)).toHaveLength(1);
const table = wrapper.find(EuiBasicTable);
expect(table.prop('columns').map((c) => c.name)).toEqual(['Source field', '', 'Target field']);
expect(table.prop('columns').map((c) => c.name)).toEqual([
'Source text field',
'',
'Target field',
]);
});
});

View file

@ -143,7 +143,7 @@ export const MultiFieldMapping: React.FC = () => {
label={i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.sourceFieldLabel',
{
defaultMessage: 'Source field',
defaultMessage: 'Source text field',
}
)}
helpText={i18n.translate(
@ -233,7 +233,7 @@ export const SelectedFieldMappings: React.FC<SelectedFieldMappingsProps> = ({ is
name: i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.fieldMappings.sourceFieldHeader',
{
defaultMessage: 'Source field',
defaultMessage: 'Source text field',
}
),
},

View file

@ -68,7 +68,7 @@ export const SingleFieldMapping: React.FC = () => {
label={i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.sourceFieldLabel',
{
defaultMessage: 'Source field',
defaultMessage: 'Source text field',
}
)}
error={isEmptySourceFields && <NoSourceFieldsError />}