import { HardDrive, Cpu, Zap, Activity } from "lucide-react"; import { motion } from "framer-motion"; interface SystemStatusProps { status?: { cpuLoad: number; memoryUsage: number; memoryTotal: number; storageUsage: number; activeRunners: number; uptime: string; }; } // Glowing ring gauge component function GlowingGauge({ value, icon: Icon, label, gradientColors }: { value: number; icon: typeof Cpu; label: string; gradientColors: [string, string]; }) { const radius = 40; const circumference = 2 * Math.PI * radius; const strokeDashoffset = circumference - (circumference * value) / 100; return ( {/* Outer glow */}
{/* Background circle */} {/* Animated progress circle */} {/* Gradient definition */} {/* Center content */}
{value}% {label}
); } export default function SystemStatus({ status }: SystemStatusProps) { if (!status) return null; return (
{/* Main HUD Gauge Cluster */}
80 ? ["#ef4444", "#f97316"] : ["#3b82f6", "#06b6d4"]} /> 80 ? ["#eab308", "#f97316"] : ["#8b5cf6", "#ec4899"]} />
{/* Sub-metrics panel with glowing border */} {/* Glowing border effect */}
{/* Storage Linear Bar */}
Storage {status.storageUsage}%
{/* Uptime */}
Uptime
{status.uptime}
{/* Runners */}
Runners
{status.activeRunners} Active
); }