Skip to content

Embed

Another web page in a tile: a Grafana panel, a report, the web interface of a machine. It runs in a sandbox (an iframe with limited permissions): by default it can run scripts and submit forms, but it can’t open pop-ups or act as its own site (cookies, logins).

Property Type Default Description
label string Optional title; without it the page fills the whole tile
icon string Lucide icon before the title
src (node config) string Page URL: https://… or a path (/grafana/d/…)
allowScripts boolean true Let the page run JavaScript
allowForms boolean true Let the page submit forms
allowPopups boolean false Let the page open pop-ups and new tabs
allowSameOrigin boolean false Let the page keep its origin: cookies, logins, storage

The tile tells the page which theme the dashboard is using, so an embedded page can match it. On load and every time the theme changes, the widget posts a message to the frame (the page is not reloaded):

// in the embedded page
addEventListener('message', (e) => {
if (e.data?.tessera === 'theme') document.documentElement.dataset.theme = e.data.theme; // 'dark' | 'light'
});

Check e.source === parent if you want to ignore other senders. Pages that don’t listen simply ignore it; the message carries nothing but dark or light. The example flow’s report page (Media & forms) does exactly this.

msg.payload = 'https://grafana.plant.local/d-solo/abc?panelId=2'; // show this page
msg.payload = null; // clear