Skip to content

Release v4.1.0 - ContentDatabase inventory HTML report#20

Merged
luigilink merged 4 commits into
mainfrom
release/4.1.0
Jun 29, 2026
Merged

Release v4.1.0 - ContentDatabase inventory HTML report#20
luigilink merged 4 commits into
mainfrom
release/4.1.0

Conversation

@luigilink

Copy link
Copy Markdown
Owner

Closes #19.

Adds a self-contained, offline HTML report for the ContentDatabase inventory (style of the SPSUserSync reports). Backward compatible with v4.0.0.

Highlights

  • Export-SPSUpdateDbReport (new public function): summary cards (total DBs, total MB, balance spread), per-sequence LPT distribution bars, and a sortable/filterable table of every database. Tolerates pre-4.1.0 inventories without size (renders 'n/a', distributes by count).
  • Initialize-SPSContentDbJsonFile now persists SizeInBytes/SizeInMB per database (backward compatible: mount/upgrade still read only Name/WebAppUrl/Server).
  • Report wired into SPSUpdate.ps1: written to a new Results\ folder on -Action InitContentDB and the Default-mode prime; failures warn but never block the run.
  • Private report helpers (HTML encoder + asset builders), one function per file.
  • Manifest bumped to 4.1.0.

Validation

  • PSScriptAnalyzer clean; 130 Pester tests passing (1 Windows-only skipped).
  • Verified on the real 3-server Subscription Edition farm: -Action InitContentDB produced the inventory and HTML report (13 databases, 4477 MB, 6.6% balance spread); rendered correctly in a browser.

See RELEASE-NOTES.md for the full notes.

luigilink and others added 4 commits June 29, 2026 16:05
…port)

Introduce a self-contained, offline HTML report for the ContentDatabase
inventory, styled after the SPSUserSync reports:
- Enrich Initialize-SPSContentDbJsonFile: persist SizeInBytes/SizeInMB per
  database in the inventory JSON (backward compatible - mount/upgrade still
  read only Name/WebAppUrl/Server).
- New private helpers: ConvertTo-SPSHtmlEncoded and Get-SPSReportAssets
  (summary card, document head + embedded CSS, per-sequence distribution
  bars, and the vanilla-JS interactive table with numeric-aware sorting).
- New public Export-SPSUpdateDbReport: reads a *-ContentDBs.json inventory
  and renders summary cards (total DBs, total MB, balance spread), the LPT
  distribution per sequence, and a sortable/filterable table. Tolerates
  pre-4.1.0 inventories without size (shows 'n/a', distributes by count).
- Bump module manifest to 4.1.0 and export the new function.

PSScriptAnalyzer clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a Results/ folder and a Write-SPSUpdateDbReport helper that renders the
inventory HTML report via Export-SPSUpdateDbReport. It runs after the
inventory JSON is (re)generated in both the InitContentDB action and the
Default-mode prime, writing <App>-<Env>-<Farm>-ContentDBs.html next to the
Logs/Config folders. Report failures warn but never block the run.

Ignore src/Results/ and generated *-ContentDBs.html runtime output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Split the multi-function Get-SPSReportAssets.ps1 into one-function-per-file
  private helpers (Get-SPSReportCardHtml, Get-SPSReportHtmlHead,
  Get-SPSReportDistributionHtml, Get-SPSReportHtmlScript) to honour the
  module's one-function-per-file convention.
- Add Export-SPSUpdateDbReport.Tests.ps1: self-contained HTML output, total
  size + distribution bars, JSON-payload markup neutralization, every row
  embedded, the legacy no-size inventory path (n/a + distribute by count),
  reading from a JSON file, and the missing-file error.
- Update the module test: expect Export-SPSUpdateDbReport in the public set
  and the new private helpers hidden.

PSScriptAnalyzer clean; 130 Pester tests passing (1 Windows-only skipped).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- wiki/Usage.md: new 'ContentDatabase inventory report' section and the
  Results\ output, plus an on-demand Export-SPSUpdateDbReport example.
- CHANGELOG.md: add the [4.1.0] section.
- RELEASE-NOTES.md: replace with the 4.1.0 notes only (release body).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Pester Test Results

  1 files   13 suites   1s ⏱️
 50 tests  50 ✅ 0 💤 0 ❌
131 runs  131 ✅ 0 💤 0 ❌

Results for commit a292cd1.

@luigilink luigilink merged commit 9b5ad11 into main Jun 29, 2026
3 checks passed
@luigilink luigilink deleted the release/4.1.0 branch June 29, 2026 14: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.

ContentDatabase inventory HTML report (v4.1.0)

1 participant