"
}
$HTML += "$SeriesName"
diff --git a/PSGallery/Private/New-HtmlReport.ps1 b/PSGallery/Private/New-HtmlReport.ps1
index bfabcf0..cbd1cb4 100755
--- a/PSGallery/Private/New-HtmlReport.ps1
+++ b/PSGallery/Private/New-HtmlReport.ps1
@@ -22,7 +22,8 @@ function New-HtmlReport {
David Brett 1.4 26/06/2018 Bug Fixes and Code Cleaning
Fixes #24
Fixes #40
- David Brett 1.5 21/08/2018 Bug fixes and naming clean up
+ David Brett 1.5 21/08/2018 Bug fixes and naming clean
+ Alex Spicola 1.6 11/09/2018 Worker donut site name, bug fixes
.EXAMPLE
None Required
#>
@@ -114,9 +115,9 @@ function New-HtmlReport {
foreach ($SeriesResult in $Results) {
if ("Worker" -ne $seriesresult.series) {
$totalinf ++
- }
+ }
}
- $totalinf--
+ if ($TotalInf -gt 1) {$totalinf--} else {$TotalInf = 1}
$ColumnPercent = 100 / [int]$totalinf
foreach ($SeriesResult in $Results) {
@@ -125,6 +126,7 @@ function New-HtmlReport {
$Width = $Height
$Up = 0
$Down = 0
+ $SiteName = "" # Blank XD site name, not used for these donuts
$Series = $SeriesResult.Series
if ($null -ne $series) {
if ( "Worker" -ne $Series ) {
@@ -144,7 +146,7 @@ function New-HtmlReport {
"NetScaler" {$NewSeries = "Citrix ADC"; break}
default {$NewSeries = $Series; break}
}
- Get-DonutHTML $Height $Width $UpColor $DownColor $DonutStroke $NewSeries $Up $Down | Out-File $HTMLOutputFileFull -Append
+ Get-DonutHTML $Height $Width $UpColor $DownColor $DonutStroke $SiteName $NewSeries $Up $Down | Out-File $HTMLOutputFileFull -Append
"" | Out-File $HTMLOutputFileFull -Append
}
}
@@ -172,6 +174,7 @@ function New-HtmlReport {
foreach ($SeriesResult in $Results) {
$DonutStroke = $ConfigObject.Global.WebData.WorkerDonutStroke
$Height = $ConfigObject.Global.WebData.WorkerDonutSize
+ $ShowSiteName = $ConfigObject.Global.WebData.WorkerSiteName
$Width = $Height
$Series = $SeriesResult.Series
@@ -189,7 +192,13 @@ function New-HtmlReport {
default {$NewName = $Series; break}
}
"| " | Out-File $HTMLOutputFileFull -Append
- Get-DonutHTML $Height $Width $UpColor $DownColor $DonutStroke $NewName $Up $Down -Worker | Out-File $HTMLOutputFileFull -Append
+ if ($ShowSiteName -eq $true) {
+ $SiteName = $CheckData.Values.SiteName | Select-Object -Unique
+ Get-DonutHTML $Height $Width $UpColor $DownColor $DonutStroke $SiteName $NewName $Up $Down -Worker | Out-File $HTMLOutputFileFull -Append
+ } else {
+ $SiteName = ""
+ Get-DonutHTML $Height $Width $UpColor $DownColor $DonutStroke $SiteName $NewName $Up $Down -Worker | Out-File $HTMLOutputFileFull -Append
+ }
" | " | Out-File $HTMLOutputFileFull -Append
}
}
diff --git a/Package/euc-monitoring-json-ref.txt b/Package/euc-monitoring-json-ref.txt
index f206d22..0e4883a 100644
--- a/Package/euc-monitoring-json-ref.txt
+++ b/Package/euc-monitoring-json-ref.txt
@@ -15,6 +15,7 @@
"htmldatafile": "htmldata.txt", - Can leave as default
"htmloutputfile": "index.html", - HTML Output File. can leave as default
"refreshduration": 0, - HTML Automatic page refresh, in seconds. 0 for no refresh
+ "WorkerSiteName": false, - Display XD site name in server and desktkop worker donuts
"UpColour": "rgba(221, 70, 70, 0.9)", - Color for Up Servers
"DownColour": "rgba(67, 137, 203, 0.95)", - Color for Down Servers.
"WorkerDonutStroke": 5, - Width for the Worker Donut Ring
diff --git a/Package/euc-monitoring.json.template b/Package/euc-monitoring.json.template
index 0dcd509..4fe7c30 100644
--- a/Package/euc-monitoring.json.template
+++ b/Package/euc-monitoring.json.template
@@ -15,6 +15,7 @@
"htmldatafile": "htmldata.txt",
"htmloutputfile": "index.html",
"refreshduration": 0,
+ "WorkerSiteName": false,
"UpColour": "rgba(221, 70, 70, 0.9)",
"DownColour": "rgba(67, 137, 203, 0.95)",
"WorkerDonutStroke": 5,
@@ -366,4 +367,4 @@
"SessionManagerProxy"
]
}
-}
\ No newline at end of file
+}