Skip to content

Commit

Permalink
[Ingest Pipelines] Add descriptions for ingest processors T-U (elasti…
Browse files Browse the repository at this point in the history
…c#77497) (elastic#77650)

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
jrodewig and elasticmachine authored Sep 16, 2020
1 parent a046c5c commit 375b7ff
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.' }
)}
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
}
)}
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.' }
)}
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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.',
}
),
},
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,27 +413,39 @@ 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,
docLinkPath: '/uppercase-processor.html',
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,
docLinkPath: '/urldecode-processor.html',
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,
docLinkPath: '/user-agent-processor.html',
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.",
}),
},
};

Expand Down

0 comments on commit 375b7ff

Please sign in to comment.