Repository navigation
feat(securescore): points to gain per control, sort, 2-decimal percentages, %/points chart toggle - #945
Merged
KelvinTegelaar merged 1 commit intoOct 20, 2026
Conversation
…tages, %/points chart toggle Secure Score page (single tenant): - each recommendation card shows what completing it is worth, e.g. "+6 pts (+2.21% total)": profile maxScore minus achieved score, and that gain as a share of the tenant's max score. Completed controls show +0; controls with no published maxScore get no chip, and the % part is dropped when the tenant max score is missing - new Sort menu (Points to gain, default / Implementation %) - new "Not Completed (Started + Not Started)" filter - the Secure Score chart gets a % / Points toggle, defaulting to % Dashboard Secure Score card: same % / Points toggle (0-100% axis in % mode), Latest % shown with 2 decimals. Percentages to 2 decimals: Current Score and both comparison tiles (Tenant Overview + Table tabs), AllTenants average / best / worst / per-tenant rows, and the portfolio trend. Get-CIPPSecureScoreReport now rounds PercentageScore to 2 decimals (was 1) so AllTenants values agree with the single-tenant view; it is computed at read time, no cache resync needed. Docs: Secure Score page (ordering, sorting, filter, gain chip, chart toggle) and the dashboard card entry.
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.
What
The Secure Score page showed how complete each recommendation is, but not what completing it is worth. This PR adds that, plus a sort on it and a few display improvements.
Secure Score page (single tenant)
+6 pts (+2.21% total): the points still available on the control (control-profilemaxScoreminus achievedscore) and how much the tenant's overall score would rise. Completed controls show+0. Controls with no publishedmaxScoreget no chip. If the tenant max score is missing, the%part is left out.Dashboard Secure Score card
Percentages shown with 2 decimals
Get-CIPPSecureScoreReportnow roundsPercentageScoreto 2 decimals (was 1), so AllTenants values match the single-tenant view. The value is calculated when the report is requested, so no cache resync is needed.No new API calls:
maxScorecomes from thesecureScoreControlProfilesrequest the page already makes.Docs: the Secure Score page (ordering, sorting, new filter, gain chip, chart toggle) and the dashboard card entry.
Testing
use-securescorehook tests cover the gain values and the missing-maxScorecase;useAllTenantsDashboardandSecureScoreCardsuites still pass (20/20).Get-CIPPSecureScoreReport.Tests.ps16/6.maxScore - currentScore(45.45 = 272 - 226.55).maxScoreforced to 0, the page still renders with points-only chips.