Skip to content

Commit 2ee721c

Browse files
committed
rename doc button and refactor type map const name
1 parent 4f6c7c1 commit 2ee721c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface Props {
1313
docLink: string;
1414
}
1515

16-
export const LearnMoreFormButton: FunctionComponent<Props> = ({ processorLabel, docLink }) => {
16+
export const DocumentationButton: FunctionComponent<Props> = ({ processorLabel, docLink }) => {
1717
return (
1818
<EuiButtonEmpty size="s" flush="right" href={docLink} target="_blank" iconType="help">
1919
{i18n.translate(

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processor_settings_form/map_processor_type_to_form.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface FieldsFormDescriptor {
1919
label: string;
2020
}
2121

22-
const mapProcessorTypeToFormOrDocPath: Record<string, FieldsFormDescriptor> = {
22+
const mapProcessorTypeToFormDescriptor: Record<string, FieldsFormDescriptor> = {
2323
append: {
2424
FieldsComponent: undefined, // TODO: Implement
2525
docLinkPath: '/append-processor.html',
@@ -262,12 +262,12 @@ const mapProcessorTypeToFormOrDocPath: Record<string, FieldsFormDescriptor> = {
262262
},
263263
};
264264

265-
export const types = Object.keys(mapProcessorTypeToFormOrDocPath).sort();
265+
export const types = Object.keys(mapProcessorTypeToFormDescriptor).sort();
266266

267-
export type ProcessorType = keyof typeof mapProcessorTypeToFormOrDocPath;
267+
export type ProcessorType = keyof typeof mapProcessorTypeToFormDescriptor;
268268

269269
export const getProcessorFormDescriptor = (
270270
type: ProcessorType | string
271271
): FieldsFormDescriptor | undefined => {
272-
return mapProcessorTypeToFormOrDocPath[type as ProcessorType];
272+
return mapProcessorTypeToFormDescriptor[type as ProcessorType];
273273
};

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processor_settings_form/processor_settings_form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { Form, useForm, FormDataProvider } from '../../../../../shared_imports';
2222
import { usePipelineProcessorsContext } from '../../context';
2323
import { ProcessorInternal } from '../../types';
2424

25-
import { LearnMoreFormButton } from './learn_more_form_button';
25+
import { DocumentationButton } from './documentation_button';
2626
import { ProcessorSettingsFromOnSubmitArg } from './processor_settings_form.container';
2727
import { getProcessorFormDescriptor } from './map_processor_type_to_form';
2828
import { CommonProcessorFields, ProcessorTypeField } from './processors/common_fields';
@@ -83,7 +83,7 @@ export const ProcessorSettingsForm: FunctionComponent<Props> = memo(
8383

8484
if (formDescriptor) {
8585
return (
86-
<LearnMoreFormButton
86+
<DocumentationButton
8787
processorLabel={formDescriptor.label}
8888
docLink={esDocsBasePath + formDescriptor.docLinkPath}
8989
/>

0 commit comments

Comments
 (0)