Files
Mark McKeen 0c731b254a feat: Add NVIDIA industrial design dashboard with Create/Destoy sandbox workflows
- Industrial dark theme with #76B900 NVIDIA green accents
- Real-time telemetry from Kubernetes API
- Create Sandbox button and workflow
- Destroy Sandbox mode with destructive confirmation overlay
- Sidebar fetches pod data directly from /api/telemetry/real
- Fixed TypeError with defensive array checks
- Technical typography, sharp corners, data-dense panels
- Status indicators: GREEN RUNNING, red DESTROY mode
2026-03-26 16:39:19 -06:00

36 lines
1.1 KiB
TypeScript

"use client"
import { useState, useEffect } from 'react'
interface GaugeProps {
value: number
max: number
unit: string
color: string
label: string
}
export default function CompactGauge({ value, max, unit, color, label }: GaugeProps) {
const percentage = Math.min(100, Math.max(0, (value / max) * 100))
return (
<div className="metric p-4">
<div className="flex items-center justify-between mb-3">
<span className="text-[10px] text-[var(--foreground-dim)] uppercase tracking-wider font-semibold">{label}</span>
<span className="text-lg font-mono font-bold" style={{ color }}>
{value.toFixed(1)}<span className="text-xs ml-0.5">{unit}</span>
</span>
</div>
<div className="w-full h-2 bg-[var(--metric-bg)] rounded-sm overflow-hidden border border-[var(--metric-border)]">
<div
className="h-full rounded-sm transition-all duration-500 ease-out"
style={{
width: `${percentage}%`,
backgroundColor: color,
transition: 'width 0.5s ease-out'
}}
/>
</div>
</div>
)
}