Repository navigation
Dashboard: statistics, charts and a customizable widget layout - #257
Merged
Merged
Conversation
… realm default The dashboard becomes a catalog of widgets on a 12-column grid. Which widgets show, in which order and how wide resolves in three layers: the user's own arrangement, the realm default an admin set, the layout built into the app. Backend - GET /api/dashboard/stats: counts plus per-day login and security-event series, aggregated in SQL and bucketed by the viewer's calendar day. Each block is computed only when the caller holds the permission guarding the matching list surface and is omitted otherwise. - GET/PUT/DELETE /api/dashboard/layout for the caller's own arrangement; PUT/DELETE /api/admin/dashboard/default-layout (realm-settings:write) for the realm default. A layout is shape-checked only and grants nothing. - A permanent erase drops the user's arrangement. Frontend - TrendChart (line/area with crosshair tooltip) and DonutChart as plain SVG components on the design-system tokens, no chart dependency. - Thirteen widgets; an edit mode to reorder, resize, remove and add them, and for realm-settings:write to save or remove the realm default. The old "failed attempts, 24h" tile read a Level field the security-log endpoint never returned; the number now comes from the statistics endpoint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…egend drops below the ring when narrow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dgets - A placement can carry options (option key -> chosen values). In edit mode a gear opens the widget's settings: which counts the directory and applications widgets show, how many rows the list widgets show. - Counts for positions (behind the PositionTerminals feature), OAuth APIs and OAuth scopes, each behind the permission of its list. - GET /api/dashboard/my-apps: the clients the caller holds a valid authorization with, one row per client. - New personal widgets "My apps" and "My passkeys". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The dashboard becomes a catalog of widgets on a 12-column grid, with statistics and charts, and an arrangement each user can change.
What it does
realm-settings:writecan save or remove the realm default.Backend
GET /api/dashboard/stats— counts plus per-day series, aggregated in SQL and bucketed by the viewer's calendar day. Each block is computed only when the caller holds the permission guarding the matching list surface, and is omitted otherwise.GET /api/dashboard/my-apps— strictly the caller's own valid authorizations, one row per client.GET/PUT/DELETE /api/dashboard/layoutfor the caller's own arrangement;PUT/DELETE /api/admin/dashboard/default-layout(realm-settings:write) for the realm default. A layout is shape-checked only and grants nothing: the widget catalog lives in the frontend, and a widget the viewer may not see drops out at render time.Fixed along the way
The old "failed attempts, 24h" tile read a
Levelfield the security-log endpoint never returned. The number now comes from the statistics endpoint.Verification
DashboardEndpointsTests(day buckets in the viewer's zone, failure streaks, withheld blocks without permission, per-user layout, realm default gating, options, my-apps).Not in this PR
🤖 Generated with Claude Code