import { motion, AnimatePresence } from 'framer-motion'; import { useLocation, useNavigate } from 'react-router-dom'; import styles from './ControlRoom.module.css'; /** * ControlRoom * Admin-only surface. Accessible at /control-room. * Protected by AdminGuard at router level AND FastAPI RBAC middleware. * * Panels (left sidebar → content area): * System Health — service status, GPU utilization, queue depths * Oracle Admin — schema catalog, canvas management, MCP tools * Comms Config — WAHA/Evolution provider, webhook setup * Users & Roles — broker roster, role assignment, audit log * Model Hydration — s5cmd sync status, model inventory * Meta Integration — OAuth, ad account, Lookalike sync * * Design: deliberately more "operator" than "broker" — still glassmorphic * but denser information, monospace for technical values. */ type Panel = | 'system' | 'oracle-admin' | 'comms-config' | 'users' | 'models' | 'meta'; const PANELS: { id: Panel; label: string; icon: string }[] = [ { id: 'system', label: 'System Health', icon: '⬡' }, { id: 'oracle-admin', label: 'Oracle Admin', icon: '◈' }, { id: 'comms-config', label: 'Comms Config', icon: '⟐' }, { id: 'users', label: 'Users & Roles', icon: '⊛' }, { id: 'models', label: 'Model Hydration', icon: '⊗' }, { id: 'meta', label: 'Meta Integration', icon: '⊕' }, ]; export default function ControlRoom() { const navigate = useNavigate(); const location = useLocation(); const routePanel = location.pathname.split('/').filter(Boolean)[1] as Panel | undefined; const active: Panel = PANELS.some((panel) => panel.id === routePanel) ? routePanel! : 'system'; return (
System Administration · Admin Access Only
{svc.name}
{svc.replicas}
{svc.latency !== '—' && Latency: {svc.latency}}
SGLang → Qwen3.6 35B
● Loaded
ComfyUI → Wan 2.2 + Qwen-Image
● Loaded
Canvas management, schema catalog, and MCP tools. These controls are not visible to broker-role users.
Query canvas history, fork/merge, and revision management available here.
WhatsApp provider setup. Never visible to sales brokers.
| Name | Role | Last Active | ||
|---|---|---|---|---|
| Sagnik | sagnik@desineuron.in | ADMIN |
Now |
NVMe-backed model store. Re-sync from S3 via s5cmd.
{models.map(m => ({m.path}
OAuth, Ad Account, and Lookalike Audience configuration. Never visible to broker-role users.