Files
devplacepy/devplacepy/admin_sections.py
T
retoorandClaude Sonnet 5.5 1a9201cb91 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>
2026-11-15 01:50:50 +01:00

39 lines
1.9 KiB
Python
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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)