-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Ingest pipelines] Implement tabs in processor flyout (#74469)
- Loading branch information
1 parent
59dd3a5
commit 733de00
Showing
20 changed files
with
159 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...pipeline_processors_editor/components/manage_processor_form/processor_settings_fields.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { FunctionComponent } from 'react'; | ||
import { EuiHorizontalRule } from '@elastic/eui'; | ||
|
||
import { FormDataProvider } from '../../../../../shared_imports'; | ||
import { ProcessorInternal } from '../../types'; | ||
|
||
import { getProcessorDescriptor } from '../shared'; | ||
import { CommonProcessorFields, ProcessorTypeField } from './processors/common_fields'; | ||
import { Custom } from './processors/custom'; | ||
|
||
export interface Props { | ||
processor?: ProcessorInternal; | ||
} | ||
|
||
export const ProcessorSettingsFields: FunctionComponent<Props> = ({ processor }) => { | ||
return ( | ||
<> | ||
<ProcessorTypeField initialType={processor?.type} /> | ||
|
||
<EuiHorizontalRule /> | ||
|
||
<FormDataProvider pathsToWatch="type"> | ||
{(arg: any) => { | ||
const { type } = arg; | ||
|
||
if (type?.length) { | ||
const formDescriptor = getProcessorDescriptor(type as any); | ||
|
||
if (formDescriptor?.FieldsComponent) { | ||
return ( | ||
<> | ||
<formDescriptor.FieldsComponent /> | ||
<CommonProcessorFields /> | ||
</> | ||
); | ||
} | ||
return <Custom defaultOptions={processor?.options} />; | ||
} | ||
|
||
// If the user has not yet defined a type, we do not show any settings fields | ||
return null; | ||
}} | ||
</FormDataProvider> | ||
</> | ||
); | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.