Integrate Kibana dashboard inside kibana plugin

What I want?

Am doing a plugin app, I want to have a menu called dashboard inside my plugin, while clicking on that I want to load a dashboard which is already defined in kibana.

What D did

I tried using iframe which loads kibana dashboard, Unfortunately, Iframe was not loading up due to CSP.

Is there any alternative/optimal solution to integrate fully functional kibana dashboard inside my kibana plugin?

Hi @pradeep_c8,

inn more recent versions the concept of embeddables and embeddable containers got introduced. An embeddable is everything that can be shown within the UI of something else (e.g. a visualization, a control, ...), and an embeddable container is something which can show one or multiple embeddables. The dashboard itself is such an embeddable container as it can show multiple embeddables (mostly visualizations). But a dashboard is also an embeddable itself, which means if there is a plugin that implements the dashboard container interface, it can render a dashboard which sounds like exactly the thing you need in your plugin.

In the Kibana repo there is an example plugin in test/plugin_functional/plugins/kbn_tp_embeddable_explorer that embeds a dashboard using the embeddable API. The most interesting parts are in test/plugin_functional/plugins/kbn_tp_embeddable_explorer/public/np_ready/public/app/dashboard_container_example.tsx

Looks interesting. So what will be the minimum version to make it work?

Am working with 6.x versions and planning to extend the support from 5.x to latest.. will this work for my scenario ?

No, this was added in 7.4 . Prior to 7.4 the code is not structured in a way that makes this kind of thing easy.

For earlier versions iframes are probably not the worst idea. You can relax the CSP rules if they get in your way, however you should be careful doing that to avoid weakening the security of Kibana.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.