Conversation
### Added
- Add initial support for diagrams using the Diagrammer module
- Add Export-AbrDiagram function to handle diagram exports
- Generate a Process Hierarchy Diagram in Invoke-AsBuiltReport.System.Resources
- Add initial support for charts
- Generate Memory Usage and CPU Usage charts in Invoke-AsBuiltReport.System.Resources
### Changed
- Increase module dependencies:
- AsBuiltReport.Core minimum version increased to 1.6.2
- Diagrammer.Core minimum version increased to 0.2.38
- AsBuiltReport.Chart minimum version increased to 0.2.0
There was a problem hiding this comment.
Pull request overview
This PR adds initial support for diagrams and charts to the AsBuiltReport System Resources module. The changes consolidate process-related functionality and introduce visual representations of system metrics.
Changes:
- Added chart generation for CPU and Memory usage using the AsBuiltReport.Chart module
- Implemented process hierarchy diagram generation using the Diagrammer.Core module
- Refactored translation structure to consolidate process-related strings into a single section
- Updated module dependencies to support new charting and diagramming capabilities
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Src/Public/Invoke-AsBuiltReport.System.Resources.ps1 | Removed diagram code and translation imports (moved to Get-AbrProcessInfo) |
| Src/Private/Get-AbrProcessInfo.ps1 | Added CPU/Memory charts and process hierarchy diagram generation |
| Src/Private/Get-AbrProcessDiagram.ps1 | Removed redundant translation assignment, now inherits from parent scope |
| Src/Private/Export-AbrDiagram.ps1 | Changed diagram section heading from Heading2 to Heading3 for proper hierarchy |
| Language/*.psd1 | Consolidated translation keys: removed separate sections, merged into GetAbrProcessInfo |
| AsBuiltReport.System.Resources.psd1 | Added dependencies for AsBuiltReport.Chart (0.2.0) and Diagrammer.Core (0.2.38), updated copyright year |
| CHANGELOG.md | Documented new features and dependency changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Label = Process Hierarchy | ||
| MainDiagramLabel = Process Hierarchy Diagram | ||
| Unable = Unable to generate the Process Hierarchy Diagram. | ||
| MEMUsage = Memory Usage |
There was a problem hiding this comment.
There is a trailing space after "Memory Usage" on this line. Trailing spaces should be removed to maintain code quality and consistency.
| MEMUsage = Memory Usage | |
| MEMUsage = Memory Usage |
| - Generate Memory Usage and CPU Usage charts in Invoke-AsBuiltReport.System.Resources | ||
|
|
||
| ### Changed | ||
|
|
||
| - Increase module dependencies: | ||
| - AsBuiltReport.Core minimum version increased to 1.6.2 | ||
| - Diagrammer.Core minimum version increased to 0.2.38 | ||
| - AsBuiltReport.Chart minimum version increased to 0.2.0 |
There was a problem hiding this comment.
Inconsistent indentation for sub-bullets. Lines 13-14 use 2 spaces while line 16 uses 4 spaces. Similarly, lines 21-23 use 4 spaces. For consistency, all sub-bullets should use the same indentation level (typically 2 or 4 spaces).
| - Generate Memory Usage and CPU Usage charts in Invoke-AsBuiltReport.System.Resources | |
| ### Changed | |
| - Increase module dependencies: | |
| - AsBuiltReport.Core minimum version increased to 1.6.2 | |
| - Diagrammer.Core minimum version increased to 0.2.38 | |
| - AsBuiltReport.Chart minimum version increased to 0.2.0 | |
| - Generate Memory Usage and CPU Usage charts in Invoke-AsBuiltReport.System.Resources | |
| ### Changed | |
| - Increase module dependencies: | |
| - AsBuiltReport.Core minimum version increased to 1.6.2 | |
| - Diagrammer.Core minimum version increased to 0.2.38 | |
| - AsBuiltReport.Chart minimum version increased to 0.2.0 |
| Write-PScriboMessage ($($reportTranslate.InfoLevel) -f 'ProcessInfo', $($InfoLevel.ProcessInfo)) | ||
| Write-PScriboMessage $($reportTranslate.Generating) |
There was a problem hiding this comment.
The removal of the $reportTranslate assignment creates an implicit dependency on the parent function's scope. Get-AbrProcessDiagram now relies on being called from Get-AbrProcessInfo to inherit the correct $reportTranslate variable. This differs from the pattern used in other private functions (Get-AbrDate, Get-AbrTimeZone, etc.) which all explicitly assign their own $reportTranslate in the begin block. While this will work functionally since Get-AbrProcessDiagram is only called from Get-AbrProcessInfo, it creates an implicit coupling and reduces the function's reusability. Consider adding $reportTranslate = $reportTranslate.GetAbrProcessInfo to maintain consistency with other functions and make the dependency explicit.
[0.1.2] - Unreleased
Added
Changed