-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 Node Pipelines] Refactor pipeline simulator code #72328
Changes from all commits
5a4dfa8
de7bd10
d012f0e
05ebb2a
1749aee
be2e246
18e1a3d
8035de2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ import { Processor } from '../../../../common/types'; | |
import { getUseField, getFormRow, Field, useKibana } from '../../../shared_imports'; | ||
|
||
import { | ||
PipelineProcessorsContextProvider, | ||
ProcessorsEditorContextProvider, | ||
GlobalOnFailureProcessorsEditor, | ||
ProcessorsEditor, | ||
OnUpdateHandler, | ||
|
@@ -29,8 +29,6 @@ interface Props { | |
onLoadJson: OnDoneLoadJsonHandler; | ||
onProcessorsUpdate: OnUpdateHandler; | ||
hasVersion: boolean; | ||
isTestButtonDisabled: boolean; | ||
onTestPipelineClick: () => void; | ||
onEditorFlyoutOpen: () => void; | ||
isEditing?: boolean; | ||
} | ||
|
@@ -45,8 +43,6 @@ export const PipelineFormFields: React.FunctionComponent<Props> = ({ | |
onProcessorsUpdate, | ||
isEditing, | ||
hasVersion, | ||
isTestButtonDisabled, | ||
onTestPipelineClick, | ||
onEditorFlyoutOpen, | ||
}) => { | ||
const { services } = useKibana(); | ||
|
@@ -125,20 +121,18 @@ export const PipelineFormFields: React.FunctionComponent<Props> = ({ | |
|
||
{/* Pipeline Processors Editor */} | ||
|
||
<PipelineProcessorsContextProvider | ||
<ProcessorsEditorContextProvider | ||
onFlyoutOpen={onEditorFlyoutOpen} | ||
links={{ esDocsBasePath: services.documentation.getEsDocsBasePath() }} | ||
api={services.api} | ||
toasts={services.notifications.toasts} | ||
Comment on lines
+127
to
+128
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see we are using the Kibana context provider here. I think it would be cool to add that as a dependency for the processors editor component. So in tests it would become:
That way we can get rid of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great point. I agree. I'd like to get this PR in since it's needed for any subsequent PRs related to the pipeline simulation, but will definitely address in the next pass. |
||
onUpdate={onProcessorsUpdate} | ||
value={{ processors, onFailure }} | ||
> | ||
<div className="pipelineProcessorsEditor"> | ||
<EuiFlexGroup gutterSize="m" responsive={false} direction="column"> | ||
<EuiFlexItem grow={false}> | ||
<ProcessorsHeader | ||
onLoadJson={onLoadJson} | ||
onTestPipelineClick={onTestPipelineClick} | ||
isTestButtonDisabled={isTestButtonDisabled} | ||
/> | ||
<ProcessorsHeader onLoadJson={onLoadJson} /> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<ProcessorsEditor /> | ||
|
@@ -154,7 +148,7 @@ export const PipelineFormFields: React.FunctionComponent<Props> = ({ | |
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</div> | ||
</PipelineProcessorsContextProvider> | ||
</ProcessorsEditorContextProvider> | ||
</> | ||
); | ||
}; |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the global flyout will also enable us to remove this prop which would be great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I was thinking the same.