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>
39 lines
1.9 KiB
Python
39 lines
1.9 KiB
Python
# retoor <retoor@molodetz.nl>
|
||
|
||
from dataclasses import dataclass
|
||
|
||
|
||
@dataclass(frozen=True)
|
||
class AdminSection:
|
||
key: str
|
||
label: str
|
||
href: str
|
||
icon: str
|
||
|
||
|
||
ADMIN_SECTIONS: tuple[AdminSection, ...] = (
|
||
AdminSection("users", "Users", "/admin/users", "\U0001f465"),
|
||
AdminSection("news", "News", "/admin/news", "\U0001f4f0"),
|
||
AdminSection("media", "Media", "/admin/media", "\U0001f5bc️"),
|
||
AdminSection("moderation", "Moderation", "/admin/moderation", "\U0001f6a9"),
|
||
AdminSection("trash", "Trash", "/admin/trash", "\U0001f5d1️"),
|
||
AdminSection("services", "Services", "/admin/services", "⚙️"),
|
||
AdminSection("gateway", "Gateway", "/admin/gateway", "\U0001f500"),
|
||
AdminSection("containers", "Containers", "/admin/containers", "\U0001f4e6"),
|
||
AdminSection("workspaces", "Workspaces", "/admin/workspaces", "\U0001f4bb"),
|
||
AdminSection("devii-tasks", "Devii tasks", "/admin/devii-tasks", "⏰"),
|
||
AdminSection("communities", "Communities", "/admin/communities", "\U0001f310"),
|
||
AdminSection("nodes", "Community nodes", "/admin/nodes", "\U0001f4e1"),
|
||
AdminSection("bots", "Bot Monitor", "/admin/bots", "\U0001f916"),
|
||
AdminSection("game", "Code Farm", "/admin/game", "\U0001f69c"),
|
||
AdminSection("ai-usage", "AI usage", "/admin/ai-usage", "\U0001f4ca"),
|
||
AdminSection("statistics", "Statistics", "/admin/statistics", "\U0001f4c8"),
|
||
AdminSection("audit-log", "Audit Log", "/admin/audit-log", "\U0001f4cb"),
|
||
AdminSection("backups", "Backups", "/admin/backups", "\U0001f4be"),
|
||
AdminSection("issues", "Ticket Planning", "/admin/issues/planning", "\U0001f5c2️"),
|
||
AdminSection("notifications", "Notifications", "/admin/notifications", "\U0001f514"),
|
||
AdminSection("settings", "Settings", "/admin/settings", "\U0001f527"),
|
||
)
|
||
|
||
ADMIN_SECTION_KEYS: frozenset[str] = frozenset(section.key for section in ADMIN_SECTIONS)
|