[Ingest Pipelines] Add descriptions for ingest processors T-U (#77497)

This commit is contained in:
James Rodewig 2020-09-16 13:36:56 -04:00 committed by GitHub
parent ba53369170
commit 37465f5c8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 6 deletions

View file

@ -17,7 +17,7 @@ export const Trim: FunctionComponent = () => {
<FieldNameField
helpText={i18n.translate(
'xpack.ingestPipelines.pipelineEditor.trimForm.fieldNameHelpText',
{ defaultMessage: 'The field to trim whitespace from.' }
{ defaultMessage: 'Field to trim. For an array of strings, each element is trimmed.' }
)}
/>

View file

@ -17,7 +17,10 @@ export const Uppercase: FunctionComponent = () => {
<FieldNameField
helpText={i18n.translate(
'xpack.ingestPipelines.pipelineEditor.uppercaseForm.fieldNameHelpText',
{ defaultMessage: 'The field to make uppercase.' }
{
defaultMessage:
'Field to uppercase. For an array of strings, each element is uppercased.',
}
)}
/>

View file

@ -17,7 +17,7 @@ export const UrlDecode: FunctionComponent = () => {
<FieldNameField
helpText={i18n.translate(
'xpack.ingestPipelines.pipelineEditor.urlDecodeForm.fieldNameHelpText',
{ defaultMessage: 'The field to decode.' }
{ defaultMessage: 'Field to decode. For an array of strings, each element is decoded.' }
)}
/>

View file

@ -5,6 +5,8 @@
*/
import React, { FunctionComponent } from 'react';
import { EuiCode } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { EuiComboBoxOptionOption } from '@elastic/eui';
@ -39,7 +41,7 @@ const fieldsConfig: FieldsConfig = {
'xpack.ingestPipelines.pipelineEditor.userAgentForm.regexFileFieldHelpText',
{
defaultMessage:
'A filename containing the regular expressions for parsing the user agent string.',
'File containing the regular expressions used to parse the user agent string.',
}
),
},
@ -51,13 +53,23 @@ export const UserAgent: FunctionComponent = () => {
<FieldNameField
helpText={i18n.translate(
'xpack.ingestPipelines.pipelineEditor.userAgentForm.fieldNameHelpText',
{ defaultMessage: 'The field containing the user agent string.' }
{ defaultMessage: 'Field containing the user agent string.' }
)}
/>
<UseField config={fieldsConfig.regex_file} component={Field} path="fields.regex_file" />
<TargetField />
<TargetField
helpText={
<FormattedMessage
id="xpack.ingestPipelines.pipelineEditor.userAgentForm.targetFieldHelpText"
defaultMessage="Output field. Defaults to {defaultField}."
values={{
defaultField: <EuiCode inline>{'user_agent'}</EuiCode>,
}}
/>
}
/>
<PropertiesField
helpText={i18n.translate(

View file

@ -413,6 +413,9 @@ export const mapProcessorTypeToDescriptor: MapProcessorTypeToDescriptor = {
label: i18n.translate('xpack.ingestPipelines.processors.label.trim', {
defaultMessage: 'Trim',
}),
description: i18n.translate('xpack.ingestPipelines.processors.description.trim', {
defaultMessage: 'Removes leading and trailing whitespace from a string.',
}),
},
uppercase: {
FieldsComponent: Uppercase,
@ -420,6 +423,9 @@ export const mapProcessorTypeToDescriptor: MapProcessorTypeToDescriptor = {
label: i18n.translate('xpack.ingestPipelines.processors.label.uppercase', {
defaultMessage: 'Uppercase',
}),
description: i18n.translate('xpack.ingestPipelines.processors.description.uppercase', {
defaultMessage: 'Converts a string to uppercase.',
}),
},
urldecode: {
FieldsComponent: UrlDecode,
@ -427,6 +433,9 @@ export const mapProcessorTypeToDescriptor: MapProcessorTypeToDescriptor = {
label: i18n.translate('xpack.ingestPipelines.processors.label.urldecode', {
defaultMessage: 'URL decode',
}),
description: i18n.translate('xpack.ingestPipelines.processors.description.urldecode', {
defaultMessage: 'Decodes a URL-encoded string.',
}),
},
user_agent: {
FieldsComponent: UserAgent,
@ -434,6 +443,9 @@ export const mapProcessorTypeToDescriptor: MapProcessorTypeToDescriptor = {
label: i18n.translate('xpack.ingestPipelines.processors.label.userAgent', {
defaultMessage: 'User agent',
}),
description: i18n.translate('xpack.ingestPipelines.processors.description.userAgent', {
defaultMessage: "Extracts values from a browser's user agent string.",
}),
},
};