Get Kibana link after Dashboard interaction

Hey,

currently i embedded the Kibana Dashboard with an iFrame. Now i want to get the Link which i set at the src attribute (the link you can also copy when pressing the share button on the original dashboard). The problem is: When i get the src attribute from the iFrame, it is the Link i set at the very beginning, but i want the Link which is currently shown. So when i set a specific timespan or added a filter it should normally be inside of the link somewhere but i just get the default Link.

How can i get the Kibana link if it's embedded with an iframe?

Hey,

this is only possible if the Kibana and the UI, where you place the iFrame, are served from the same Domain. For security reasons, browsers forbid talking anyhow with content within the iFrame, if they are not served from the same domain.

If you somehow manage to get them running on the same domain (which would of course also include the port!), you could get the current URL as follows:

document.getElementById('kibana_iframe_id').contentWindow.location.href

If you are not running on the same domain, browsers won't allow you anyhow to get the current URL.

Cheers,
Tim

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