Created
October 2, 2019 17:29
-
-
Save adamdriscoll/eb1a48c8396d53e62b8a9ac84f55d0bd to your computer and use it in GitHub Desktop.
Using PSWriteHtml and Universal Dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module PSWriteHTML | |
New-HTML -TitleText 'My diagram' -UseCssLinks -UseJavaScriptLinks -FilePath $PSScriptRoot\pswritehtml\diagram.html { | |
New-HTMLPanel { | |
New-HTMLDiagram { | |
New-DiagramNode -Label 'One node' -To 'Second node','Third node' -ColorBackground Bisque | |
New-DiagramNode -Label 'Second node' | |
New-DiagramNode -Label 'Third node' | |
} | |
} | |
} | |
$Folder = Publish-UDFolder -Path "$PSScriptRoot/pswritehtml" -RequestPath "/pswritehtml" | |
Start-UDDashboard -Dashboard (New-UDDashboard -Title 'Dashboard' -Content { | |
New-UDElement -Tag 'iframe' -Attributes @{ | |
style = @{ | |
height = '100ch' | |
width = '100%' | |
} | |
src = "/pswritehtml/diagram.html" | |
} | |
}) -Port 10000 -Force -PublishedFolder $Folder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment