-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Ingest Pipelines] Processor forms for processors E-J (#75054)
* Added the enrich processor form (big one) * added fail processor form * Added foreach processor form * Added geoip processor form and refactored some deserialization * added grok processor form and updated comments and some i18n ids * updated existing gsub processor form to be in line with other forms * added html_strip processor form * refactored some serialize and deserialize functions and added inference processor form * fix copy-pasta mistake in inference form and add join processor form * Added JSON processor field - Also factored out target_field field to common field (still have to update the all instances) - Built out special logic for handling add_to_root and target_field combo on JSON processor form - Created another serializer, for default boolean -> undefined. * remove unused variable * Refactor to use new shared target_field component, and fix JSON serializer bug * fix i18n * address pr feedback * Fix enrich max fields help text copy * add link to enrich policy docs in help text * fix error validation message in enrich policy form and replace space with horizontal rule * address copy feedback * fix i18n id typo * fix i18n * address additional round of feedback and fix json form help text Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information
1 parent
eba4827
commit 644e9c2
Showing
26 changed files
with
1,300 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...cessors_editor/components/manage_processor_form/processors/common_fields/target_field.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { FunctionComponent } from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
import { Field, FIELD_TYPES, UseField, FieldConfig } from '../../../../../../../shared_imports'; | ||
|
||
import { FieldsConfig } from '../shared'; | ||
|
||
const fieldsConfig: FieldsConfig = { | ||
target_field: { | ||
type: FIELD_TYPES.TEXT, | ||
deserializer: String, | ||
label: i18n.translate('xpack.ingestPipelines.pipelineEditor.commonFields.targetFieldLabel', { | ||
defaultMessage: 'Target field (optional)', | ||
}), | ||
helpText: i18n.translate( | ||
'xpack.ingestPipelines.pipelineEditor.commonFields.targetFieldHelpText', | ||
{ | ||
defaultMessage: | ||
'The field to assign the joined value to. If empty, the field is updated in-place.', | ||
} | ||
), | ||
}, | ||
}; | ||
|
||
type Props = Partial<FieldConfig>; | ||
|
||
export const TARGET_FIELD_PATH = 'fields.target_field'; | ||
|
||
export const TargetField: FunctionComponent<Props> = (props) => { | ||
return ( | ||
<UseField | ||
config={{ | ||
...fieldsConfig.target_field, | ||
...props, | ||
}} | ||
component={Field} | ||
path={TARGET_FIELD_PATH} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.