Skip to content

Commit 0f7c31e

Browse files
authored
Merge pull request #61 from rebelinux/dev
v0.6.10
2 parents 012ab7d + 50c48e3 commit 0f7c31e

File tree

5 files changed

+45
-29
lines changed

5 files changed

+45
-29
lines changed

AsBuiltReport.NetApp.ONTAP.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AsBuiltReport.NetApp.ONTAP.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.6.9'
15+
ModuleVersion = '0.6.10'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -62,7 +62,7 @@
6262
},
6363
@{
6464
ModuleName = 'Diagrammer.Core';
65-
ModuleVersion = '0.2.32'
65+
ModuleVersion = '0.2.33'
6666
}
6767
)
6868

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.6.10] - Unreleased
9+
10+
### Added
11+
12+
- Add WaterMarkFontOpacity parameter to Export-AbrOntapDiagram function
13+
14+
### Changed
15+
16+
- Refactor Export-AbrOntapDiagram to handle image format for Unix platforms and improve error messaging
17+
- Bump Diagrammer.Core module requirement to v0.2.33
18+
- Bump module version to v0.6.10
19+
- Refactor Get-NetAppOntapAPI to streamline certificate validation for Unix platforms
20+
- Update SignatureLogoName in Export-AbrOntapDiagram function for consistency
21+
22+
### Fixed
23+
24+
- Fix Get-AbrOntapStorageAggrDiagram for drawing node management and aggregate storage relationships correctly.
25+
826
## [0.6.9] - 2025-10-21
927

1028
### Changed
@@ -16,12 +34,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1634
- NetApp.Ontap v9.17.1.2509
1735
- AsBuiltReport.Core v1.5.0
1836
- Refactor Get-NetAppOntapAPI to handle Unix platform and improve error handling in Invoke-AsBuiltReport.NetApp.ONTAP
37+
- Refactor Export-AbrOntapDiagram to handle image format for Unix platforms and improve error messaging
1938

2039
### Fixed
2140

