Is there anyway to embed 3rd party page (eg: kibana’s visualize) in superset dashboard? #29929
Replies: 2 comments 3 replies
-
Hey @poweronlevel! I'm here to help you with any questions or issues you have. Feel free to ask me anything! Yes, you can embed third-party pages, such as Kibana's visualizations, in a Superset dashboard using iframes. Here is an example of how you can embed a third-party page using an iframe: async function embedThirdPartyPage({
url,
mountPoint,
iframeTitle = "Embedded Page",
iframeSandboxExtras = []
}: {
url: string,
mountPoint: HTMLElement,
iframeTitle?: string,
iframeSandboxExtras?: string[]
}): Promise<void> {
const iframe = document.createElement('iframe');
// set up the iframe's sandbox configuration
iframe.sandbox.add("allow-same-origin"); // needed for postMessage to work
iframe.sandbox.add("allow-scripts"); // obviously the iframe needs scripts
iframe.sandbox.add("allow-presentation"); // for fullscreen charts
iframe.sandbox.add("allow-downloads"); // for downloading charts as image
iframe.sandbox.add("allow-forms"); // for forms to submit
iframe.sandbox.add("allow-popups"); // for exporting charts as csv
// additional sandbox props
iframeSandboxExtras.forEach((key: string) => {
iframe.sandbox.add(key);
});
iframe.src = url;
iframe.title = iframeTitle;
//@ts-ignore
mountPoint.replaceChildren(iframe);
console.log('placed the iframe');
}
// Usage example
embedThirdPartyPage({
url: 'https://kibana.example.com/visualization',
mountPoint: document.getElementById('iframe-container')
}); This code sets up an iframe with the necessary sandbox attributes and embeds the specified URL into the provided HTML element. You can replace the |
Beta Was this translation helpful? Give feedback.
-
Hi, you should be able to add an iframe as a markdown chart type in your dashboard. |
Beta Was this translation helpful? Give feedback.
-
I have made some visualizes in kibana , and would like to integrate these kibana visualizes into superset.
does superset support embedding third party pages by way of iframes?
Beta Was this translation helpful? Give feedback.
All reactions