add API to embed visualizations#14292
Conversation
|
samples to play with: unzip to plugins folder to test, two new apps will appear in kibana
|
fdbc3e8 to
60c729d
Compare
|
The region maps and tile maps do not work, because they depend on two services that are injected with That is also what the error refers too: I am not 100% how this works, how we can ensure these are loaded when there's a dependency from outside plugin. Perhaps @spalger, is this something that rings a bell? |
|
I have some trouble getting the embedding working. I'm probably missing something obvious. I'll try more later. The module-API looks good though. fwiw, I'd make names a little more explicit: |
|
thanks @thomasneirynck i updated the sample apps and renamed the loader methods, should work out of the box now. |
f406fdb to
d188026
Compare
thomasneirynck
left a comment
There was a problem hiding this comment.
Nice!
I've removed the 6.0 label.
When merging, I'd also change the commit message to something more generic like "Add API to embed visualizations" or whatever
| }; | ||
|
|
||
| return { | ||
| embedVisualizationWithId: (el, savedVisualizationId, params) => { |
| 'time-range="timeRange" editor-mode="editorMode" show-spy-panel="showSpyPanel"></visualize>'); | ||
| const visHtml = $compile(visEl)(scope); | ||
| container.html(visHtml); | ||
| return visEl; |
There was a problem hiding this comment.
could we return undefined instead. What's the use-case of having client have access to the element?
There was a problem hiding this comment.
we need to be able to listen to renderComplete event
|
Hi, I tried to test the plugins provided in the zip but, in the visualization one, I get this in the browser's console: The branch I'm using is the 6.0, pulled just two hours ago. Regards. |
|
@havidarou those plugins are stale, and were part of the work-in-progress for this PR, not really meant for consumption. There's also a follow up to this issue here as well, so this component is still being added to here: #14404 When it comes to reusing visualizations, we are preparing a blog-post and additional documentation. We expect this to be out fairly soon, around the 6.0 release time frame. |
|
@thomasneirynck ok, thanks. Where will you publish the blog-post? Regards. |
Release Note: visualize loader helps with inserting visualizations into DOM elements
use the time range provided to visualize with timeRange attribute
currently date_histogram would correctly use that range, but courier still defaults to timefilter getActiveBounds
also removing the ability to provide saved-id to visualize as it didn't work properly
also adding a helper function to inject visualize into DOM element