2241
- Fix issue where cluster replication diagram generation fails if no replication relationships are found.
2342
- Fix issue where certain sections of the report may not render correctly on Unix-based systems.
2443
- Close [#58](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/58)
44+
- Fix Get-AbrOntapStorageAggrDiagram for drawing node management and aggregate storage relationships correctly.
2545

2646
## [0.6.8] - 2025-08-18
2747

Src/Private/Export-AbrOntapDiagram.ps1

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ function Export-AbrOntapDiagram {
4646
'IconPath' = $IconPath
4747
'ImagesObj' = $Images
4848
'LogoName' = 'AsBuiltReport_LOGO'
49-
'SignatureLogoName' = 'Abr_LOGO_Footer'
49+
'SignatureLogoName' = 'AsBuiltReport_Signature'
5050
'WaterMarkText' = $Options.DiagramWaterMark
51+
'WaterMarkFontOpacity' = 20
5152
'Direction' = & {
5253
if ($MainDiagramLabel -eq 'Cluster Replication Diagram') {
5354
'left-to-right'
@@ -114,22 +115,17 @@ function Export-AbrOntapDiagram {
114115
}
115116
}
116117
try {
117-
if ($PSVersionTable.Platform -ne 'Unix') {
118-
$DiagramParams.Remove('Format')
119-
$DiagramParams.Add('Format', "base64")
118+
$DiagramParams.Remove('Format')
119+
$DiagramParams.Add('Format', "base64")
120120

121-
$Graph = $DiagramObject
122-
$Diagram = New-Diagrammer @DiagramParams -InputObject $Graph
123-
if ($Diagram) {
124-
if ((Get-DiaImagePercent -GraphObj $Diagram).Width -gt 600) { $ImagePrty = 40 } else { $ImagePrty = 30 }
125-
Section -Style Heading2 $MainDiagramLabel {
126-
Image -Base64 $Diagram -Text "NetApp Ontap Diagram" -Percent $ImagePrty -Align Center
127-
Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2
128-
}
121+
$Graph = $DiagramObject
122+
$Diagram = New-Diagrammer @DiagramParams -InputObject $Graph
123+
if ($Diagram) {
124+
if ((Get-DiaImagePercent -GraphObj $Diagram).Width -gt 600) { $ImagePrty = 40 } else { $ImagePrty = 30 }
125+
Section -Style Heading2 $MainDiagramLabel {
126+
Image -Base64 $Diagram -Text "NetApp Ontap Diagram" -Percent $ImagePrty -Align Center
127+
Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2
129128
}
130-
} else {
131-
Write-PScriboMessage -IsWarning -Message "PSCribo Images embedding is not supported on PowerShell Core running on Linux or MacOS."
132-
133129
}
134130
} catch {
135131
Write-PScriboMessage -IsWarning -Message "Unable to generate the Ontap Diagram: $($_.Exception.Message)"

Src/Private/Get-AbrOntapNodeAggrDiagram.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function Get-AbrOntapStorageAggrDiagram {
9191
"Mgmt" = switch ([string]::IsNullOrEmpty($NodeMgmtAddress)) {
9292
$true { "Unknown" }
9393
$false { $NodeMgmtAddress }
94-
Default { "Unknown" }
94+
default { "Unknown" }
9595
}
9696
}
9797
}
@@ -115,11 +115,11 @@ function Get-AbrOntapStorageAggrDiagram {
115115
"raid0" { "RAID 0" }
116116
"raid1" { "RAID 1" }
117117
"raid10" { "RAID 10" }
118-
Default { "Unknown" }
118+
default { "Unknown" }
119119
}
120120
}
121121
}
122-
Default { "Unknown" }
122+
default { "Unknown" }
123123
}
124124
"Raid Size" = $Aggr.RaidSize
125125
"State" = $Aggr.State
@@ -132,7 +132,7 @@ function Get-AbrOntapStorageAggrDiagram {
132132

133133
foreach ($Node in $NodeAdditionalInfo) {
134134
$ClusterNodeObj = @()
135-
$ClusterNodeObj += Add-DiaHTMLNodeTable -ImagesObj $Images -inputObject $Node.NodeName -Align "Center" -iconType "Ontap_Node" -columnSize 1 -IconDebug $IconDebug -MultiIcon -AditionalInfo $Node.AdditionalInfo -Subgraph -SubgraphLabel $Node.NodeName -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -TableBorderColor "#71797E" -TableBorder 0 -SubgraphLabelFontsize 22 -fontSize 18
135+
$ClusterNodeObj += Add-DiaHtmlNodeTable -ImagesObj $Images -inputObject $Node.NodeName -Align "Center" -iconType "Ontap_Node" -ColumnSize 1 -IconDebug $IconDebug -MultiIcon -AditionalInfo $Node.AdditionalInfo -Subgraph -SubgraphLabel $Node.NodeName -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -TableBorderColor "#71797E" -TableBorder 0 -SubgraphLabelFontSize 22 -FontSize 18
136136

137137
if ($ClusterNodeObj) {
138138
if ($AggrInfo.Count -eq 1) {
@@ -142,11 +142,11 @@ function Get-AbrOntapStorageAggrDiagram {
142142
} else {
143143
$AggrInfoColumnSize = $AggrInfo.Count
144144
}
145-
$ClusterNodeObj += Add-DiaHTMLNodeTable -ImagesObj $Images -inputObject ($AggrInfo | Where-Object { $_.NodeName -eq $Node.Nodename }).AggregateName -Align "Center" -iconType "Ontap_Aggregate" -columnSize $AggrInfoColumnSize -IconDebug $IconDebug -MultiIcon -AditionalInfo ($AggrInfo | Where-Object { $_.NodeName -eq $Node.Nodename }).AdditionalInfo -Subgraph -SubgraphLabel "Aggregates" -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -TableBorderColor "#71797E" -TableBorder 1 -SubgraphLabelFontsize 22 -fontSize 18
145+
$ClusterNodeObj += Add-DiaHtmlNodeTable -ImagesObj $Images -inputObject ($AggrInfo | Where-Object { $_.NodeName -eq $Node.Nodename }).AggregateName -Align "Center" -iconType "Ontap_Aggregate" -ColumnSize $AggrInfoColumnSize -IconDebug $IconDebug -MultiIcon -AditionalInfo ($AggrInfo | Where-Object { $_.NodeName -eq $Node.Nodename }).AdditionalInfo -Subgraph -SubgraphLabel "Aggregates" -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -TableBorderColor "#71797E" -TableBorder 1 -SubgraphLabelFontSize 22 -FontSize 18
146146
}
147147

148148
if ($ClusterNodeObj) {
149-
$ClusterNodeSubgraphObj = Add-DiaHTMLSubGraph -ImagesObj $Images -TableArray $ClusterNodeObj -Align 'Center' -IconDebug $IconDebug -Label " " -LabelPos 'top' -TableStyle "dashed,rounded" -TableBorderColor $Edgecolor -TableBorder 1 -columnSize 1 -fontSize 12
149+
$ClusterNodeSubgraphObj = Add-DiaHtmlSubGraph -ImagesObj $Images -TableArray $ClusterNodeObj -Align 'Center' -IconDebug $IconDebug -Label " " -LabelPos 'top' -TableStyle "dashed,rounded" -TableBorderColor $Edgecolor -TableBorder 1 -ColumnSize 1 -FontSize 12
150150
}
151151

152152
$ClusterNodesObj += $ClusterNodeSubgraphObj
@@ -160,10 +160,10 @@ function Get-AbrOntapStorageAggrDiagram {
160160
} else {
161161
$ClusterNodesObjColumnSize = $ClusterNodesObj.Count
162162
}
163-
$ClusterMgmtObj = Add-DiaHTMLSubGraph -ImagesObj $Images -TableArray $ClusterNodesObj -Align 'Right' -IconDebug $IconDebug -Label "Management: $($ClusterInfo.NcController)" -LabelPos 'down' -TableStyle "dashed,rounded" -TableBorderColor $Edgecolor -TableBorder 0 -columnSize $ClusterNodesObjColumnSize -fontSize 18
163+
$ClusterMgmtObj = Add-DiaHtmlSubGraph -ImagesObj $Images -TableArray $ClusterNodesObj -Align 'Right' -IconDebug $IconDebug -Label "Management: $($ClusterInfo.NcController.Name)" -LabelPos 'down' -TableStyle "dashed,rounded" -TableBorderColor $Edgecolor -TableBorder 0 -ColumnSize $ClusterNodesObjColumnSize -FontSize 18
164164

165165
if ($ClusterMgmtObj) {
166-
Node Cluster @{Label = $ClusterMgmtObj; shape = 'plain'; fillColor = 'transparent'; fontsize = 14 }
166+
Node ClusterAggrs @{Label = $ClusterMgmtObj; shape = 'plain'; fillColor = 'transparent'; fontsize = 14 }
167167

168168
} else {
169169
Write-PScriboMessage -IsWarning "Unable to create ClusterNodesObj. No Cluster Management Object found."

Src/Private/Get-NetAppOntapAPI.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ function Get-NetAppOntapAPI {
2626
)
2727

2828
begin {
29-
if ($PSVersionTable.Platform -ne 'Unix') {
30-
#region Workaround for SelfSigned Cert an force TLS 1.2
31-
if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type) {
32-
$certCallback = @"
29+
$certCallback = @"
3330
using System;
3431
using System.Net;
3532
using System.Net.Security;
@@ -55,6 +52,9 @@ function Get-NetAppOntapAPI {
5552
}
5653
}
5754
"@
55+
if ($PSVersionTable.PSEdition -ne 'Core') {
56+
#region Workaround for SelfSigned Cert an force TLS 1.2
57+
if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type) {
5858
Add-Type $certCallback
5959
}
6060
[ServerCertificateValidationCallback]::Ignore()

0 commit comments

Comments
 (0)