I’m so very very stuck.
I have gone through so many guides, videos and examples. But very few of them seem to be complete.
I’m currently trying to create a menu to several pages.
I understand that the new-udpage command accepts -url as a parameter. But it doesn’t seem that the list item for the menu does?
New-UDListItem -Label “Reset password” -OnClick {}
Here’s the code that I have. But it’s not working as I’m obviously doing something wrong. I’m also having issues with intelisense in VSCode so figuring out what commands support what parameters has been hit and miss.
$Navigation = @(
New-UDListItem -Label "Home"
New-UDListItem -Label "Active directory" -Children {
New-UDListItem -Label "Check user" -OnClick {}
New-UDListItem -Label "Reset password" -OnClick {}
New-UDListItem -Label "Get last login" -OnClick {}
New-UDListItem -Label "User numbers" -OnClick {}
}
)
$Pages = @()
$Pages += New-UDPage -Name ‘Check user’ -Url “check-user” -Content {
New-UDTypography -Text “Hello”
} -NavigationLayout permanent -Navigation $Navigation
$Pages += New-UDPage -Name ‘reset password’ -Url “reset-password” -Content {
New-UDTypography -Text "Hello"
} -NavigationLayout permanent -Navigation $Navigation
New-UDDashboard -Pages $Pages -Title “DCU Active Directory” -Content {
import-module "C:\Program Files (x86)\WindowsPowerShell\Modules\DCU\DCU.psd1"
New-UDForm -content {
New-UDTextbox -Id "Username" -Label "Username" -Placeholder Username
} -OnSubmit {
$UserDetails = Get-DCUUserDetails -UserName $EventData.Username
New-UDRow {
New-UDColumn -size 6 -content {
new-udTable -Data $UserDetails
}
}
}
} -NavigationLayout permanent -Navigation $Navigation