Hello,
I’m trying to create a dashboard, to manage some Powershell scripts. I successfully created a login form and can login and open a dynamic page, lets say my dashboard.
Source: https://github.com/ironmansoftware/universal-dashboard/blob/master/examples/login-pages/forms.ps1
Now I’m trying to create a page and I want to use the $username variable to set some variables and authorization. But as far as I can see I only can use the $username variable on dynamic pages, is it possible to create a link to dynamic pages in the menu?
A simple but example code for now:
$LoginPage = New-UDLoginPage -AuthenticationMethod $FormLogin
$DashboardPage_Static = New-UDPage -Name 'Static' -Icon cloud -content {
New-UDCard -Title "Welcome, $User" -Text "This is your custom dashboard."
}
$DashboardPage_Dynamic = New-UDPage -Url "/Dynamnic" -Endpoint {
New-UDCard -Title "Welcome, $User" -Text "This is your custom dashboard."
}
$Dashboard = New-UDDashboard -LoginPage $LoginPage -Page @(
$DashboardPage_Dynamic,
$DashboardPage_Static
)
Start-UDDashboard -Dashboard $Dashboard -Port 1000 -AllowHttpForLogin