Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.6.1 #28

Merged
merged 10 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ on:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
schedule:
- cron: '20 14 * * 1'

permissions:
contents: read
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ 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.1] - 2024-08-31

### Added

- Add support for NAS Repository (Backup-to-Repository)

### Changed

- Allow EDGE to connect between Subgraph Clusters
- Update Diagrammer.Core minimum to v0.2.3

### Fixed

- Fix veeam module version detection

## [0.6.0] - 2024-05-09

### Changed
Expand Down
24 changes: 4 additions & 20 deletions Src/Private/Get-DiagBackupToFileProxy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,45 +28,29 @@ function Get-DiagBackupToFileProxy {
try {
$FileBackupProxy = Get-VbrBackupProxyInfo -Type 'nas'
if ($BackupServerInfo) {
if ($Dir -eq 'LR') {
$DiagramLabel = 'File Backup Proxies'
$DiagramDummyLabel = ' '
} else {
$DiagramLabel = ' '
$DiagramDummyLabel = 'File Backup Proxies'
}
if ($FileBackupProxy) {
$ProxiesAttr = @{
Label = $DiagramLabel
Label = 'File Backup Proxies'
fontsize = 18
penwidth = 1.5
labelloc = 't'
color = $SubGraphDebug.color
style = 'dashed,rounded'
}
SubGraph MainSubGraph -Attributes $ProxiesAttr -ScriptBlock {
# Dummy Node used for subgraph centering
Node DummyFileProxy @{Label = $DiagramDummyLabel; fontsize = 18; fontname = "Segoe Ui Black"; fontcolor = '#005f4b'; shape = 'plain' }
if ($Dir -eq "TB") {
Node FileLeft @{Label = 'FileLeft'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Node FileLeftt @{Label = 'FileLeftt'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Node FileRight @{Label = 'FileRight'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Edge FileLeft, FileLeftt, DummyFileProxy, FileRight @{style = $EdgeDebug.style; color = $EdgeDebug.color }
Rank FileLeft, FileLeftt, DummyFileProxy, FileRight
}
foreach ($ProxyObj in $FileBackupProxy) {
$PROXYHASHTABLE = @{}
$ProxyObj.psobject.properties | ForEach-Object { $PROXYHASHTABLE[$_.Name] = $_.Value }
Node $ProxyObj -NodeScript { $_.Name } @{Label = $PROXYHASHTABLE.Label; fontname = "Segoe Ui" }
Edge -From DummyFileProxy -To $ProxyObj.Name @{constraint = "true"; minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
Edge -From MainSubGraph:s -To $ProxyObj.Name @{constraint = "true"; minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
Rank $FileBackupProxy.Name
}

if ($Dir -eq 'LR') {
Edge $BackupServerInfo.Name -To DummyFileProxy @{minlen = 3 }
Edge $BackupServerInfo.Name -To 'MainSubGraph' @{minlen = 3 }
} else {
Edge $BackupServerInfo.Name -To DummyFileProxy @{minlen = 3 }
Edge $BackupServerInfo.Name -To 'MainSubGraph' @{minlen = 3 }
}
}
}
Expand Down
26 changes: 5 additions & 21 deletions Src/Private/Get-DiagBackupToHvProxy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-DiagBackupToHvProxy {
.DESCRIPTION
Build a diagram of the configuration of Veeam VBR in PDF/PNG/SVG formats using Psgraph.
.NOTES
Version: 0.6.0
Version: 0.6.1
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand All @@ -27,45 +27,29 @@ function Get-DiagBackupToHvProxy {
process {
try {
$HyperVBackupProxy = Get-VbrBackupProxyInfo -Type 'hyperv'
if ($Dir -eq 'LR') {
$DiagramLabel = 'Hyper-V Backup Proxies'
$DiagramDummyLabel = ' '
} else {
$DiagramLabel = ' '
$DiagramDummyLabel = 'Hyper-V Backup Proxies'
}
if ($HyperVBackupProxy) {
$ProxiesAttr = @{
Label = $DiagramLabel
Label = 'Hyper-V Backup Proxies'
fontsize = 18
penwidth = 1.5
labelloc = 't'
color = $SubGraphDebug.color
style = 'dashed,rounded'
}
SubGraph MainSubGraph -Attributes $ProxiesAttr -ScriptBlock {
# Dummy Node used for subgraph centering
Node DummyHyperVProxy @{Label = $DiagramDummyLabel; fontsize = 18; fontname = "Segoe Ui Black"; fontcolor = '#005f4b'; shape = 'plain' }
if ($Dir -eq "TB") {
Node HvLeft @{Label = 'HvLeft'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Node HvLeftt @{Label = 'HvLeftt'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Node HvRight @{Label = 'HvRight'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Edge HvLeft, HvLeftt, DummyHyperVProxy, HvRight @{style = $EdgeDebug.style; color = $EdgeDebug.color }
Rank HvLeft, HvLeftt, DummyHyperVProxy, HvRight
}
foreach ($ProxyObj in $HyperVBackupProxy) {
$PROXYHASHTABLE = @{}
$ProxyObj.psobject.properties | ForEach-Object { $PROXYHASHTABLE[$_.Name] = $_.Value }
Node $ProxyObj -NodeScript { $_.Name } @{Label = $PROXYHASHTABLE.Label; fontname = "Segoe Ui" }
Edge -From DummyHyperVProxy -To $ProxyObj.Name @{constraint = "true"; minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
Edge -From MainSubGraph:s -To $ProxyObj.Name @{constraint = "true"; minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
Rank $HyperVBackupProxy.Name
}

if ($Dir -eq 'LR') {
Edge $BackupServerInfo.Name -To DummyHyperVProxy @{minlen = 3 }
Edge $BackupServerInfo.Name -To 'MainSubGraph' @{minlen = 3 }
} else {
Edge $BackupServerInfo.Name -To DummyHyperVProxy @{minlen = 3 }
Edge $BackupServerInfo.Name -To 'MainSubGraph' @{minlen = 3 }
}
}
} catch {
Expand Down
45 changes: 11 additions & 34 deletions Src/Private/Get-DiagBackupToProtectedGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-DiagBackupToProtectedGroup {
.DESCRIPTION
Build a diagram of the configuration of Veeam VBR in PDF/PNG/SVG formats using Psgraph.
.NOTES
Version: 0.6.0
Version: 0.6.1
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand Down Expand Up @@ -35,16 +35,9 @@ function Get-DiagBackupToProtectedGroup {
try {
$FileBackupProxy = Get-VbrBackupProxyInfo -Type 'nas'
if ($BackupServerInfo) {
if ($Dir -eq 'LR') {
$DiagramLabel = 'File Backup Proxies'
$DiagramDummyLabel = ' '
} else {
$DiagramLabel = ' '
$DiagramDummyLabel = 'File Backup Proxies'
}
if ($FileBackupProxy) {
$ProxiesAttr = @{
Label = $DiagramLabel
Label = 'File Backup Proxies'
fontsize = 18
penwidth = 1.5
labelloc = 't'
Expand All @@ -53,30 +46,23 @@ function Get-DiagBackupToProtectedGroup {
}
SubGraph MainSubGraphFileProxy -Attributes $ProxiesAttr -ScriptBlock {
# Dummy Node used for subgraph centering
Node DummyFileProxy @{Label = $DiagramDummyLabel; fontsize = 18; fontname = "Segoe Ui Black"; fontcolor = '#005f4b'; shape = 'plain' }
# Node DummyFileProxy @{Label = $DiagramDummyLabel; fontsize = 18; fontname = "Segoe Ui Black"; fontcolor = '#005f4b'; shape = 'plain' }
Node DummyFileProxyToPG @{Label = "DummyFileProxyToPG"; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
if ($Dir -eq "TB") {
Node FileLeft @{Label = 'FileLeft'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Node FileLeftt @{Label = 'FileLeftt'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Node FileRight @{Label = 'FileRight'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Edge FileLeft, FileLeftt, DummyFileProxy, FileRight @{style = $EdgeDebug.style; color = $EdgeDebug.color }
Rank FileLeft, FileLeftt, DummyFileProxy, FileRight
}
foreach ($ProxyObj in $FileBackupProxy) {
$PROXYHASHTABLE = @{}
$ProxyObj.psobject.properties | ForEach-Object { $PROXYHASHTABLE[$_.Name] = $_.Value }
Node $ProxyObj -NodeScript { $_.Name } @{Label = $PROXYHASHTABLE.Label; fontname = "Segoe Ui" }
Edge -From DummyFileProxy -To $ProxyObj.Name @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
Edge -From MainSubGraphFileProxy:s -To $ProxyObj.Name @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
Edge -From $ProxyObj.Name -To DummyFileProxyToPG @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }

}
Rank $FileBackupProxy.Name
}

if ($Dir -eq 'LR') {
Edge $BackupServerInfo.Name -To DummyFileProxy @{minlen = 3; }
Edge $BackupServerInfo.Name -To MainSubGraphFileProxy @{lhead = 'clusterMainSubGraph'; minlen = 3 }
} else {
Edge $BackupServerInfo.Name -To DummyFileProxy @{minlen = 3; }
Edge $BackupServerInfo.Name -To MainSubGraphFileProxy @{lhead = 'clusterMainSubGraph'; minlen = 3 }
}
}
}
Expand All @@ -95,15 +81,6 @@ function Get-DiagBackupToProtectedGroup {

if ($ProtectedGroups) {
SubGraph MainSubGraph -Attributes @{Label = $DiagramLabel; fontsize = 22; penwidth = 1; labelloc = 't'; style = 'dashed,rounded'; color = $SubGraphDebug.color } {
# Node used for subgraph centering
Node ProtectedGroup @{Label = $DiagramDummyLabel; fontsize = 22; fontname = "Segoe Ui Black"; fontcolor = '#005f4b'; shape = 'plain' }
if ($Dir -eq "TB") {
Node DummyPGLeft @{Label = 'DummyPGLeft'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Node DummyPGLeftt @{Label = 'DummyPGLeftt'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Node DummyPGRight @{Label = 'DummyPGRight'; style = $EdgeDebug.style; color = $EdgeDebug.color; shape = 'plain'; fillColor = 'transparent' }
Edge DummyPGLeft, DummyPGLeftt, ProtectedGroup, DummyPGRight @{style = $EdgeDebug.style; color = $EdgeDebug.color }
Rank DummyPGLeft, DummyPGLeftt, ProtectedGroup, DummyPGRight
}
if ($ADContainer) {
SubGraph ADContainer -Attributes @{Label = (Get-DiaHTMLLabel -Label 'Active Directory Computers' -IconType "VBR_AGENT_AD_Logo" -ImagesObj $Images -IconDebug $IconDebug -SubgraphLabel); fontsize = 18; penwidth = 1.5; labelloc = 't'; style = 'dashed,rounded' } {
# Node used for subgraph centering
Expand Down Expand Up @@ -176,7 +153,7 @@ function Get-DiagBackupToProtectedGroup {
}
}
}
Edge -From ProtectedGroup -To DummyADContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
Edge -From MainSubGraph:s -To DummyADContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
if ($ManualContainer) {
SubGraph MCContainer -Attributes @{Label = (Get-DiaHTMLLabel -Label 'Manual Computers' -IconType "VBR_AGENT_MC" -ImagesObj $Images -IconDebug $IconDebug -SubgraphLabel); fontsize = 18; penwidth = 1.5; labelloc = 't'; style = 'dashed,rounded' } {
Expand Down Expand Up @@ -238,7 +215,7 @@ function Get-DiagBackupToProtectedGroup {
}
}
}
Edge -From ProtectedGroup -To DummyMCContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
Edge -From MainSubGraph:s -To DummyMCContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
if ($IndividualContainer) {
SubGraph ICContainer -Attributes @{Label = (Get-DiaHTMLLabel -Label 'Individual Computers' -IconType "VBR_AGENT_IC" -ImagesObj $Images -IconDebug $IconDebug -SubgraphLabel); fontsize = 18; penwidth = 1.5; labelloc = 't'; style = 'dashed,rounded' } {
Expand Down Expand Up @@ -315,7 +292,7 @@ function Get-DiagBackupToProtectedGroup {
}
}
}
Edge -From ProtectedGroup -To DummyICContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
Edge -From MainSubGraph:s -To DummyICContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
if ($CSVContainer) {
SubGraph CSVContainer -Attributes @{Label = (Get-DiaHTMLLabel -Label 'CSV Computers' -IconType "VBR_AGENT_CSV_Logo" -ImagesObj $Images -IconDebug $IconDebug -SubgraphLabel); fontsize = 18; penwidth = 1.5; labelloc = 't'; style = 'dashed,rounded' } {
Expand Down Expand Up @@ -369,11 +346,11 @@ function Get-DiagBackupToProtectedGroup {
}
}
}
Edge -From ProtectedGroup -To DummyCSVContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
Edge -From MainSubGraph:s -To DummyCSVContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
}

Edge -From DummyFileProxyToPG -To ProtectedGroup @{minlen = 3 }
Edge -From DummyFileProxyToPG -To MainSubGraph @{ltail = 'clusterMainSubGraphFileProxy'; lhead = 'clusterMainSubGraph'; minlen = 3 }
}
}
} catch {
Expand Down
Loading
Loading