Skip to content

Commit

Permalink
Merge pull request #54 from rebelinux/dev
Browse files Browse the repository at this point in the history
Fix [Bug]: Infrastructure diagram issues #53
  • Loading branch information
rebelinux authored Nov 28, 2024
2 parents 80d97e8 + 5684df6 commit aaf503b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.17] - 2024-11-28

### Fixed

- Fix [#53](https://github.com/rebelinux/Veeam.Diagrammer/issues/53)
- Fix issue with diagramming empty Object Storage Graphviz cluster

## [0.6.16] - 2024-11-20

### Changed
Expand Down
18 changes: 13 additions & 5 deletions Src/Private/Get-VbrInfraDiagram.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-VbrInfraDiagram {
.DESCRIPTION
Diagram the configuration of Veeam Backup & Replication infrastructure in PDF/SVG/DOT/PNG formats using PSGraph and Graphviz.
.NOTES
Version: 0.6.13
Version: 0.6.17
Author(s): Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand Down Expand Up @@ -44,14 +44,18 @@ function Get-VbrInfraDiagram {
if ($Proxies = Get-VbrProxyInfo) {

try {
$ProxiesVi = Get-DiaHTMLNodeTable -ImagesObj $Images -inputObject (($Proxies | Where-Object { $_.AditionalInfo.Type -eq "vSphere" }) | ForEach-Object { $_.Name.split('.')[0] }) -Align "Center" -iconType "VBR_Proxy_Server" -columnSize 3 -IconDebug $IconDebug -MultiIcon -AditionalInfo ($Proxies.AditionalInfo | Where-Object { $_.Type -eq "vSphere" }) -Subgraph -SubgraphIconType "VBR_vSphere" -SubgraphLabel "VMware Proxies" -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -fontColor $Fontcolor -TableBorderColor $Edgecolor -TableBorder "1"
if (($Proxies | Where-Object { $_.AditionalInfo.Type -eq "vSphere" }).Name) {
$ProxiesVi = Get-DiaHTMLNodeTable -ImagesObj $Images -inputObject (($Proxies | Where-Object { $_.AditionalInfo.Type -eq "vSphere" }) | ForEach-Object { $_.Name.split('.')[0] }) -Align "Center" -iconType "VBR_Proxy_Server" -columnSize 3 -IconDebug $IconDebug -MultiIcon -AditionalInfo ($Proxies.AditionalInfo | Where-Object { $_.Type -eq "vSphere" }) -Subgraph -SubgraphIconType "VBR_vSphere" -SubgraphLabel "VMware Proxies" -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -fontColor $Fontcolor -TableBorderColor $Edgecolor -TableBorder "1"
}
} catch {
Write-Verbose "Error: Unable to create ProxiesVSphere Objects. Disabling the section"
Write-Debug "Error Message: $($_.Exception.Message)"
}

try {
$ProxiesHv = Get-DiaHTMLNodeTable -ImagesObj $Images -inputObject (($Proxies | Where-Object { $_.AditionalInfo.Type -eq "Off host" -or $_.AditionalInfo.Type -eq "On host" }).Name | ForEach-Object { $_.split('.')[0] }) -Align "Center" -iconType "VBR_Proxy_Server" -columnSize 3 -IconDebug $IconDebug -MultiIcon -AditionalInfo ($Proxies.AditionalInfo | Where-Object { $_.Type -eq "Off host" -or $_.Type -eq "On host" }) -Subgraph -SubgraphIconType "VBR_HyperV" -SubgraphLabel "Hyper-V Proxies" -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -fontColor $Fontcolor -TableBorderColor $Edgecolor -TableBorder "1"
if (($Proxies | Where-Object { $_.AditionalInfo.Type -eq "Off host" -or $_.AditionalInfo.Type -eq "On host" }).Name) {
$ProxiesHv = Get-DiaHTMLNodeTable -ImagesObj $Images -inputObject (($Proxies | Where-Object { $_.AditionalInfo.Type -eq "Off host" -or $_.AditionalInfo.Type -eq "On host" }).Name | ForEach-Object { $_.split('.')[0] }) -Align "Center" -iconType "VBR_Proxy_Server" -columnSize 3 -IconDebug $IconDebug -MultiIcon -AditionalInfo ($Proxies.AditionalInfo | Where-Object { $_.Type -eq "Off host" -or $_.Type -eq "On host" }) -Subgraph -SubgraphIconType "VBR_HyperV" -SubgraphLabel "Hyper-V Proxies" -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -fontColor $Fontcolor -TableBorderColor $Edgecolor -TableBorder "1"
}
} catch {
Write-Verbose "Error: Unable to create ProxiesHyperV Objects. Disabling the section"
Write-Debug "Error Message: $($_.Exception.Message)"
Expand Down Expand Up @@ -423,6 +427,8 @@ function Get-VbrInfraDiagram {
# Graphviz: https://graphviz.org/docs/edges/ #
#---------------------------------------------------------------------------------------------#

# LastPoint Min length
$LastPointMinLen = 30
# Connect the Dummy Node in a straight line
# VBRStartPoint --- VBRServerPointSpace --- VBRProxyPoint --- VBRProxyPointSpace --- VBRRepoPoint --- VBREndPointSpace
Edge -From VBRStartPoint -To VBRServerPointSpace @{minlen = 20; arrowtail = 'none'; arrowhead = 'none'; style = 'filled' }
Expand Down Expand Up @@ -473,7 +479,8 @@ function Get-VbrInfraDiagram {
$LastPoint = 'VBRSureBackupPoint'

} elseif ((-Not $TapeServerNode) -and (-Not $WanAccelsNode) -and (-Not $ServiceProviderNode) -and (-Not ($VirtualLabNode -or $ApplicationGroupsNode))) {
$LastPoint = 'VBRTapePoint'
$LastPoint = 'VBRRepoPointSpace'
$LastPointMinLen = 12

} elseif ((-Not $TapeServerNode) -and $WanAccelsNode -and $ServiceProviderNode -and (($VirtualLabNode -or $ApplicationGroupsNode))) {
Edge -From VBRRepoPointSpace -To VBRWanAccelPoint @{minlen = 16; arrowtail = 'none'; arrowhead = 'none'; style = 'filled' }
Expand Down Expand Up @@ -532,6 +539,7 @@ function Get-VbrInfraDiagram {
$LastPoint = 'VBRTapePoint'
} elseif ((-Not $TapeServerNode) -and (-Not $WanAccelsNode) -and (-Not $ServiceProviderNode)) {
$LastPoint = 'VBRRepoPointSpace'
$LastPointMinLen = 12
}

####################################################################################
Expand Down Expand Up @@ -595,7 +603,7 @@ function Get-VbrInfraDiagram {
####################################################################################

if ($LastPoint) {
Edge -From $LastPoint -To VBREndPointSpace @{minlen = 30; arrowtail = 'none'; arrowhead = 'none'; style = 'filled' }
Edge -From $LastPoint -To VBREndPointSpace @{minlen = $LastPointMinLen; arrowtail = 'none'; arrowhead = 'none'; style = 'filled' }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Veeam.Diagrammer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'Veeam.Diagrammer.psm1'

# Version number of this module.
ModuleVersion = '0.6.16'
ModuleVersion = '0.6.17'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down

0 comments on commit aaf503b

Please sign in to comment.