Skip to content

Instantly share code, notes, and snippets.

@adamdriscoll
Created November 17, 2020 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamdriscoll/82ce4f37e6edb49148fd0a8a98c840e7 to your computer and use it in GitHub Desktop.
Save adamdriscoll/82ce4f37e6edb49148fd0a8a98c840e7 to your computer and use it in GitHub Desktop.
EventTimeLine example
$Path = Join-Path $Env:ProgramData "PowerShellUniversal"
$ExecutablePath = (Join-Path $Path "Universal.Server.exe")
Start-PSUServer -Port 5000 -Configuration {
New-PSUDashboard -Name 'Dashboard' -BaseUrl '/dashboard' -Framework "UniversalDashboard:Latest" -Content {
New-UDDashboard -Title 'Dashboard' -Content {
New-UDHelmet -Content {
New-UDHtmlTag -Tag 'link' -Attributes @{
rel = "stylesheet"
href = 'https://fonts.googleapis.com/icon?family=Material+Icons'
}
}
New-UDRow -Columns {
New-UDColumn -Size 5 -Content {
New-EventTimeline -Title "Begin Research" -Created "2020-11-17 10:14" -Icon "bug_report" -Text "Do some research on some more awesome looking react components you could build and release to the powershell gallery"
New-EventTimeline -Title "Found Component" -Created "2020-11-17 11:14" -Icon "av_timer" -Text "Found a timeline component that looks very interesting, you need to use this in combination with an existing universaldashboard module to get the icons to work properly."
New-EventTimeline -Title "Build Component" -Created "2020-11-17 12:54" -Icon "build_circle" -Text "Build and test this component"
New-EventTimeline -Title "Write A Blog On Component" -Created "2020-11-17 16:54" -Icon "check_circle" -Text "Need to write up a blog on how to use this component as getting the icon to actually display can be a bit tricky, so document it."
}
}
}
}
} -ExecutablePath $ExecutablePath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment