I can’t seem to get a custom footer to display anything via the -endpoint Does this function work in a footer?
Set-UDLicense -License (Get-Content $PSScriptRoot\license.txt -Raw)
$myFooter = New-UDFooter -Endpoint {
new-udcard -Size small -Content {
$env:username
}
}
$Dashboard = New-UDDashboard -title "Footer Test" -content {
new-udcard -Size small -Content {
$env:username
}
} -Footer $myFooter
Get-UDDashboard | Stop-UDDashboard
Start-UDDashboard -Dashboard $Dashboard -Port 10000 -AutoReload
Hey @boats2000 - UDFooter does not actually allow anything for -Endpoint or -Content.
it’s only params are:
- Links
- Copyright
- BackgroundColor
- FontColor
The only thing you can really do with it is specfy some text and links.
Docs article: https://docs.universaldashboard.io/components/footer
API (cmdlet) help: https://github.com/ironmansoftware/universal-dashboard-documentation/blob/master/api/New-UDFooter.md
Testing :
Get-UDDashboard | Stop-UDDashboard
$myFooter = New-UDFooter -Links @(
New-UDLink -Text "Link1" -Url "https://google.com"
New-UDLink -Text " Link2" -Url "https://google.com"
) -Copyright "COPYRIGHT ALLOWS YOU TO PLACE A LARGE AMOUNT OF TEXT" -BackgroundColor "#FF00A5" -FontColor "#FFFFFF"
$Dashboard = New-UDDashboard -title "Footer Test" -content {
new-udcard -Size small -Content {
"yo, this is my dashboard CARD"
}
} -Footer $myFooter
Start-UDDashboard -Dashboard $Dashboard -Port 10000
Powershell Documentation appears to contradict:
Powershell help shows (Get-Help ‘UDFooter’ -ShowWindow)
Syntax
New-UDFooter [-ArgumentList <Object>] [-AutoRefresh ] [-BackgroundColor ] [-Copyright ] [-Endpoint ] [-FontColor ] [-Id ] [-Links <Hashtable>] [-RefreshInterval ] []
As Endpoint does not appears to work, I am guessing this is bad info.
My Expecation is that the help in powershell should be the source of truth.
1 Like