Files
GPU-Node/dashboard/src/components/ui/tabs.tsx
Claude c4a91972b3 feat: add llama dashboard for managing launch config via web UI
Adds a small Next.js dashboard as a new Docker service ()
that replaces the need to manually edit  and call  over SSH
every time you want to tweak llama launch parameters.

Features:
- Live status panel for all GPU-node containers (auto-refresh)
- Models list with file sizes, click-to-select active model
- Structured launch config form:
  * Model, ctx-size, parallel, batch-size, n-gpu-layers, threads
  * Context overflow (none / shift / evict)
  * Speculative decoding (spec-type, draft model, spec-draft-n-max)
  * Free-form extra args textarea for anything else
- Named presets (save / load / delete)
- Start / Restart / Stop / Remove llama actions
- Live streaming logs viewer (docker logs -f)
- GPU status (nvidia-smi via docker exec on llama)
- Auto-writes LLAMA_MODEL and LLAMA_EXTRA_ARGS back to .env so the
  existing workflow keeps working, and persists full structured config
  to gpu/dashboard/config.json for reload on next visit

Integration:
- New  service in compose.yaml (no profile, runs always)
- Mounts /var/run/docker.sock + HOST_PROJECT_PATH
- Tailscale serve exposes port 8090 -> dashboard:3000
- build.sh extended to build the dashboard image

Tech: Next.js 16 standalone, React 19, TypeScript 5, Tailwind 4,
shadcn-style components, Radix UI primitives.
2026-10-23 22:22:26 +00:00

55 lines
1.9 KiB
TypeScript

"use client";
import * as React from "react";
import * as TabsPrimitive from "@radix-ui/react-tabs";
import { cn } from "@/lib/utils";
const Tabs = TabsPrimitive.Root;
const TabsList = React.forwardRef<
React.ElementRef<typeof TabsPrimitive.List>,
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
>(({ className, ...props }, ref) => (
<TabsPrimitive.List
ref={ref}
className={cn(
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
className
)}
{...props}
/>
));
TabsList.displayName = TabsPrimitive.List.displayName;
const TabsTrigger = React.forwardRef<
React.ElementRef<typeof TabsPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
>(({ className, ...props }, ref) => (
<TabsPrimitive.Trigger
ref={ref}
className={cn(
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
className
)}
{...props}
/>
));
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
const TabsContent = React.forwardRef<
React.ElementRef<typeof TabsPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
>(({ className, ...props }, ref) => (
<TabsPrimitive.Content
ref={ref}
className={cn(
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
className
)}
{...props}
/>
));
TabsContent.displayName = TabsPrimitive.Content.displayName;
export { Tabs, TabsList, TabsTrigger, TabsContent };