import React, { useState } from 'react'; import { Link, useLocation } from 'react-router-dom'; const StatusPanel = ({ onClose }) => (
online_prediction System Status
{[ { label: 'Agent A (INV-01)', status: 'STANDBY', color: 'text-tertiary' }, { label: 'Agent B (VAL-01)', status: 'STANDBY', color: 'text-tertiary' }, { label: 'WebSocket', status: 'CONNECTED', color: 'text-tertiary' }, { label: 'Ollama API', status: 'CHECKING...', color: 'text-secondary' }, { label: 'NEXUS Core', status: 'ONLINE', color: 'text-tertiary' }, ].map(({ label, status, color }) => (
{label} {status}
))}
); const LogsPanel = ({ onClose }) => { const [logs] = useState([ { time: '13:45:01', level: 'INFO', msg: 'NEXUS Core initialized' }, { time: '13:45:01', level: 'INFO', msg: 'WebSocket server listening on :7860' }, { time: '13:45:02', level: 'INFO', msg: 'Agent A ready — NEXUS-CORE-INV-01' }, { time: '13:45:02', level: 'INFO', msg: 'Agent B ready — NEXUS-CORE-VAL-01' }, { time: '13:45:05', level: 'WARN', msg: 'No active episode. Awaiting start command.' }, ]); const levelColor = { INFO: 'text-tertiary', WARN: 'text-secondary', ERROR: 'text-error' }; return (
terminal System Logs
{logs.map((l, i) => (
{l.time} {l.level} {l.msg}
))}
); }; const SideNavBar = () => { const location = useLocation(); const [activePanel, setActivePanel] = useState(null); // 'status' | 'logs' | null const navLinks = [ { name: 'Dashboard', icon: 'dashboard', path: '/' }, { name: 'Scenarios', icon: 'account_tree', path: '/scenarios' }, { name: 'Settings', icon: 'settings', path: '/settings' }, ]; const togglePanel = (panel) => setActivePanel(p => p === panel ? null : panel); return ( <> {/* Floating Panels */} {activePanel === 'status' && setActivePanel(null)} />} {activePanel === 'logs' && setActivePanel(null)} />} ); }; export default SideNavBar;