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

28 lines
784 B
TypeScript

import { NextResponse } from 'next/server'
// Mock telemetry data for development
// In production, this would call OpenShell API
export async function GET() {
try {
const cpu = Math.random() * 40 + 20 // 20-60%
const memory = Math.random() * 30 + 40 // 40-70%
const disk = Math.random() * 15 + 50 // 50-65%
const gpu = {
memoryUsed: Math.random() * 80 + 20, // 20-100 GB
memoryTotal: 80,
temperature: Math.random() * 30 + 60 // 60-90°C
}
return NextResponse.json({
cpu: parseFloat(cpu.toFixed(1)),
memory: parseFloat(memory.toFixed(1)),
disk: parseFloat(disk.toFixed(1)),
gpu
})
} catch (error) {
return NextResponse.json(
{ error: 'Failed to fetch telemetry' },
{ status: 500 }
)
}
}