import React from 'react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/index'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/index'; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/index'; import { Button } from '@/components/ui/index'; interface ContainerInfo { id: string; name: string; vmid: number; node: string; status: string; cpu: number; memory: number; disk: number; uptime?: string; } interface ContainerOverviewProps { container: ContainerInfo; onRefresh?: () => void; isLoading?: boolean; onPowerAction?: (action: 'start' | 'stop' | 'reboot' | 'shutdown' | 'resume' | 'suspend') => void; onConsole?: () => void; } export function ContainerOverview({ container, onRefresh, isLoading, onPowerAction, onConsole }: ContainerOverviewProps) { const statusColors = { running: 'bg-green-100 text-green-800', stopped: 'bg-gray-100 text-gray-800', suspended: 'bg-yellow-100 text-yellow-800', paused: 'bg-orange-100 text-orange-800', error: 'bg-red-100 text-red-800', }; return (

{container.name}

CT ID: {container.vmid} • Node: {container.node}

{container.status === 'running' && ( <> )} {container.status === 'stopped' && ( )} {container.status === 'suspended' && ( )}
{}}> Overview Configuration Hardware Snapshots Metrics
Status {container.status} CPU Cores
{container.cpu}
Memory
{container.memory} MB
Disk
{container.disk} GB
Quick Actions
Configuration
CT ID
{container.vmid}
Node
{container.node}
Status
{container.status}
Uptime
{container.uptime || 'N/A'}
Hardware Configuration Device Type Size Status Rootfs zfsvolume {container.disk} GB connected Network 0 virtio - connected CPU host {container.cpu} cores active Memory size {container.memory} MB active
Snapshots
No snapshots found for this container
Resource Metrics
Metrics data will be displayed here
); }