Admin pages: one shared specification, builders, fragments, caps and live refresh

Adds admin_sections registry, shared admin partials, WorkspaceList, admin CLAUDE.md spec,
capped node/flag listings, and api/unit tests enforcing the spec.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 01:50:50 +01:00
co-authored by Claude Sonnet 5.5
parent 8d4d06de61
commit 1a9201cb91
93 changed files with 2396 additions and 1278 deletions
+5 -1
View File
@@ -15,6 +15,8 @@ from devplacepy.database.nodes import (
DEVICE_BREAKDOWN_COLUMNS,
LIMITS,
add_event,
count_all_devices,
count_flags,
count_open_requests,
device_breakdown,
cache_stats,
@@ -234,7 +236,7 @@ def overview() -> dict:
lifetime = lifetime_counters()
outcomes = {name: value for name, value in lifetime.items() if name.startswith(OUTCOME_PREFIX)}
devices = recent_devices(ADMIN_LIST_LIMIT)
flags = list_flags()[:ADMIN_LIST_LIMIT]
flags = list_flags(limit=ADMIN_LIST_LIMIT)
device_by_uid = {row["uid"]: row for row in devices}
missing = [row["device_uid"] for row in flags if row.get("device_uid") and row["device_uid"] not in device_by_uid]
for uid in missing:
@@ -251,7 +253,9 @@ def overview() -> dict:
**breakdowns,
"usage_today": usage_day_totals(),
"flags": flag_views(flags, owners, device_by_uid),
"flags_total": count_flags(),
"devices": device_views(devices, owners),
"devices_total": count_all_devices(),
"settings": settings_view(),
"limits": LIMITS.describe(),
"circuits": circuit_views(),