iFrame
Iframe component for PowerShell Universal pages.
Available in PowerShell Universal 2.5 or later.
Iframes provide the ability to nest another website within the page. The is especially useful if you wish to embed a dashboard within a page.

Embed a Dashboard in a Page

To embed a dashboard in a page, assume we have a dashboard that is defined such as this. This dashboard returns a table of services. It uses the -Blank parameter on New-UDPage to remove the header. This dashboard is configured with a base URL of /embed
1
New-UDDashboard -Title "Services" -Pages @(
2
New-UDPage -Name 'Table' -Content {
3
New-UDTable -Data (Get-Service)
4
} -Blank
5
)
Copied!
Add a new IFrame component to the page and within the properties of the page, set the URL to the base URL of the dashboard.
When the page loads, it will load the dashboard and display it within the page.

Limitations

When you embed multiple dashboards within a page they will be treated an individual dashboards and will not communicate event handling code. This means that display toasts and modals will appear within the IFrame and not in the parent code.
Last modified 25d ago