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
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
// Mock action handler
|
||||
export async function POST(request: Request) {
|
||||
try {
|
||||
const { model } = await request.json()
|
||||
|
||||
if (!model) {
|
||||
return NextResponse.json(
|
||||
{ error: 'Model parameter is required' },
|
||||
{ status: 400 }
|
||||
)
|
||||
}
|
||||
|
||||
// In production, this would:
|
||||
// 1. Call Ollama API to switch the model
|
||||
// 2. Wait for confirmation
|
||||
// 3. Return success/error response
|
||||
await new Promise(resolve => setTimeout(resolve, 1000))
|
||||
|
||||
return NextResponse.json({
|
||||
message: `Model switched to ${model} successfully`
|
||||
})
|
||||
} catch (error) {
|
||||
return NextResponse.json(
|
||||
{ error: 'Failed to switch model' },
|
||||
{ status: 500 }
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
// Mock action handler
|
||||
export async function POST(request: Request) {
|
||||
try {
|
||||
// In production, this would:
|
||||
// 1. Call OpenShell API to create NemoClaw instance
|
||||
// 2. Wait for confirmation
|
||||
// 3. Return success/error response
|
||||
await new Promise(resolve => setTimeout(resolve, 1500))
|
||||
|
||||
return NextResponse.json({
|
||||
message: 'NemoClaw instance created successfully'
|
||||
})
|
||||
} catch (error) {
|
||||
return NextResponse.json(
|
||||
{ error: 'Failed to create NemoClaw instance' },
|
||||
{ status: 500 }
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
// Mock action handler
|
||||
export async function POST(request: Request) {
|
||||
try {
|
||||
// In production, this would:
|
||||
// 1. Call OpenShell API to start the sandbox
|
||||
// 2. Wait for confirmation
|
||||
// 3. Return success/error response
|
||||
await new Promise(resolve => setTimeout(resolve, 1000))
|
||||
|
||||
return NextResponse.json({
|
||||
message: 'Sandbox started successfully'
|
||||
})
|
||||
} catch (error) {
|
||||
return NextResponse.json(
|
||||
{ error: 'Failed to start sandbox' },
|
||||
{ status: 500 }
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
// Mock action handler
|
||||
export async function POST(request: Request) {
|
||||
try {
|
||||
// In production, this would:
|
||||
// 1. Call OpenShell API to stop the sandbox
|
||||
// 2. Wait for confirmation
|
||||
// 3. Return success/error response
|
||||
await new Promise(resolve => setTimeout(resolve, 1000))
|
||||
|
||||
return NextResponse.json({
|
||||
message: 'Sandbox stopped successfully'
|
||||
})
|
||||
} catch (error) {
|
||||
return NextResponse.json(
|
||||
{ error: 'Failed to stop sandbox' },
|
||||
{ status: 500 }
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user