diff --git a/CHANGELOG.md b/CHANGELOG.md index 594a98f..8a3eac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add Backup Infrastructure Diagram (WIP) - Close [#155](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/155) - Add vCD Resources to Service Provider section +- Add Backup Repository Space Utilization chart ### Changed diff --git a/Src/Private/Get-AbrVbrBackupRepository.ps1 b/Src/Private/Get-AbrVbrBackupRepository.ps1 index aa48976..5bd9d07 100644 --- a/Src/Private/Get-AbrVbrBackupRepository.ps1 +++ b/Src/Private/Get-AbrVbrBackupRepository.ps1 @@ -85,19 +85,27 @@ function Get-AbrVbrBackupRepository { try { $sampleData = $OutObj | Select-Object Name, 'Used Space %', 'Free Space %' - $CustomPalette = @( - [System.Drawing.ColorTranslator]::FromHtml('#565656') - [System.Drawing.ColorTranslator]::FromHtml('#DFF0D0') - ) - $CustomPalette1 = @( [System.Drawing.ColorTranslator]::FromHtml('#565656') ) - $CustomPalette2 = @( - [System.Drawing.ColorTranslator]::FromHtml('#DFF0D0') - ) - + if ($Options.ReportStyle -eq "Veeam") { + $CustomPalette = @( + [System.Drawing.ColorTranslator]::FromHtml('#565656') + [System.Drawing.ColorTranslator]::FromHtml('#DFF0D0') + ) + $CustomPalette2 = @( + [System.Drawing.ColorTranslator]::FromHtml('#DFF0D0') + ) + } else { + $CustomPalette = @( + [System.Drawing.ColorTranslator]::FromHtml('#565656') + [System.Drawing.ColorTranslator]::FromHtml('#d5e2ff') + ) + $CustomPalette2 = @( + [System.Drawing.ColorTranslator]::FromHtml('#d5e2ff') + ) + } $exampleChart = New-Chart -Name BKRepo -Width 600 -Height 600 -BorderStyle Dash -BorderWidth 1 -CustomPalette $CustomPalette -BorderColor DarkGreen $addChartAreaParams = @{ diff --git a/Src/Private/Get-AbrVbrDiagram.ps1 b/Src/Private/Get-AbrVbrDiagram.ps1 index aa02d33..bc721a1 100644 --- a/Src/Private/Get-AbrVbrDiagram.ps1 +++ b/Src/Private/Get-AbrVbrDiagram.ps1 @@ -494,7 +494,7 @@ function Get-AbrVbrDiagram { Edge -From $BackupServerInfo.Name -To VBRServerPointSpace @{minlen = 2; arrowtail = 'dot'; arrowhead = 'none'; style = 'dashed' } # Connect Veeam Proxies Server to the Dummy line - if ($Proxies | Where-Object { $_.Type -eq 'Vi' }) { + if ($Proxies | Where-Object { $_.AditionalInfo.Type -eq 'vSphere' }) { Edge -From VBRProxyPoint -To ViProxies @{minlen = 2; arrowtail = 'none'; arrowhead = 'dot'; style = 'dashed' } } else { Edge -From VBRProxyPoint -To HvProxies @{minlen = 2; arrowtail = 'none'; arrowhead = 'dot'; style = 'dashed' } @@ -517,7 +517,7 @@ function Get-AbrVbrDiagram { # Connect Veeam Scale-Out Backup Repository to the Dummy line if ($SOBR) { - Edge -From VBRRepoPointSpace -To SOBRRepo @{minlen = 2; arrowtail = 'dot'; arrowhead = 'none'; style = 'dashed' } + Edge -From VBRRepoPointSpace -To SOBRRepo @{minlen = 2; arrowtail = 'none'; arrowhead = 'dot'; style = 'dashed' } } } } diff --git a/Src/Private/SharedUtilsFunctions.ps1 b/Src/Private/SharedUtilsFunctions.ps1 index 1a2fdf3..1916c83 100644 --- a/Src/Private/SharedUtilsFunctions.ps1 +++ b/Src/Private/SharedUtilsFunctions.ps1 @@ -305,7 +305,13 @@ function Get-PieChart { [System.Drawing.ColorTranslator]::FromHtml('#005f4b') ) - $exampleChart = New-Chart -Name $ChartName -Width $Width -Height $Height -BorderStyle Dash -BorderWidth 1 -BorderColor DarkGreen + if ($Options.ReportStyle -eq "Veeam") { + $BorderColor = 'DarkGreen' + } else { + $BorderColor = 'DarkBlue' + } + + $exampleChart = New-Chart -Name $ChartName -Width $Width -Height $Height -BorderStyle Dash -BorderWidth 1 -BorderColor $BorderColor $addChartAreaParams = @{ Chart = $exampleChart @@ -441,7 +447,13 @@ function Get-ColumnChart { [System.Drawing.ColorTranslator]::FromHtml('#005f4b') ) - $exampleChart = New-Chart -Name $ChartName -Width $Width -Height $Height -BorderStyle Dash -BorderWidth 1 -BorderColor DarkGreen + if ($Options.ReportStyle -eq "Veeam") { + $BorderColor = 'DarkGreen' + } else { + $BorderColor = 'DarkBlue' + } + + $exampleChart = New-Chart -Name $ChartName -Width $Width -Height $Height -BorderStyle Dash -BorderWidth 1 -BorderColor $BorderColor $addChartAreaParams = @{ Chart = $exampleChart diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index 3ac512d..aea25c1 100644 --- a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -450,7 +450,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { # Backup Restore Points Section # #---------------------------------------------------------------------------------------------# if ($InfoLevel.Jobs.PSObject.Properties.Value -ne 0) { - if (((Get-VBRJob -WarningAction SilentlyContinue).count -gt 0) -or ((Get-VBRTapeJob).count -gt 0) -or ((Get-VBRSureBackupJob).count -gt 0)) { + if (((Get-VBRBackup -WarningAction SilentlyContinue).count -gt 0) -or ((Get-VBRTapeJob).count -gt 0) -or ((Get-VBRSureBackupJob).count -gt 0)) { Section -Style Heading2 'Backups Summary' { Paragraph "The following section provides information about the jobs restore points in Veeam Server: $(((Get-VBRServerSession).Server))." BlankLine