-
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 Pipeline] Provide url params to use ingestPipeline UI from Fleet #134776
[Ingest Pipeline] Provide url params to use ingestPipeline UI from Fleet #134776
Conversation
50b6d43
to
70c32bc
Compare
70c32bc
to
20c2a8f
Compare
Pinging @elastic/fleet (Team:Fleet) |
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx
Outdated
Show resolved
Hide resolved
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.
Hi @nchaulet! Thanks for taking this on.
I left a couple comments in the code around naming. Let me know what you think.
I also have a few questions after testing:
- How will the custom pipeline names be generated from Fleet? Will we ever run into a situation where the user is taken to the create pipeline page, and the pipeline already exists? Seems like that could be a poor UX since the name is not editable, but I don't have a clear understanding of the full flow.
- Once this is implemented on the Fleet side, will the
redirect_path
include the base path, i.e.,/czy/app/fleet
instead of/app/fleet
? The current example in your PR description returns a 404.
- What is the expected behavior for the following comment? I currently see a 404 and the query param displays in the flyout.
then you can test the following urls and you should be redirect in fleet on save or close
/app/management/ingest/ingest_pipelines/?pipeline=logs-system.syslog@custom?redirect_path=/app/fleet
@@ -27,6 +27,7 @@ export interface PipelineFormProps { | |||
saveError: any; | |||
defaultValue?: Pipeline; | |||
isEditing?: boolean; | |||
canEditName?: boolean; |
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.
At the moment, I can't think of many use cases where we would want to disallow editing the pipeline name on create (generally speaking, what's allowed via the ES API we don't block in the UI). That said, do you think it makes more sense to name this prop specific to fleet, something like isIntegrationPipeline
?
Or, if we leave as-is, I think it might be helpful to add a code comment explaining its usage.
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.
I am in favor of adding a comment here, to avoid to much fleet specifity here.
x-pack/plugins/ingest_pipelines/public/application/hooks/redirect_path.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/ingest_pipelines/public/application/hooks/redirect_path.test.tsx
Outdated
Show resolved
Hide resolved
One more thing - do you think you could add client integration tests for this flow as well? Let me know if you need any help with this. Thanks! |
@alisonelizabeth thanks for the review
we have a convention to create the name in Fleet, and we will check if the custom pipeline exists before to show the user a create button or an edit one and send it to the correct ingest pipeline page.
Yes the
I made a mistake in the URL query parameter should be fixed |
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.
Thanks for addressing my feedback! I did not retest, but code changes LGTM.
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @nchaulet |
Summary
Related to #133740
In the Fleet UI we will link to the ingest pipeline UI to show, edit or create a new pipeline and we want users to be redirected to Fleet after interacting with ingest pipeline app.
That PR allow to do so by introducing a
redirect_path
query parameter for all the CRUD ingest pipeline pages and aname
parameter for the create pipeline page (when the name parameter is providedname
is not editable).Work in progress
How to manually test that PR
Until the workflow is completely implemented in Fleet you can test it like this
/app/management/ingest/ingest_pipelines/create?name=logs-system.syslog@custom&redirect_path=/app/fleet
the name should be prefilled and not editableOn save you should be redirected to fleet
/app/management/ingest/ingest_pipelines/?pipeline=logs-system.syslog@custom&redirect_path=/app/fleet
/app/management/ingest/ingest_pipelines/edit/logs-system.syslog@custom?redirect_path=/app/fleet