diff --git a/PSBlitz.ps1 b/PSBlitz.ps1 index ec9213d..25c7dff 100644 --- a/PSBlitz.ps1 +++ b/PSBlitz.ps1 @@ -256,8 +256,8 @@ param( ###Internal params #Version -$Vers = "4.2.0" -$VersDate = "2024-06-10" +$Vers = "4.2.1" +$VersDate = "2024-06-11" $TwoMonthsFromRelease = [datetime]::ParseExact("$VersDate", 'yyyy-MM-dd', $null).AddMonths(2) $NowDate = Get-Date #Get script path @@ -276,7 +276,8 @@ $ResourceList = @("PSBlitzOutput.xlsx", "spBlitz_NonSPLatest.sql", "GetTempDBUsageInfo.sql", "GetOpenTransactions.sql", "GetStatsInfoForWholeDB.sql", "GetIndexInfoForWholeDB.sql", "GetDbInfo.sql", "GetAzureSQLDBInfo.sql", - "spBlitzQueryStore_NonSPLatest.sql", "searchtable.js", "sorttable.js") + "spBlitzQueryStore_NonSPLatest.sql", "searchtable.js", "sorttable.js", + "styles.css") #Set path+name of the input Excel file $OrigExcelF = $ResourcesPath + "\" + $OrigExcelFName #Set default start row for Excel output @@ -1309,52 +1310,8 @@ if ($ToHTML -eq "Y") {
+ @@ -1472,6 +1344,15 @@ if ($ToHTML -eq "Y") {$FileSOrder(_\d+)$QExt" $AnchorURL = ' | " + "$FileSOrder" + '$1' + "$QExt" $htmlTable4 = $htmlTable4 -replace $AnchorRegex, $AnchorURL @@ -2333,7 +2219,7 @@ $htmlTable2 $AnchorURL = '$&' $htmlTable1 = $htmlTable1 -replace $AnchorRegex, $AnchorURL $htmlTable2 = $AcTranTbl | Select-Object @{Name = "Query"; Expression = { $_."current_query" } }, - @{Name = "Query text"; Expression = { $_."current_sql" } } | Where-Object -FilterScript {$_."Query text" -ne [System.DBNull]::Value} | ConvertTo-Html -As Table -Fragment + @{Name = "Query text"; Expression = { $_."current_sql" } } | Where-Object -FilterScript { $_."Query text" -ne [System.DBNull]::Value } | ConvertTo-Html -As Table -Fragment $AnchorRegex = " | $FileSOrder(_\d+)$QExt" $AnchorURL = ' | " + "$FileSOrder" + '$1' + "$QExt" $htmlTable2 = $htmlTable2 -replace $AnchorRegex, $AnchorURL @@ -2345,7 +2231,7 @@ $htmlTable2 #@{Name = "Wait Category"; Expression = { $_."wait_category" } }, $htmlTable3 = $AcTranTbl | Select-Object @{Name = "Query"; Expression = { $_."most_recent_query" } }, - @{Name = "Query text"; Expression = { $_."most_recent_sql" } } | Where-Object -FilterScript {$_."Query text" -ne [System.DBNull]::Value} | ConvertTo-Html -As Table -Fragment + @{Name = "Query text"; Expression = { $_."most_recent_sql" } } | Where-Object -FilterScript { $_."Query text" -ne [System.DBNull]::Value } | ConvertTo-Html -As Table -Fragment $AnchorRegex = " | $FileSOrder(_\d+)$QExt" $AnchorURL = ' | " + "$FileSOrder" + '$1' + "$QExt"
$htmlTable3 = $htmlTable3 -replace $AnchorRegex, $AnchorURL
@@ -2578,6 +2464,8 @@ $htmlTable5
$JumpToTop
Database Scoped Configuration++$SortableTable $htmlTable6 $JumpToTop |