feat: run logging and self-contained HTML report - #18
Merged
Conversation
Collect a per-site result (Applied / Skipped / Compliant / Failed) for both the Legacy and site version policy paths, and render a dependency-free HTML report (summary cards + filterable table, HTML-encoded values). Local runs write a transcript to Logs/ and the report to Results/ (with retention pruning via LogRetentionDays); Azure Automation emits the HTML into the output stream instead. Add EnableReport and LogRetentionDays properties. Refs #17
Add assertions for the report/transcript helpers and a functional context that renders the report from sample results and checks the self-contained document, HTML encoding (no injection), DryRun badge and overall status. 110 tests pass. Refs #17
Document EnableReport and LogRetentionDays, add a Logging and reports section to the Configuration wiki (local files vs Azure Automation output stream), update CHANGELOG/RELEASE-NOTES (3.1.0) and the wiki Home feature list. Refs #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17
Summary
Adds structured run logging and a self-contained HTML report summarizing, per site, what the run did — the last feature of the version-policy work batch.
Changes
Add-RunResult).Export-SPSCleanVersionsReport): dependency-free (no CDN), summary cards + filterable table, all values HTML-encoded,DryRunbadge. SPSUpdate-style modular helpers embedded in the single script.Logs/, report toResults/, with retention pruning (LogRetentionDays, default 180).EnableReport(defaulttrue),LogRetentionDays(default180).Testing
Invoke-Pester-> 110 passed, 0 failed, including a functional context that renders the report and checks the self-contained document, HTML encoding (no injection), DryRun badge and overall status. The rendered report was also visually verified in a browser.Notes
Builds on #16.
Logs/andResults/are gitignored.