Release v4.1.0 - ContentDatabase inventory HTML report#20
Merged
Conversation
…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>
Pester Test Results 1 files 13 suites 1s ⏱️ Results for commit a292cd1. |
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 #19.
Adds a self-contained, offline HTML report for the ContentDatabase inventory (style of the SPSUserSync reports). Backward compatible with v4.0.0.
Highlights
SizeInBytes/SizeInMBper database (backward compatible: mount/upgrade still read only Name/WebAppUrl/Server).SPSUpdate.ps1: written to a newResults\folder on-Action InitContentDBand the Default-mode prime; failures warn but never block the run.4.1.0.Validation
-Action InitContentDBproduced the inventory and HTML report (13 databases, 4477 MB, 6.6% balance spread); rendered correctly in a browser.See
RELEASE-NOTES.mdfor the full notes.