GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — feat: tenant-scoped admin dashboard statistics endpoint by Storypapst · Pull Request #390 · OpenResilienceInitiative/ORISO-UserService Conversation
Collaborator
ProblemThe admin statistics dashboard (ORISO-Admin) shows mock data only — no backend endpoint exists that serves real counselling statistics. KDG compliance requires statistics to come from the application-layer database (never from monitoring) with re-identification protection. What changed
Verification
Frontend counterpart: ORISO-Admin PR (linked below). 🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsAdds GET /useradmin/statistics/dashboard serving real counselling statistics for the admin statistics dashboard, computed exclusively from the application-layer database (KDG compliance - no monitoring data, no message content, no per-client drill-down). - AdminStatisticsRepository: native aggregate queries with explicit tenant restriction (Hibernate tenant filters do not apply to native queries), grouped by agency (tenant scope) or tenant (platform scope) - AdminDashboardStatisticsService: caller-scoped target resolution (platform admin -> per-tenant rows, tenant admin -> tenant total + per-agency rows, agency admin -> own agencies only via AdminAgency) - Small-cell suppression: counselling metrics of a target are omitted (suppressed=true) when the target covers fewer than 2 counsellor accounts, protecting against re-identification - Metrics: monthly enquiries (current/previous), active cases, active conversations today, group chat counts, daily new-session series (5 weeks), monthly top topics with share (4 months), session/chat counts per period (today/yesterday/week/total/year/last year) - SecurityConfig: endpoint restricted to USER_ADMIN, TENANT_ADMIN, SINGLE_TENANT_ADMIN, RESTRICTED_AGENCY_ADMIN Tests: 8 Mockito unit tests (scope resolution, suppression, topic share, daily series) plus a @DataJpaTest executing every native query against the H2 testing schema. Co-Authored-By: Claude Fable 5 <[email protected]>
|
There was an error while loading. Please reload this page.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Frontend counterpart: OpenResilienceInitiative/ORISO-Admin#293 (wires the admin statistics dashboard to this endpoint). Both PRs should be merged together — the Admin dashboard shows an error notice until this endpoint is available. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Adds statistics.small-cell-suppression.enabled (default true, settable via STATISTICS_SMALL_CELL_SUPPRESSION_ENABLED) so E2E verification with small test datasets (single-counselor agencies) is possible outside production. Fail-closed guard: when the prod profile is active, the disable switch is ignored, suppression stays enforced, and a warning is logged. The response carries suppressionDisabled=true only when suppression was actually skipped, so the frontend can show a test-environment banner. Tests: suppression skipped when disabled outside prod; prod profile + property false still enforces suppression (10/10 green). Co-Authored-By: Claude Fable 5 <[email protected]>
|
Amendment pushed: dev-only switch |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
* feat: add tenant-scoped admin dashboard statistics endpoint Adds GET /useradmin/statistics/dashboard serving real counselling statistics for the admin statistics dashboard, computed exclusively from the application-layer database (KDG compliance - no monitoring data, no message content, no per-client drill-down). - AdminStatisticsRepository: native aggregate queries with explicit tenant restriction (Hibernate tenant filters do not apply to native queries), grouped by agency (tenant scope) or tenant (platform scope) - AdminDashboardStatisticsService: caller-scoped target resolution (platform admin -> per-tenant rows, tenant admin -> tenant total + per-agency rows, agency admin -> own agencies only via AdminAgency) - Small-cell suppression: counselling metrics of a target are omitted (suppressed=true) when the target covers fewer than 2 counsellor accounts, protecting against re-identification - Metrics: monthly enquiries (current/previous), active cases, active conversations today, group chat counts, daily new-session series (5 weeks), monthly top topics with share (4 months), session/chat counts per period (today/yesterday/week/total/year/last year) - SecurityConfig: endpoint restricted to USER_ADMIN, TENANT_ADMIN, SINGLE_TENANT_ADMIN, RESTRICTED_AGENCY_ADMIN Tests: 8 Mockito unit tests (scope resolution, suppression, topic share, daily series) plus a @DataJpaTest executing every native query against the H2 testing schema. * feat: dev-only switch to disable small-cell suppression (fail-closed) Adds statistics.small-cell-suppression.enabled (default true, settable via STATISTICS_SMALL_CELL_SUPPRESSION_ENABLED) so E2E verification with small test datasets (single-counselor agencies) is possible outside production. Fail-closed guard: when the prod profile is active, the disable switch is ignored, suppression stays enforced, and a warning is logged. The response carries suppressionDisabled=true only when suppression was actually skipped, so the frontend can show a test-environment banner. Tests: suppression skipped when disabled outside prod; prod profile + property false still enforces suppression (10/10 green). --------- Co-authored-by: Frank Gerhardt <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.