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

Core: Expose getUrlForApp on server side #59478

Closed
stacey-gammon opened this issue Mar 5, 2020 · 3 comments
Closed

Core: Expose getUrlForApp on server side #59478

stacey-gammon opened this issue Mar 5, 2020 · 3 comments
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@stacey-gammon
Copy link
Contributor

stacey-gammon commented Mar 5, 2020

This would be useful for moving the url generators to server side, to support alerting and chat ops use cases.

At minimum I need the basePath.

#59453

Any thoughts on whether this would be doable/easy?

@stacey-gammon stacey-gammon added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Mar 5, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@joshdover
Copy link
Contributor

joshdover commented Mar 5, 2020

Currently this is not possible because all of the applications are registered in client-side code. The server does not have any knowledge of which applications exist.

This has simplified most things, but it has also made other things a bit tricky. For instance, if a application needs to be mounted on a non-standard route (a route without the /app prefix), they currently have to register a backend route that renders the core bundle as well.

Having knowledge about the applications that exist would eliminate this requirement. However, thus far this use-case isn't very common and it hasn't been much of a headache.

For the alerting use case, could we not have a generic endpoint that accepts an application ID along with some parameters that then gets used to redirect to the corresponding application once the frontend boots up.

A flow like this is what I'm imagining:

  • Alert fires a notification with a URL like https://mykibana.com/app/open?app=apm&param1=foo&param2=bar
  • Kibana backend serves up the regular Core bundle and mounts the "open" app
  • The open app calls the appropriate URL generator function for the "apm" app and redirects the user to that app: https://mykibana.com/app/apm...

@stacey-gammon
Copy link
Contributor Author

Ah, thanks, this sounds very similar to the service @lukeelmers was suggesting. and actually, I think this may greatly simplify things if we do this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

3 participants