import React, { useEffect, useState } from 'react'; type SystemMetric = { label: string; status: 'active' | 'standby' | 'online' | 'connected' | 'ready' | 'error'; color: string; }; export default function SystemStatus() { const [metrics, setMetrics] = useState([ { label: 'Intelligence Station', status: 'active', color: 'bg-green-500' }, { label: 'Production Station', status: 'active', color: 'bg-green-500' }, { label: 'WordPress Ignition', status: 'standby', color: 'bg-yellow-500' }, { label: 'Core API', status: 'online', color: 'bg-blue-500' }, { label: 'Directus DB', status: 'connected', color: 'bg-emerald-500' }, { label: 'WP Connection', status: 'ready', color: 'bg-green-500' } ]); // In a real scenario, we would poll an API here. // For now, we simulate the "Live" feeling or check basic connectivity. useEffect(() => { const checkHealth = async () => { // We can check Directus health via SDK in future // For now, we trust the static state or toggle visually to show life }; checkHealth(); }, []); return (

Sub-Station Status

{metrics.map((m, idx) => (
{m.label}
{m.status}
))}
); } function getStatusColor(status: string) { switch (status) { case 'active': return 'bg-green-600'; case 'standby': return 'bg-yellow-600'; case 'online': return 'bg-blue-600'; case 'connected': return 'bg-emerald-600'; case 'ready': return 'bg-green-600'; case 'error': return 'bg-red-600'; default: return 'bg-gray-600'; } }