Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Start-UDDashboard -port $i -Content {
- New-UDDashboard -NavbarLinks $NavBarLinks -Title "PowerShell Pro Tools Universal Dashboard" -NavBarColor '#011721' -NavBarFontColor "#CCEDFD" -BackgroundColor "#66C7F6" -FontColor "#011721" -Content {
- New-UDRow {
- $Printers = Get-Content .\printers.json | ConvertFrom-Json
- foreach ($Printer in $Printers) {
- $Toner = $Printer.Toner
- New-UDColumn -Size 3 {
- New-UDChart -Title $Printer.Name -type Bar @Colors -RefreshInterval 3 -AutoRefresh -Verbose -Endpoint {
- $Toner | ForEach-Object {
- [PSCustomObject]@{'Black' = $_.Black;'Cyan' = $_.Cyan;'Magenta' = $_.Magenta;'Yellow' = $_.Yellow;}
- } | Out-UDChartData -Verbose -LabelProperty "Name" -Dataset @(
- New-UDChartDataset -DataProperty "Black" -Label "Black" -BackgroundColor "#080e1c" -HoverBackgroundColor "#080e1c"
- New-UDChartDataset -DataProperty "Cyan" -Label "Cyan" -BackgroundColor "#42d4f4" -HoverBackgroundColor "#42d4f4"
- New-UDChartDataset -DataProperty "Magenta" -Label "Magenta" -BackgroundColor "#ce3ef2" -HoverBackgroundColor "#ce3ef2"
- New-UDChartDataset -DataProperty "Yellow" -Label "Yellow" -BackgroundColor "#f1d03e" -HoverBackgroundColor "#f1d03e"
- )
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement