Skip to content

Commit

Permalink
Migrated helper modules to Diagrammer.Core
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelinux committed Mar 24, 2024
1 parent 22395e5 commit f54b76d
Show file tree
Hide file tree
Showing 24 changed files with 81 additions and 815 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ 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.0] - Unreleased

### Changed

- Migrated helper modules to Diagrammer.Core

## [0.5.9] - 2024-02-15

### Added
Expand Down
141 changes: 0 additions & 141 deletions Src/Private/Convert-TableToHTML.ps1

This file was deleted.

24 changes: 12 additions & 12 deletions Src/Private/Get-DiagBackupToProtectedGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function Get-DiagBackupToProtectedGroup {
Rank DummyPGLeft, DummyPGLeftt, ProtectedGroup, DummyPGRight
}
if ($ADContainer) {
SubGraph ADContainer -Attributes @{Label = (Get-HTMLLabel -Label 'Active Directory Computers' -IconType "VBR_AGENT_AD_Logo" -SubgraphLabel); fontsize = 18; penwidth = 1.5; labelloc = 't'; style = 'dashed,rounded' } {
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
Node DummyADContainer @{Label = 'DummyADC'; style = $SubGraphDebug.style; color = $SubGraphDebug.color; shape = 'plain' }
if (($ADContainer | Measure-Object).count -le 2) {
Expand All @@ -130,7 +130,7 @@ function Get-DiagBackupToProtectedGroup {
$Ous
)

Convert-TableToHTML -Label $PGOBJ.Name -Name $PGOBJ.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
Convert-DiaTableToHTML -Label $PGOBJ.Name -Name $PGOBJ.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14

Edge -From DummyADContainer -To $PGOBJ.Name @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
Expand Down Expand Up @@ -160,7 +160,7 @@ function Get-DiagBackupToProtectedGroup {
$Ous
)

Convert-TableToHTML -Label $_.Name -Name $_.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
Convert-DiaTableToHTML -Label $_.Name -Name $_.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
}
}
$Number++
Expand All @@ -179,7 +179,7 @@ function Get-DiagBackupToProtectedGroup {
Edge -From ProtectedGroup -To DummyADContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
if ($ManualContainer) {
SubGraph MCContainer -Attributes @{Label = (Get-HTMLLabel -Label 'Manual Computers' -IconType "VBR_AGENT_MC" -SubgraphLabel); fontsize = 18; penwidth = 1.5; labelloc = 't'; style = 'dashed,rounded' } {
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' } {
# Node used for subgraph centering
Node DummyMCContainer @{Label = 'DummyMC'; style = $SubGraphDebug.style; color = $SubGraphDebug.color; shape = 'plain' }
if (($ManualContainer | Measure-Object).count -le 2) {
Expand All @@ -197,7 +197,7 @@ function Get-DiagBackupToProtectedGroup {
"<B>Type</B>: $($PGOBJ.Object.Type) <B>Status</B>: $($Status) <B>Schedule</B>: $($PGOBJ.Object.ScheduleOptions.PolicyType)"
)

Convert-TableToHTML -Label $PGOBJ.Name -Name $PGOBJ.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
Convert-DiaTableToHTML -Label $PGOBJ.Name -Name $PGOBJ.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14

Edge -From DummyMCContainer -To $PGOBJ.Name @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
Expand All @@ -222,7 +222,7 @@ function Get-DiagBackupToProtectedGroup {
"<B>Type</B>: $($_.Object.Type) <B>Status</B>: $($Status) <B>Schedule</B>: $($_.Object.ScheduleOptions.PolicyType)"
)

Convert-TableToHTML -Label $_.Name -Name $_.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
Convert-DiaTableToHTML -Label $_.Name -Name $_.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
}
}
$Number++
Expand All @@ -241,7 +241,7 @@ function Get-DiagBackupToProtectedGroup {
Edge -From ProtectedGroup -To DummyMCContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
if ($IndividualContainer) {
SubGraph ICContainer -Attributes @{Label = (Get-HTMLLabel -Label 'Individual Computers' -IconType "VBR_AGENT_IC" -SubgraphLabel); fontsize = 18; penwidth = 1.5; labelloc = 't'; style = 'dashed,rounded' } {
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' } {
# Node used for subgraph centering
Node DummyICContainer @{Label = 'DummyIC'; style = $SubGraphDebug.style; color = $SubGraphDebug.color; shape = 'plain' }
if (($IndividualContainer | Measure-Object).count -le 2) {
Expand All @@ -267,7 +267,7 @@ function Get-DiagBackupToProtectedGroup {
$Entities
)

Convert-TableToHTML -Label $PGOBJ.Name -Name $PGOBJ.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
Convert-DiaTableToHTML -Label $PGOBJ.Name -Name $PGOBJ.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14

Edge -From DummyICContainer -To $PGOBJ.Name @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
Expand Down Expand Up @@ -299,7 +299,7 @@ function Get-DiagBackupToProtectedGroup {
<br /> $Entities"
)

Convert-TableToHTML -Label $_.Name -Name $_.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
Convert-DiaTableToHTML -Label $_.Name -Name $_.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
}
}
$Number++
Expand All @@ -318,7 +318,7 @@ function Get-DiagBackupToProtectedGroup {
Edge -From ProtectedGroup -To DummyICContainer @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
if ($CSVContainer) {
SubGraph CSVContainer -Attributes @{Label = (Get-HTMLLabel -Label 'CSV Computers' -IconType "VBR_AGENT_CSV_Logo" -SubgraphLabel); fontsize = 18; penwidth = 1.5; labelloc = 't'; style = 'dashed,rounded' } {
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' } {
# Node used for subgraph centering
Node DummyCSVContainer @{Label = 'DummyCSVC'; style = $SubGraphDebug.style; color = $SubGraphDebug.color; shape = 'plain' }
if (($CSVContainer | Measure-Object).count -le 2) {
Expand All @@ -332,7 +332,7 @@ function Get-DiagBackupToProtectedGroup {
"<B>Credential</B> : $($PGOBJ.Object.Container.MasterCredentials.Name)"
)

Convert-TableToHTML -Label $PGOBJ.Name -Name $PGOBJ.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
Convert-DiaTableToHTML -Label $PGOBJ.Name -Name $PGOBJ.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14

Edge -From DummyCSVContainer -To $PGOBJ.Name @{minlen = 1; style = $EdgeDebug.style; color = $EdgeDebug.color }
}
Expand All @@ -353,7 +353,7 @@ function Get-DiagBackupToProtectedGroup {
"<B>Credential</B> : $($_.Object.Container.MasterCredentials.Name)"
)

Convert-TableToHTML -Label $_.Name -Name $_.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
Convert-DiaTableToHTML -Label $_.Name -Name $_.Name -Row $Rows -HeaderColor "#005f4b" -HeaderFontColor "white" -BorderColor "black" -FontSize 14
}
}
$Number++
Expand Down
6 changes: 3 additions & 3 deletions Src/Private/Get-DiagBackupToSobr.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ function Get-DiagBackupToSobr {
if ($SOBROBJ.Performance) {
SubGraph "$($SubGraphName)Performance" -Attributes @{Label = "Performance Extent"; fontsize = 18; penwidth = 1.5; labelloc = 'b'; style = "dashed,rounded"; } {

$SOBROBJ.Performance | ForEach-Object { Node $_.Name @{Label = Get-NodeIcon -Name $_.Name -IconType $_.Icon -Align "Center" -Rows $_.Rows; fontname = "Segoe Ui"; shape = "plain" } }
$SOBROBJ.Performance | ForEach-Object { Node $_.Name @{Label = Get-DiaNodeIcon -Name $_.Name -IconType $_.Icon -Align "Center" -Rows $_.Rows -ImagesObj $Images -IconDebug $IconDebug; fontname = "Segoe Ui"; shape = "plain" } }
}
}
if ($SOBROBJ.Capacity) {
SubGraph "$($SubGraphName)Capacity" -Attributes @{Label = "Capacity Extent"; fontsize = 18; penwidth = 1.5; labelloc = 'b'; style = "dashed,rounded" } {

$SOBROBJ.Capacity | ForEach-Object { Node $_.Name @{Label = Get-NodeIcon -Name $_.Name -IconType $_.Icon -Align "Center" -Rows $_.Rows; fontname = "Segoe Ui"; shape = "plain" } }
$SOBROBJ.Capacity | ForEach-Object { Node $_.Name @{Label = Get-DiaNodeIcon -Name $_.Name -IconType $_.Icon -Align "Center" -Rows $_.Rows -ImagesObj $Images -IconDebug $IconDebug; fontname = "Segoe Ui"; shape = "plain" } }
}
}
if ($SOBROBJ.Archive) {
SubGraph "$($SubGraphName)Archive" -Attributes @{Label = "Archive Extent"; fontsize = 18; penwidth = 1.5; labelloc = 'b'; style = "dashed,rounded" } {

$SOBROBJ.Archive | ForEach-Object { Node $_.Name @{Label = Get-NodeIcon -Name $_.Name -IconType $_.Icon -Align "Center" -Rows $_.Rows; fontname = "Segoe Ui"; shape = "plain" } }
$SOBROBJ.Archive | ForEach-Object { Node $_.Name @{Label = Get-DiaNodeIcon -Name $_.Name -IconType $_.Icon -Align "Center" -Rows $_.Rows -ImagesObj $Images -IconDebug $IconDebug; fontname = "Segoe Ui"; shape = "plain" } }
}
}

Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-DiagBackupToTape.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function Get-DiagBackupToTape {
$TSDriveOBJ | ForEach-Object { Edge -From $TSLibraryOBJ.id -To $_.id }
}
} else {
$Group = Split-Array -inArray $TapeLibraryDrives -size 3
$Group = Split-array -inArray $TapeLibraryDrives -size 3
$Number = 0
while ($Number -ne $Group.Length) {
$Random = Get-Random
Expand Down
Loading

0 comments on commit f54b76d

Please sign in to comment.