Update open-dashboards.ps1

This commit is contained in:
Markus Fleschutz 2023-04-07 19:24:35 +02:00
parent 4408b5157a
commit 1eba16843f

View File

@ -13,13 +13,17 @@
try {
$stopWatch = [system.diagnostics.stopwatch]::startNew()
Write-Progress "Opening Web dashboards in your browser..."
Write-Progress "Loading Data/popular-dashboards.csv..."
$Table = Import-CSV "$PSScriptRoot/../Data/popular-dashboards.csv"
$NumRows = $Table.Length
foreach($Row in $Table) {
& "$PSScriptRoot/open-default-browser.ps1" "$Row.URL"
$Name = $Row.NAME
$URL = $Row.URL
Write-Progress "⏳ Opening $Name in your browser..."
& "$PSScriptRoot/open-default-browser.ps1" "$URL"
Start-Sleep -milliseconds 100
}
Write-Progress -completed "."
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✅ Opened $NumRows Web dashboards in $elapsed sec (use switch-tabs.ps1 to switch the tabs automatically)"
exit 0 # success