Skip to content

Commit

Permalink
Merge pull request #159 from rebelinux/dev
Browse files Browse the repository at this point in the history
Misc Fixes
  • Loading branch information
rebelinux authored Apr 30, 2024
2 parents 74c5246 + 9b08e83 commit ca0d365
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
26 changes: 17 additions & 9 deletions Src/Private/Get-AbrVbrBackupRepository.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 = @{
Expand Down
4 changes: 2 additions & 2 deletions Src/Private/Get-AbrVbrDiagram.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand All @@ -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' }
}
}
}
Expand Down
16 changes: 14 additions & 2 deletions Src/Private/SharedUtilsFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ca0d365

Please sign in to comment.