Update doc links for Ingest Pipelines UI (#125456)

https://github.com/elastic/kibana/pull/101216 adds a new ECS mapper feature to the Ingest Pipelines UI. This makes some related changes:

* Updates the doc link anchor text for the **Create pipeline from CSV** page to "CSV to pipeline docs".
* Updates the doc link for the **Create pipeline from CSV** page to link to a related tutorial.
* Updates the doc link for the **Create pipeline** page to link to the ingest pipeline docs. Previously, this linked to the create pipeline API docs, which aren't particularly relevant.
This commit is contained in:
James Rodewig 2022-02-24 08:14:01 -05:00 committed by GitHub
parent dce145b7b1
commit b2475b95b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 10 deletions

View file

@ -544,6 +544,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
lowercase: `${ELASTICSEARCH_DOCS}lowercase-processor.html`,
pipeline: `${ELASTICSEARCH_DOCS}pipeline-processor.html`,
pipelines: `${ELASTICSEARCH_DOCS}ingest.html`,
csvPipelines: `${ELASTIC_WEBSITE_URL}guide/en/ecs/${DOC_LINK_VERSION}/ecs-converting.html`,
pipelineFailure: `${ELASTICSEARCH_DOCS}ingest.html#handling-pipeline-failures`,
processors: `${ELASTICSEARCH_DOCS}processors.html`,
remove: `${ELASTICSEARCH_DOCS}remove-processor.html`,

View file

@ -66,7 +66,7 @@ describe('<PipelinesCreateFromCsv />', () => {
expect(find('pageTitle').text()).toEqual('Create pipeline from CSV');
expect(exists('documentationLink')).toBe(true);
expect(find('documentationLink').text()).toBe('Create pipeline docs');
expect(find('documentationLink').text()).toBe('CSV to pipeline docs');
});
describe('form validation', () => {

View file

@ -85,7 +85,7 @@ export const PipelinesCreate: React.FunctionComponent<RouteComponentProps & Prop
<EuiButtonEmpty
size="s"
flush="right"
href={services.documentation.getPutPipelineApiUrl()}
href={services.documentation.getCreatePipelineUrl()}
target="_blank"
iconType="help"
data-test-subj="documentationLink"

View file

@ -171,14 +171,14 @@ export const PipelinesCreateFromCsv: React.FunctionComponent<RouteComponentProps
<EuiButtonEmpty
size="s"
flush="right"
href={services.documentation.getPutPipelineApiUrl()}
href={services.documentation.getCreatePipelineCSVUrl()}
target="_blank"
iconType="help"
data-test-subj="documentationLink"
>
<FormattedMessage
id="xpack.ingestPipelines.create.docsButtonLabel"
defaultMessage="Create pipeline docs"
id="xpack.ingestPipelines.createFromCSV.docsButtonLabel"
defaultMessage="CSV to pipeline docs"
/>
</EuiButtonEmpty>,
]}

View file

@ -134,7 +134,7 @@ export const PipelinesEdit: React.FunctionComponent<RouteComponentProps<MatchPar
<EuiButtonEmpty
size="s"
flush="right"
href={services.documentation.getPutPipelineApiUrl()}
href={services.documentation.getCreatePipelineUrl()}
target="_blank"
iconType="help"
data-test-subj="documentationLink"

View file

@ -12,7 +12,8 @@ export class DocumentationService {
private ingestNodeUrl: string = '';
private processorsUrl: string = '';
private handlingFailureUrl: string = '';
private putPipelineApiUrl: string = '';
private createPipelineUrl: string = '';
private createPipelineCSVUrl: string = '';
private simulatePipelineApiUrl: string = '';
private enrichDataUrl: string = '';
private geoMatchUrl: string = '';
@ -29,7 +30,8 @@ export class DocumentationService {
this.ingestNodeUrl = links.ingest.pipelines;
this.processorsUrl = links.ingest.processors;
this.handlingFailureUrl = links.ingest.pipelineFailure;
this.putPipelineApiUrl = links.apis.createPipeline;
this.createPipelineUrl = links.ingest.pipelines;
this.createPipelineCSVUrl = links.ingest.csvPipelines;
this.simulatePipelineApiUrl = links.apis.simulatePipeline;
this.enrichDataUrl = links.ingest.enrich;
this.geoMatchUrl = links.ingest.geoMatch;
@ -55,8 +57,12 @@ export class DocumentationService {
return this.handlingFailureUrl;
}
public getPutPipelineApiUrl() {
return this.putPipelineApiUrl;
public getCreatePipelineUrl() {
return this.createPipelineUrl;
}
public getCreatePipelineCSVUrl() {
return this.createPipelineCSVUrl;
}
public getSimulatePipelineApiUrl() {