Skip to content

Merge conflict#245

Merged
rebelinux merged 3 commits intoAsBuiltReport:devfrom
rebelinux:dev
Mar 6, 2026
Merged

Merge conflict#245
rebelinux merged 3 commits intoAsBuiltReport:devfrom
rebelinux:dev

Conversation

@rebelinux
Copy link
Collaborator

Merge conflict

Copilot AI review requested due to automatic review settings March 6, 2026 19:31
@rebelinux rebelinux merged commit 5a2ba85 into AsBuiltReport:dev Mar 6, 2026
2 of 5 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Resolves a merge conflict by integrating the new “Replication” diagram into the Sites/Replication report content and enhancing the replication diagram output/metadata.

Changes:

  • Add a replication legend and edge-coloring logic to the replication topology diagram.
  • Update the Sites/Replication report section to render the “Replication” diagram (instead of “SitesInventory”).
  • Adjust replication connection transport protocol labeling and document the new diagram in the changelog.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
Src/Private/Get-AbrDiagReplication.ps1 Adds an HTML legend and colors edges based on intra-site vs inter-site replication.
Src/Private/Get-AbrADSite.ps1 Switches embedded diagram generation to -DiagramType 'Replication' and updates section text/messages.
Src/Private/Get-AbrADReplicationInfo.ps1 Changes default TransportProtocol for null/empty InterSiteTransportProtocol.
CHANGELOG.md Notes the addition of the replication diagram to the report.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


$ReplInfo = Get-AbrADReplicationInfo

$HTMLLegend = '<table border="0"><tr><td><font color="darkgreen">■</font> <b>IntraSite</b> <font color="darkblue">■</font> <b>InterSite</b></td></tr></table>'
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$HTMLLegend is being passed as a plain string into the subgraph Label. Graphviz only renders HTML-like labels when they are emitted as an unquoted HTML label (e.g. label=<<TABLE>...>>); as-is this will likely render the literal <table>...</table> text or break DOT parsing depending on the exporter. Use the same helper used elsewhere for HTML labels (e.g., wrap/construct via Add-DiaHtmlLabel/signature-table helper) so the label is emitted in HTML-label form, and avoid hard-coding markup in a raw string.

Suggested change
$HTMLLegend = '<table border="0"><tr><td><font color="darkgreen">■</font> <b>IntraSite</b> <font color="darkblue">■</font> <b>InterSite</b></td></tr></table>'
$HTMLLegend = Add-DiaHtmlLabel -Label '<table border="0"><tr><td><font color="darkgreen">■</font> <b>IntraSite</b> <font color="darkblue">■</font> <b>InterSite</b></td></tr></table>' -SubgraphLabel

Copilot uses AI. Check for mistakes.

$ReplInfo = Get-AbrADReplicationInfo

$HTMLLegend = '<table border="0"><tr><td><font color="darkgreen">■</font> <b>IntraSite</b> <font color="darkblue">■</font> <b>InterSite</b></td></tr></table>'
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The legend text is hard-coded in English (IntraSite/InterSite) even though the rest of the diagram strings use $reportTranslate.NewADDiagram.*. Please move these strings into the language .psd1 (e.g., add new translation keys) and build the legend from $reportTranslate so it can be localized consistently.

Suggested change
$HTMLLegend = '<table border="0"><tr><td><font color="darkgreen">■</font> <b>IntraSite</b> <font color="darkblue">■</font> <b>InterSite</b></td></tr></table>'
$HTMLLegend = ('<table border="0"><tr><td><font color="darkgreen">■</font> <b>{0}</b> <font color="darkblue">■</font> <b>{1}</b></td></tr></table>' -f $reportTranslate.NewADDiagram.IntraSite, $reportTranslate.NewADDiagram.InterSite)

Copilot uses AI. Check for mistakes.
AditionalInfo = $AditionalInfo
TransportProtocol = switch ([string]::IsNullOrEmpty($Conn.InterSiteTransportProtocol)) {
$true { 'Unknown' }
$true { 'RPC' }
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InterSiteTransportProtocol is the AD inter-site transport type (typically IP or SMTP). Mapping an empty/null value to 'RPC' is misleading/inaccurate and will cause the diagram edge labels to show RPC for connections where the transport protocol is actually unknown or not applicable. Consider keeping null/empty as 'Unknown' (previous behavior) or mapping to the correct default transport (IP) only if you can reliably assert that from AD semantics.

Suggested change
$true { 'RPC' }
$true { 'Unknown' }

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants