Working with dashboards split into multiple files


I wondered if support for working with dashboard split into multiple pages, was on the roadmap, or maybe there is another way we are supposed to achieve this since PSU became a thing?.

Still working on figuring out how and where we can utilize PSU, so I’m still stuck in “this is how we did it in UD”.

Product: PowerShell Universal
Version: 2.9.2

Would this be solved by using the Pages component in a dashboard?
Pages - PowerShell Universal

1 Like

Thanks, coincidentally, I started going that road when I posted. But I guessed there might more more ways to solve this.

I do not use Pages as StuartA mentioned, but I do break my dashboard up into pages using code similar to below.

$Pages = @()
$Pages += New-UDPage -Name "Home Page" -Content { . "$PSScriptRoot\Home.ps1" } -Title "Home Page" -Url 'home' -DefaultHomePage
$Pages += New-UDPage -Name 'Page 1'    -Content { . "$PSScriptRoot\Page1.ps1" }
$Pages += New-UDPage -Name 'Page 2'    -Content { . "$PSScriptRoot\Page2.ps1" }

New-UDDashboard -Pages $Pages
1 Like

Just like in UD, though what I’m missing is a way to work with that from the admin dashboard.

Ah. I’m not familiar with a way to work with those pages like the Page designer. If you are looking to edit the code in the admin dashboard, I would suspect you can via Automation | Scripts.

I design everything in vscode.