Skip to content
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 Manager] Allow custom redirects when the "Integrations - package - create datasource" for the Save (successful) and Cancel actions #68914

Closed
paul-tavares opened this issue Jun 11, 2020 · 3 comments · Fixed by #68955
Assignees
Labels
Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@paul-tavares
Copy link
Contributor

Describe the feature:
Change the "Integrations > {package-version > create datasource" page to support custom redirects for the Cancel and Save buttons, in order to support reusing of this functionality from other apps and support a more seamless integration.

Describe a specific use case for the feature:
Endpoint Security would like to provide its users with an action that allows them to create a new Datasource in Ingest, and then be redirected back to Endpoint page upon that datasource being created successfully or the user clicks cancel.

@paul-tavares paul-tavares added Team:Endpoint Management Team:Fleet Team label for Observability Data Collection Fleet team labels Jun 11, 2020
@paul-tavares paul-tavares self-assigned this Jun 11, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/endpoint-management (Team:Endpoint Management)

@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@paul-tavares
Copy link
Contributor Author

The following implementation design was done in support of this use case:

The browser's history.pushState() (via ReactRouter's history.push() is leveraged as the mechanism for supporting passing internal state/information between Kibana apps. For this to work, the Datasource Create page was modified to look for a set of known properties in the route's state, which will then change the behavior of the Cancel Button, the Cancel back link as well as a successful save.

Due to the fact that Ingest Manager is still utilizing a Hash Router and thus is not able to use the ScoppedHistory instance provided by the Kibana Application Mount Parameters, a custom Context component was implement that will allow for any route state provided from another app to be passed along to the Ingest hash route.

These changes were implemented for the Datasource Create page, but with this framework in place, other areas of Ingest could now leverage this same approach in order to support more integrated flows while maximizing code/functionality reuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants