"use client" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, AreaChart, Area } from "recharts" import { Wifi, Globe, Shield, Activity, Network, Router } from "lucide-react" const networkTraffic = [ { time: "00:00", incoming: 45, outgoing: 32 }, { time: "04:00", incoming: 52, outgoing: 28 }, { time: "08:00", incoming: 78, outgoing: 65 }, { time: "12:00", incoming: 65, outgoing: 45 }, { time: "16:00", incoming: 82, outgoing: 58 }, { time: "20:00", incoming: 58, outgoing: 42 }, { time: "24:00", incoming: 43, outgoing: 35 }, ] const connectionData = [ { time: "00:00", connections: 1250 }, { time: "04:00", connections: 980 }, { time: "08:00", connections: 1850 }, { time: "12:00", connections: 1650 }, { time: "16:00", connections: 2100 }, { time: "20:00", connections: 1580 }, { time: "24:00", connections: 1320 }, ] export function NetworkMetrics() { return (
{/* Network Overview Cards */}
Network Traffic
156 MB/s
↓ 89 MB/s ↑ 67 MB/s

Peak: 245 MB/s at 16:30

Active Connections
1,847
Normal

↑ 12% from last hour

Firewall Status
Active
Protected

247 blocked attempts today

Latency
12ms
Excellent

Avg response time

{/* Network Charts */}
Network Traffic (24h) [`${value} MB/s`, name === "incoming" ? "Incoming" : "Outgoing"]} /> Active Connections (24h) [`${value}`, "Connections"]} />
{/* Network Interfaces */} Network Interfaces
{[ { name: "vmbr0", type: "Bridge", status: "up", ip: "192.168.1.100/24", speed: "1000 Mbps", rx: "2.3 GB", tx: "1.8 GB", }, { name: "enp1s0", type: "Physical", status: "up", ip: "192.168.1.101/24", speed: "1000 Mbps", rx: "1.2 GB", tx: "890 MB", }, { name: "vmbr1", type: "Bridge", status: "up", ip: "10.0.0.1/24", speed: "1000 Mbps", rx: "456 MB", tx: "234 MB", }, { name: "tap101i0", type: "TAP", status: "up", ip: "10.0.0.101/24", speed: "1000 Mbps", rx: "123 MB", tx: "89 MB", }, ].map((interface_, index) => (
{interface_.name}
{interface_.type} • {interface_.speed}
IP Address
{interface_.ip}
RX / TX
{interface_.rx} / {interface_.tx}
{interface_.status.toUpperCase()}
))}
) }