No longer possible to Embed the Discover page?

My company has been using Elasticsearch and Kibana for years. We are currently running version 8.8.2, but need to upgrade due to CVEs in that version. I've been tasked to upgrade to 8.12.1.

In our product, we embed Kibana dashboards and the Kibana discover page in our Administrative Tools GUI. We don't allow our customer access to other Kibana functions in our GUI.

Since at least Kibana 5.x, we've been able to embed dashboards and the Discover page using a URL like this:

https://aln-nbadev4.labs.server.com:8443/admin/api/kibana/app/discover#/?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-15m,mode:quick,to:now))&embed=true&_a=h@1cb4551

This would display the dashboard or Discover in our frame. However, in 8.12.1 (and I tried 8.11.4 too), the Discover page looks like this:

We get this very abbreviated display (with no bar chart) on Firefox, Chrome, and MS Edge.

I discovered that if I took out the "&embed=true" parameter, then the Discover screen appears normal again. However, we get the Elastic help bar and the Kibana main menu, which we do not want.

Is it no longer possible to embed the Discover page? Have you discontinued the old way of embedding, and now you have to embed only using this method?

Hi @silentfilm,

How does it look for you in 8.8.2?


With Elasticsearch/Filebeat/Kibana 8.8.2...

I would suggest to check styles of your iframe. Based on the first screenshot, it does not have enough height especially for the chart to render fully.

But I have not changed anything in my Java or JavaScript code at all, except to upgrade the Elasticsearch and Kibana versions.

And if this was a style issue, why does the screen display correctly when I click on the Fullscreen fullscreen icon? If I click on it again the display is incorrect again.

I checked the javascript code and I only see the size of the margins being set, not the size of the window.

It seems like the top bar chart showing the number of occurrences for each minute can no longer be embedded.

Do I need to open a bug issue on Github?

I found more information on embedding dashboards at How to embed Kibana dashboards | Elastic Blog. I will try using some of those parameters, specifically the "height" parameter when I can get ES 8.12.1 loaded up again. Maybe it is required now.

I tried setting the length of the iframe where the Discover screen appears, but the Discover screen ignored it and the display was still incorrect and way too short. It still briefly displays correctly before showing the thin window that is not usable.

I found the global setting doc_table:legacy and set that to true, and my embedded Discover screen immediately started working. So the new Discover screen does not work when it is embedded. I can understand why this wasn't tested because the Discover screen doesn't have a Share -> Embed menu option like the dashboards do. But we've been embedding dashboards and the Discover screen the same way for five or six years and the new Discover screen does not display when embedded.

Since the legacy version is embed-able and the new version functions correctly in that you can browse data, but can't embed and display that data, I still say that this is a bug.

And this Advanced Setting cannot be configured via my kibana.yml file. Is this forum post from 2016 still true? It doesn't seem to work for me, possibly because the API has been deprecated.

The new Discover page cannot be embedded due to a bug that makes the screen too short to be usable.

If you set the Kibana Advanced Setting for " Document Explorer or classic view" to true then you can embed the "classic" Explorer page. In 8.8.2 and earlier versions, this defaulted to true, but in 8.12.x the default is false.

Add the code below to your kibana.yml file to set the default to the classic view:

uiSettings:
  overrides:
    "doc_table:legacy": true

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