Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Sep 16, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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