Instance admin feature#673
Open
seb-kw wants to merge 13 commits into
Open
Conversation
Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
Collaborator
|
Maybe we should also add a confirmation before revoking admin priviliges on a user? |
Collaborator
|
Backend part is done, now the frontend needs some adjustments as well: Org Dashboard
|
Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
…rning Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an instance-admin area in the web app, including signature-based admin authentication, instance-wide dashboards/tools, and updated vulnerability statistic modeling to show both remediation time and open-age metrics.
Changes:
- Added a new
/adminpage + layout with an in-memory admin session and ECDSA P-256 request signing through the devguard-tunnel. - Implemented admin UI cards for instance settings, daemon triggers (SSE logs), instance technical info, and instance-wide usage/vulnerability dashboards.
- Updated org overview statistics UI to show remediation + open-age per severity, and added manual refresh for org statistics.
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Switch JSX emit to react-jsx. |
| src/utils/format.ts | New formatting helpers for bytes/durations/dates/timestamps. |
| src/types/api/api.ts | Updated remediation/open-age stats typing and added instance-admin DTOs. |
| src/services/versionCheck.ts | GitHub release version check helper used by admin technical info. |
| src/services/adminApi.ts | Admin fetch client + SSE trigger helper for signed admin endpoints. |
| src/services/admin-request-signing.ts | Admin key import + HTTP Message Signatures signing implementation. |
| src/context/InstanceAdminContext.tsx | In-memory admin session context + auto-logout countdown. |
| src/components/ui/field.tsx | New field layout primitives for forms. |
| src/components/ui/alert-dialog.tsx | Raise alert dialog content z-index. |
| src/components/organization/AverageStatsSection.tsx | Update org averages section to remediation + open-age metrics. |
| src/components/organization/AverageOpenCodeRisks.tsx | Improve layout + locale formatting for average open code risks. |
| src/components/common/tours/org-overview-tour.tsx | Update tour text to match new averages cards meaning. |
| src/components/AverageFixingTimeChart.tsx | Support displaying optional “avg age of open” metric. |
| src/components/admin/TriggerDaemonsCard.tsx | UI to trigger admin daemons and stream logs via SSE. |
| src/components/admin/InstanceTechnicalInfo.tsx | Display build/process/runtime/db info + update check badge. |
| src/components/admin/InstanceSettingsCard.tsx | Admin toggle for organisation creation (single-org mode). |
| src/components/admin/InstanceDashboard.tsx | Instance-wide usage + vulnerability overview dashboard. |
| src/components/admin/ExternalOrgAdminCard.tsx | Manage admins for external/reserved organisations. |
| src/components/admin/AdminTools.tsx | Container to load/render admin tools + external orgs. |
| src/app/admin/page.tsx | Admin auth UI (paste private key) + main admin sections. |
| src/app/admin/layout.tsx | Admin layout wiring RootHeader + InstanceAdminProvider. |
| src/app/(loading-group)/[organizationSlug]/overview/page.tsx | Add “Refresh” to bypass backend cache and seed SWR. |
| package.json | Add signing dependency, bump some packages, and pin react-hook-form. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…estamp, drop no-op fetch cache Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.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.
No description provided.