mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[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)~

This commit is contained in:
parent
a3c0914dae
commit
b867d42f84
4 changed files with 16 additions and 5 deletions
|
@ -77,7 +77,14 @@ export const ConfigureFields: React.FC = () => {
|
|||
<EuiForm component="form">
|
||||
{isTextExpansionModelSelected ? (
|
||||
<>
|
||||
{areInputsDisabled || <MultiFieldMapping />}
|
||||
{areInputsDisabled ? (
|
||||
<></>
|
||||
) : (
|
||||
<>
|
||||
<MultiFieldMapping />
|
||||
<EuiSpacer size="l" />
|
||||
</>
|
||||
)}
|
||||
<SelectedFieldMappings isReadOnly={areInputsDisabled} />
|
||||
</>
|
||||
) : (
|
||||
|
|
|
@ -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',
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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',
|
||||
}
|
||||
),
|
||||
},
|
||||
|
|
|
@ -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 />}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue