diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index cafebd9..871acc0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -13,13 +13,14 @@ body: Please provide a clear and concise description of the bug. validations: required: true - - type: input - id: command-line-input + - type: textarea + id: output-log-generation attributes: - label: Command-line input + label: Log Generation description: >- - Please provide the command line input you are using to run AsBuiltReport. Please ensure that you obscure any sensitive information. - placeholder: New-VeeamDiagram -Target backupserver.domain.local -Username "domain\username" -Password password -Format pdf -Direction top-to-bottom -OutputFolderPath C:\Users\username\ -EdgeType polyline -DiagramType Diagram-Type + Please provide the Output.log as described in [Run cmdlet with debugging options](https://github.com/rebelinux/Veeam.Diagrammer/wiki/Run-cmdlet-with-debugging-options). Attach the file in the text area. + placeholder: |- + Drag & drop the file in the Here. validations: required: true - type: textarea @@ -34,14 +35,6 @@ body: 3. .... validations: required: true - - type: textarea - id: expected-behaviour - attributes: - label: Expected behaviour - description: >- - Please provide a clear and concise description of what you expected to happen. - validations: - required: true - type: textarea id: screenshots attributes: @@ -74,11 +67,6 @@ body: placeholder: Get-Module -ListAvailable @("Veeam.Diagrammer";"PSGraph") | Select Name, Version validations: required: true - - type: textarea - id: additional-context - attributes: - label: Additional Context - description: This field is optional. You may provide additional context for the bug you wish to report. You may wish to include links to any related [issues](https://github.com/rebelinux/Veeam.Diagrammer/issues) or other relevant information. - type: checkboxes id: checklist attributes: diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d6eaa6..693e61c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ 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.18] - 2024-12-11 + +### Added + +- Add Entra ID Tenant information to the Infrastructure diagram + +### Fixed + +- Improve Graphviz Cluster space with less than 1 object to display (Get-DiagBackupToFileProxy) +- Fix Google Cloud Storage repository not displaying a icon + ## [0.6.17] - 2024-11-28 ### Fixed diff --git a/Src/Private/Get-DiagBackupToFileProxy.ps1 b/Src/Private/Get-DiagBackupToFileProxy.ps1 index ba2cb01..8cda871 100644 --- a/Src/Private/Get-DiagBackupToFileProxy.ps1 +++ b/Src/Private/Get-DiagBackupToFileProxy.ps1 @@ -5,7 +5,7 @@ function Get-DiagBackupToFileProxy { .DESCRIPTION Build a diagram of the configuration of Veeam VBR in PDF/PNG/SVG formats using Psgraph. .NOTES - Version: 0.6.9 + Version: 0.6.18 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -30,7 +30,15 @@ function Get-DiagBackupToFileProxy { if ($BackupServerInfo) { if ($FileBackupProxy) { - Node FileProxies @{Label = (Get-DiaHTMLNodeTable -ImagesObj $Images -inputObject ($FileBackupProxy | ForEach-Object { $_.Name.split('.')[0] }) -Align "Center" -iconType "VBR_Proxy_Server" -columnSize 4 -IconDebug $IconDebug -MultiIcon -AditionalInfo $FileBackupProxy.AditionalInfo -Subgraph -SubgraphIconType "VBR_Proxy" -SubgraphLabel "File Backup Proxies" -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -fontColor $Fontcolor -TableBorderColor $Edgecolor -TableBorder "1"); shape = 'plain'; fontsize = 14; fontname = "Segoe Ui" } + $columnSize = & { + if (($FileBackupProxy | Measure-Object).count-le 1 ) { + return 1 + } else { + return 4 + } + } + + Node FileProxies @{Label = (Get-DiaHTMLNodeTable -ImagesObj $Images -inputObject ($FileBackupProxy | ForEach-Object { $_.Name.split('.')[0] }) -Align "Center" -iconType "VBR_Proxy_Server" -columnSize $columnSize -IconDebug $IconDebug -MultiIcon -AditionalInfo $FileBackupProxy.AditionalInfo -Subgraph -SubgraphIconType "VBR_Proxy" -SubgraphLabel "File Backup Proxies" -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -fontColor $Fontcolor -TableBorderColor $Edgecolor -TableBorder "1"); shape = 'plain'; fontsize = 14; fontname = "Segoe Ui" } Edge $BackupServerInfo.Name -To FileProxies @{minlen = 3 } diff --git a/Src/Private/Get-VbrBackupEntraIDInfo.ps1 b/Src/Private/Get-VbrBackupEntraIDInfo.ps1 new file mode 100644 index 0000000..4913684 --- /dev/null +++ b/Src/Private/Get-VbrBackupEntraIDInfo.ps1 @@ -0,0 +1,50 @@ +function Get-VbrBackupEntraIDInfo { + <# + .SYNOPSIS + Function to extract veeam backup & replication entra id information. + .DESCRIPTION + Build a diagram of the configuration of Veeam VBR in PDF/PNG/SVG formats using Psgraph. + .NOTES + Version: 0.6.9 + Author: Jonathan Colon + Twitter: @jcolonfzenpr + Github: rebelinux + .LINK + https://github.com/rebelinux/Veeam.Diagrammer + #> + [CmdletBinding()] + [OutputType([System.Object[]])] + + Param + ( + + ) + process { + Write-Verbose -Message "Collecting Entra ID information from $($VBRServer.Name)." + try { + $EntraIDs = Get-VBREntraIDTenant + $EntraIDInfo = @() + if ($EntraIDs) { + foreach ($EntraID in $EntraIDs) { + + $Rows = @{ + Region = $EntraID.Region + CacheRepository = $EntraID.CacheRepository.Name + } + + $TempEntraIDInfo = [PSCustomObject]@{ + Name = $EntraID.Name.toUpper() + Label = Get-DiaNodeIcon -Name "$($EntraID.Name.toUpper())" -IconType "VBR_Microsoft_Entra_ID" -Align "Center" -Rows $Rows -ImagesObj $Images -IconDebug $IconDebug + AditionalInfo = $Rows + } + $EntraIDInfo += $TempEntraIDInfo + } + } + + return $EntraIDInfo + } catch { + Write-Verbose -Message $_.Exception.Message + } + } + end {} +} \ No newline at end of file diff --git a/Src/Private/Get-VbrInfraDiagram.ps1 b/Src/Private/Get-VbrInfraDiagram.ps1 index 4f81cab..930ac3b 100644 --- a/Src/Private/Get-VbrInfraDiagram.ps1 +++ b/Src/Private/Get-VbrInfraDiagram.ps1 @@ -40,6 +40,19 @@ function Get-VbrInfraDiagram { # Build Backup Server Graphviz Cluster Get-DiagBackupServer + # EntraID Graphviz Cluster + if ($EntraID = Get-VbrBackupEntraIDInfo) { + try { + $EntraIDNode = Node EntraID @{Label = (Get-DiaHTMLNodeTable -ImagesObj $Images -inputObject $EntraID.Name -Align "Center" -iconType "VBR_Microsoft_Entra_ID" -columnSize 2 -IconDebug $IconDebug -MultiIcon -AditionalInfo $EntraID.AditionalInfo -Subgraph -SubgraphLabel "Entra ID Tenants" -SubgraphLabelPos "top" -SubgraphIconType "VBR_Microsoft_Entra_ID" -SubgraphTableStyle "dashed,rounded" -TableBorderColor "#71797E" -TableBorder "1"); shape = 'plain'; fontname = "Segoe Ui" } + } catch { + Write-Verbose "Error: Unable to create EntraID Objects. Disabling the section" + Write-Debug "Error Message: $($_.Exception.Message)" + } + } + if ($EntraID -and $EntraIDNode) { + $EntraIDNode + } + # Proxy Graphviz Cluster if ($Proxies = Get-VbrProxyInfo) { @@ -432,7 +445,7 @@ function Get-VbrInfraDiagram { # 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' } - Edge -From VBRServerPointSpace -To VBRProxyPoint @{minlen = 12; arrowtail = 'none'; arrowhead = 'none'; style = 'filled' } + Edge -From VBRServerPointSpace -To VBRProxyPoint @{minlen = 20; arrowtail = 'none'; arrowhead = 'none'; style = 'filled' } if ($ProxiesVi -and $ProxiesHv -and $ProxiesNas ) { Edge -From VBRProxyPoint -To VBRProxyPointSpace @{minlen = 16; arrowtail = 'none'; arrowhead = 'none'; style = 'filled' } } else { @@ -551,6 +564,11 @@ function Get-VbrInfraDiagram { # Connect Veeam Backup server to the Dummy line Edge -From $BackupServerInfo.Name -To VBRServerPointSpace @{minlen = 2; arrowtail = 'dot'; arrowhead = 'none'; style = 'dashed' } + # Connect Microsoft Entra ID Node to the Dummy line + if ($EntraIDNode) { + Edge -From EntraID -To VBRProxyPoint @{minlen = 2; arrowtail = 'dot'; arrowhead = 'none'; style = 'dashed' } + } + # Connect Veeam Proxies Server to the Dummy line if ($ProxiesSubgraphNode) { Edge -From VBRProxyPoint -To Proxies @{minlen = 1; arrowtail = 'none'; arrowhead = 'dot'; style = 'dashed' } diff --git a/Src/Private/Images.ps1 b/Src/Private/Images.ps1 index 0ac7ebe..f6871e6 100644 --- a/Src/Private/Images.ps1 +++ b/Src/Private/Images.ps1 @@ -51,4 +51,5 @@ $script:Images = @{ "VBR_SureBackup" = "SureBackup.png" "VBR_Application_Groups" = "Service-Application.png" "VBR_vSphere_Cluster" = "Server_Cluster.png" + "VBR_Microsoft_Entra_ID" = "Microsoft_Entra_ID.png" } \ No newline at end of file diff --git a/Src/Private/SharedUtilsFunctions.ps1 b/Src/Private/SharedUtilsFunctions.ps1 index b840bb0..d9be9b1 100644 --- a/Src/Private/SharedUtilsFunctions.ps1 +++ b/Src/Private/SharedUtilsFunctions.ps1 @@ -19,6 +19,7 @@ function Get-IconType { 'LinuxHardened' { 'VBR_Linux_Repository' } 'WinLocal' { 'VBR_Windows_Repository' } 'Cloud' { 'VBR_Cloud_Repository' } + 'GoogleCloudStorage' { 'VBR_Amazon_S3_Compatible' } 'AmazonS3Compatible' { 'VBR_Amazon_S3_Compatible' } 'AmazonS3Glacier' { 'VBR_Amazon_S3_Compatible' } 'AmazonS3' { 'VBR_Amazon_S3' } diff --git a/Veeam.Diagrammer.psd1 b/Veeam.Diagrammer.psd1 index 297fd0f..71849e8 100644 --- a/Veeam.Diagrammer.psd1 +++ b/Veeam.Diagrammer.psd1 @@ -12,7 +12,7 @@ RootModule = 'Veeam.Diagrammer.psm1' # Version number of this module. - ModuleVersion = '0.6.17' + ModuleVersion = '0.6.18' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/icons/Microsoft_Entra_ID.png b/icons/Microsoft_Entra_ID.png new file mode 100644 index 0000000..baa481f Binary files /dev/null and b/icons/Microsoft_Entra_ID.png differ