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?
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
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.