-
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
[Canvas] Adds references extract/inject for Workpads #109874
Conversation
…injection to workpads
Pinging @elastic/kibana-presentation (Team:Presentation) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
code LGTM
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.
This is great-looking PR. I'm going to approve to unblock you and test more this afternoon. If you end up merging, I'll file a bug if I find one. Great work here!
@elasticmachine merge upstream |
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.
Kibana-app code lgtm 🆗
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
History
To update your PR or re-run it, just comment with: |
💔 Backport failed
To backport manually run: |
* Register embeddable functions server side. Adds reference extraction/injection to workpads * Clean up * Fix Types * Update API docs * Remove API doc from expression (bad conflict resolution) Co-authored-by: Kibana Machine <[email protected]> # Conflicts: # src/plugins/embeddable/kibana.json # x-pack/plugins/canvas/canvas_plugin_src/functions/external/index.ts
* Register embeddable functions server side. Adds reference extraction/injection to workpads * Clean up * Fix Types * Update API docs * Remove API doc from expression (bad conflict resolution) Co-authored-by: Kibana Machine <[email protected]> # Conflicts: # src/plugins/embeddable/kibana.json # x-pack/plugins/canvas/canvas_plugin_src/functions/external/index.ts
Summary
This PR adds inject/extract functionality for references on a Canvas Workpad.
I introduce some workpad CRUD methods onto a request context so that they will be available on all of our routes using the appropriately scoped Saved Objects Client. These methods also implement the reference inject/extract where needed.
Because the inject/extract happens server side, we need to make sure that any function that is going to need extract is available server side as well, so this also required some changes to our embeddable functions to only use code that will run server side (it was previously importing some code from /public dirs and that would crash Kibana start up).
This also touches a few other plugins to move around some of the previously mentioned imports that were in public dirs to make sure they are coming from common, so that they will work both client and server side.
Testing
Here are the important areas to test