Skip to content

Commit 211d4c4

Browse files
authored
[7.x] [Ingest pipelines] Address copy feedback (#65175) (#65410)
1 parent 2b51b2f commit 211d4c4

File tree

9 files changed

+129
-96
lines changed

9 files changed

+129
-96
lines changed

x-pack/plugins/ingest_pipelines/public/application/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const App: FunctionComponent = () => {
7171
title={
7272
<FormattedMessage
7373
id="xpack.ingestPipelines.app.deniedPrivilegeTitle"
74-
defaultMessage="You're missing cluster privileges"
74+
defaultMessage="Cluster privileges required"
7575
/>
7676
}
7777
message={

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const PipelineFormFields: React.FunctionComponent<Props> = ({
9595
description={
9696
<FormattedMessage
9797
id="xpack.ingestPipelines.form.descriptionFieldDescription"
98-
defaultMessage="The description to apply to the pipeline."
98+
defaultMessage="A description of what this pipeline does."
9999
/>
100100
}
101101
>
@@ -122,12 +122,16 @@ export const PipelineFormFields: React.FunctionComponent<Props> = ({
122122
<>
123123
<FormattedMessage
124124
id="xpack.ingestPipelines.form.processorsFieldDescription"
125-
defaultMessage="The processors used to pre-process documents before indexing. {learnMoreLink}"
125+
defaultMessage="The processors to use to transform the documents before indexing. {learnMoreLink}"
126126
values={{
127127
learnMoreLink: (
128-
<EuiLink href={services.documentation.getProcessorsUrl()} target="_blank">
128+
<EuiLink
129+
href={services.documentation.getProcessorsUrl()}
130+
target="_blank"
131+
external
132+
>
129133
{i18n.translate('xpack.ingestPipelines.form.processorsDocumentionLink', {
130-
defaultMessage: 'Learn more.',
134+
defaultMessage: 'Learn more',
131135
})}
132136
</EuiLink>
133137
),
@@ -172,12 +176,16 @@ export const PipelineFormFields: React.FunctionComponent<Props> = ({
172176
<>
173177
<FormattedMessage
174178
id="xpack.ingestPipelines.form.onFailureDescription"
175-
defaultMessage="The processors to be executed following a failed processor. {learnMoreLink}"
179+
defaultMessage="The alternate processors to execute after a processor fails. {learnMoreLink}"
176180
values={{
177181
learnMoreLink: (
178-
<EuiLink href={services.documentation.getHandlingFailureUrl()} target="_blank">
182+
<EuiLink
183+
href={services.documentation.getHandlingFailureUrl()}
184+
target="_blank"
185+
external
186+
>
179187
{i18n.translate('xpack.ingestPipelines.form.onFailureDocumentionLink', {
180-
defaultMessage: 'Learn more.',
188+
defaultMessage: 'Learn more',
181189
})}
182190
</EuiLink>
183191
),
@@ -188,7 +196,7 @@ export const PipelineFormFields: React.FunctionComponent<Props> = ({
188196
label={
189197
<FormattedMessage
190198
id="xpack.ingestPipelines.form.onFailureToggleDescription"
191-
defaultMessage="Add on-failure processors"
199+
defaultMessage="Add failure processors"
192200
/>
193201
}
194202
checked={isOnFailureEditorVisible}
@@ -207,7 +215,7 @@ export const PipelineFormFields: React.FunctionComponent<Props> = ({
207215
euiCodeEditorProps: {
208216
height: '300px',
209217
'aria-label': i18n.translate('xpack.ingestPipelines.form.onFailureFieldAriaLabel', {
210-
defaultMessage: 'On-failure processors JSON editor',
218+
defaultMessage: 'Failure processors JSON editor',
211219
}),
212220
},
213221
}}

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_request_flyout/pipeline_request_flyout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const PipelineRequestFlyout: React.FunctionComponent<Props> = ({
6565
<p>
6666
<FormattedMessage
6767
id="xpack.ingestPipelines.requestFlyout.descriptionText"
68-
defaultMessage="This Elasticsearch request will create or update this pipeline."
68+
defaultMessage="This Elasticsearch request will create or update the pipeline."
6969
/>
7070
</p>
7171
</EuiText>

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/tab_documents.tsx

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import React from 'react';
88
import { FormattedMessage } from '@kbn/i18n/react';
99
import { i18n } from '@kbn/i18n';
1010

11-
import { EuiSpacer, EuiText, EuiButton, EuiHorizontalRule, EuiLink } from '@elastic/eui';
11+
import { EuiSpacer, EuiText, EuiButton, EuiLink } from '@elastic/eui';
1212

1313
import {
1414
getUseField,
@@ -72,14 +72,18 @@ export const DocumentsTab: React.FunctionComponent<Props> = ({
7272
<p>
7373
<FormattedMessage
7474
id="xpack.ingestPipelines.testPipelineFlyout.documentsTab.tabDescriptionText"
75-
defaultMessage="Provide an array of documents to be ingested by the pipeline. {learnMoreLink}"
75+
defaultMessage="Provide an array of documents for the pipeline to ingest. {learnMoreLink}"
7676
values={{
7777
learnMoreLink: (
78-
<EuiLink href={services.documentation.getSimulatePipelineApiUrl()} target="_blank">
78+
<EuiLink
79+
href={services.documentation.getSimulatePipelineApiUrl()}
80+
target="_blank"
81+
external
82+
>
7983
{i18n.translate(
8084
'xpack.ingestPipelines.testPipelineFlyout.documentsTab.simulateDocumentionLink',
8185
{
82-
defaultMessage: 'Learn more.',
86+
defaultMessage: 'Learn more',
8387
}
8488
)}
8589
</EuiLink>
@@ -115,17 +119,6 @@ export const DocumentsTab: React.FunctionComponent<Props> = ({
115119
}}
116120
/>
117121

118-
<EuiHorizontalRule />
119-
120-
<EuiText>
121-
<p>
122-
<FormattedMessage
123-
id="xpack.ingestPipelines.testPipelineFlyout.documentsTab.runDescriptionText"
124-
defaultMessage="Execute the pipeline."
125-
/>
126-
</p>
127-
</EuiText>
128-
129122
<EuiSpacer size="m" />
130123

131124
<EuiButton
@@ -142,7 +135,7 @@ export const DocumentsTab: React.FunctionComponent<Props> = ({
142135
) : (
143136
<FormattedMessage
144137
id="xpack.ingestPipelines.testPipelineFlyout.documentsTab.runButtonLabel"
145-
defaultMessage="Run"
138+
defaultMessage="Run the pipeline"
146139
/>
147140
)}
148141
</EuiButton>

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/tab_output.tsx

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import {
1111
EuiSpacer,
1212
EuiText,
1313
EuiSwitch,
14-
EuiLink,
15-
EuiIcon,
14+
EuiButton,
1615
EuiLoadingSpinner,
17-
EuiIconTip,
16+
EuiFlexGroup,
17+
EuiFlexItem,
1818
} from '@elastic/eui';
1919
import { useTestConfigContext } from '../../test_config_context';
2020

@@ -59,44 +59,39 @@ export const OutputTab: React.FunctionComponent<Props> = ({
5959
<p>
6060
<FormattedMessage
6161
id="xpack.ingestPipelines.testPipelineFlyout.outputTab.descriptionText"
62-
defaultMessage="The output of the executed pipeline. {runLink}"
63-
values={{
64-
runLink: (
65-
<EuiLink onClick={() => handleExecute(cachedDocuments!, cachedVerbose)}>
66-
<FormattedMessage
67-
id="xpack.ingestPipelines.testPipelineFlyout.outputTab.descriptionLinkLabel"
68-
defaultMessage="Refresh output"
69-
/>{' '}
70-
<EuiIcon type="refresh" />
71-
</EuiLink>
72-
),
73-
}}
62+
defaultMessage="View the output data, or see how each processor affects the document as it passes through the pipeline."
7463
/>
7564
</p>
7665
</EuiText>
7766

78-
<EuiSpacer size="m" />
67+
<EuiSpacer size="l" />
7968

80-
<EuiSwitch
81-
label={
82-
<>
69+
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
70+
<EuiFlexItem grow={false}>
71+
<EuiSwitch
72+
label={
73+
<FormattedMessage
74+
id="xpack.ingestPipelines.testPipelineFlyout.outputTab.verboseSwitchLabel"
75+
defaultMessage="View verbose output"
76+
/>
77+
}
78+
checked={cachedVerbose}
79+
onChange={e => onEnableVerbose(e.target.checked)}
80+
/>
81+
</EuiFlexItem>
82+
<EuiFlexItem grow={false}>
83+
<EuiButton
84+
size="s"
85+
onClick={() => handleExecute(cachedDocuments!, cachedVerbose)}
86+
iconType="refresh"
87+
>
8388
<FormattedMessage
84-
id="xpack.ingestPipelines.testPipelineFlyout.outputTab.verboseSwitchLabel"
85-
defaultMessage="View verbose output"
86-
/>{' '}
87-
<EuiIconTip
88-
content={
89-
<FormattedMessage
90-
id="xpack.ingestPipelines.testPipelineFlyout.outputTab.verboseSwitchTooltipLabel"
91-
defaultMessage="Include output data for each processor in the executed pipeline response"
92-
/>
93-
}
89+
id="xpack.ingestPipelines.testPipelineFlyout.outputTab.descriptionLinkLabel"
90+
defaultMessage="Refresh output"
9491
/>
95-
</>
96-
}
97-
checked={cachedVerbose}
98-
onChange={e => onEnableVerbose(e.target.checked)}
99-
/>
92+
</EuiButton>
93+
</EuiFlexItem>
94+
</EuiFlexGroup>
10095

10196
<EuiSpacer size="m" />
10297

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/schema.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const pipelineFormSchema: FormSchema = {
2525
{
2626
validator: emptyField(
2727
i18n.translate('xpack.ingestPipelines.form.pipelineNameRequiredError', {
28-
defaultMessage: 'A pipeline name is required.',
28+
defaultMessage: 'Name is required.',
2929
})
3030
),
3131
},
@@ -40,7 +40,7 @@ export const pipelineFormSchema: FormSchema = {
4040
{
4141
validator: emptyField(
4242
i18n.translate('xpack.ingestPipelines.form.pipelineDescriptionRequiredError', {
43-
defaultMessage: 'A pipeline description is required.',
43+
defaultMessage: 'A description is required.',
4444
})
4545
),
4646
},
@@ -83,15 +83,15 @@ export const pipelineFormSchema: FormSchema = {
8383
{
8484
validator: isJsonField(
8585
i18n.translate('xpack.ingestPipelines.form.processorsJsonError', {
86-
defaultMessage: 'The processors JSON is not valid.',
86+
defaultMessage: 'The input is not valid.',
8787
})
8888
),
8989
},
9090
],
9191
},
9292
on_failure: {
9393
label: i18n.translate('xpack.ingestPipelines.form.onFailureFieldLabel', {
94-
defaultMessage: 'On-failure processors (optional)',
94+
defaultMessage: 'Failure processors (optional)',
9595
}),
9696
helpText: (
9797
<FormattedMessage
@@ -130,7 +130,7 @@ export const pipelineFormSchema: FormSchema = {
130130
}
131131
return isJsonField(
132132
i18n.translate('xpack.ingestPipelines.form.onFailureProcessorsJsonError', {
133-
defaultMessage: 'The on-failure processors JSON is not valid.',
133+
defaultMessage: 'The input is not valid.',
134134
})
135135
)(validationArg);
136136
},

x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/details_flyout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export const PipelineDetailsFlyout: FunctionComponent<Props> = ({
142142
{/* Processors JSON */}
143143
<EuiDescriptionListTitle>
144144
{i18n.translate('xpack.ingestPipelines.list.pipelineDetails.processorsTitle', {
145-
defaultMessage: 'Processors JSON',
145+
defaultMessage: 'Processors',
146146
})}
147147
</EuiDescriptionListTitle>
148148
<EuiDescriptionListDescription>
@@ -156,7 +156,7 @@ export const PipelineDetailsFlyout: FunctionComponent<Props> = ({
156156
{i18n.translate(
157157
'xpack.ingestPipelines.list.pipelineDetails.failureProcessorsTitle',
158158
{
159-
defaultMessage: 'On failure processors JSON',
159+
defaultMessage: 'Failure processors',
160160
}
161161
)}
162162
</EuiDescriptionListTitle>

x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/empty_list.tsx

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,49 @@
55
*/
66
import React, { FunctionComponent } from 'react';
77
import { i18n } from '@kbn/i18n';
8-
import { EuiButton, EuiEmptyPrompt } from '@elastic/eui';
8+
import { FormattedMessage } from '@kbn/i18n/react';
9+
import { EuiButton, EuiEmptyPrompt, EuiLink, EuiPageBody, EuiPageContent } from '@elastic/eui';
910
import { BASE_PATH } from '../../../../common/constants';
11+
import { useKibana } from '../../../shared_imports';
1012

11-
export const EmptyList: FunctionComponent = () => (
12-
<EuiEmptyPrompt
13-
iconType="managementApp"
14-
title={
15-
<h2>
16-
{i18n.translate('xpack.ingestPipelines.list.table.emptyPromptTitle', {
17-
defaultMessage: 'Start by creating a pipeline',
18-
})}
19-
</h2>
20-
}
21-
actions={
22-
<EuiButton href={`#${BASE_PATH}/create`} iconType="plusInCircle" fill>
23-
{i18n.translate('xpack.ingestPipelines.list.table.emptyPrompt.createButtonLabel', {
24-
defaultMessage: 'Create a pipeline',
25-
})}
26-
</EuiButton>
27-
}
28-
/>
29-
);
13+
export const EmptyList: FunctionComponent = () => {
14+
const { services } = useKibana();
15+
16+
return (
17+
<EuiPageBody>
18+
<EuiPageContent>
19+
<EuiEmptyPrompt
20+
iconType="managementApp"
21+
title={
22+
<h2>
23+
{i18n.translate('xpack.ingestPipelines.list.table.emptyPromptTitle', {
24+
defaultMessage: 'Start by creating a pipeline',
25+
})}
26+
</h2>
27+
}
28+
body={
29+
<p>
30+
<FormattedMessage
31+
id="xpack.ingestPipelines.list.table.emptyPromptDescription"
32+
defaultMessage="For example, you might create a pipeline with one processor that removes a field and another processor that renames a field."
33+
/>
34+
<br />
35+
<EuiLink href={services.documentation.getIngestNodeUrl()} target="_blank" external>
36+
{i18n.translate('xpack.ingestPipelines.list.table.emptyPromptDocumentionLink', {
37+
defaultMessage: 'Learn more',
38+
})}
39+
</EuiLink>
40+
</p>
41+
}
42+
actions={
43+
<EuiButton href={`#${BASE_PATH}/create`} iconType="plusInCircle" fill>
44+
{i18n.translate('xpack.ingestPipelines.list.table.emptyPrompt.createButtonLabel', {
45+
defaultMessage: 'Create a pipeline',
46+
})}
47+
</EuiButton>
48+
}
49+
/>
50+
</EuiPageContent>
51+
</EuiPageBody>
52+
);
53+
};

0 commit comments

Comments
 (0)