Skip to content

feat: run logging and self-contained HTML report - #18

Merged
luigilink merged 3 commits into
mainfrom
feature/logging-report
Jul 15, 2026
Merged

feat: run logging and self-contained HTML report#18
luigilink merged 3 commits into
mainfrom
feature/logging-report

Conversation

@luigilink

Copy link
Copy Markdown
Owner

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

  • Per-site results (Applied / Skipped / Compliant / Failed) collected for both the Legacy and site version policy paths (via Add-RunResult).
  • HTML report (Export-SPSCleanVersionsReport): dependency-free (no CDN), summary cards + filterable table, all values HTML-encoded, DryRun badge. SPSUpdate-style modular helpers embedded in the single script.
  • Local execution: transcript to Logs/, report to Results/, with retention pruning (LogRetentionDays, default 180).
  • Azure Automation: no filesystem — the HTML is emitted into the output stream between clear markers.
  • New properties: EnableReport (default true), LogRetentionDays (default 180).

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/ and Results/ are gitignored.

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
@luigilink
luigilink merged commit 5bb05d3 into main Jul 15, 2026
1 check passed
@luigilink
luigilink deleted the feature/logging-report branch July 15, 2026 11:20
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.

Add logging (transcript) and a self-contained HTML report of actions

1 participant