"use client" import { Card, CardContent, CardHeader, CardTitle } from "./ui/card" import { Progress } from "./ui/progress" import { Badge } from "./ui/badge" import { ResponsiveContainer, BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip } from "recharts" import { HardDrive, Database, Archive, AlertTriangle, CheckCircle, Activity } from "lucide-react" const storageData = [ { name: "Used", value: 1250, color: "#3b82f6" }, // Blue { name: "Available", value: 750, color: "#10b981" }, // Green ] const diskPerformance = [ { disk: "sda", read: 45, write: 32, iops: 1250 }, { disk: "sdb", read: 67, write: 28, iops: 980 }, { disk: "sdc", read: 23, write: 45, iops: 1100 }, { disk: "nvme0n1", read: 156, write: 89, iops: 3400 }, ] export function StorageMetrics() { return (
{/* Storage Overview Cards */}
Total Storage
2.0 TB

1.25 TB used • 750 GB available

VM & LXC Storage
890 GB

71.2% of allocated space

Backups
245 GB
12 Backups

Last backup: 2h ago

IOPS
6.7K
Read: 4.2K Write: 2.5K

Average operations/sec

{/* Storage Distribution and Performance */}
Storage Distribution
Used Storage 1.25 TB (62.5%)
Available Storage 750 GB (37.5%)
Used
1.25 TB
Available
750 GB
Disk Performance
{/* Disk Details */} Storage Devices
{[ { name: "/dev/sda", type: "HDD", size: "1TB", used: "650GB", health: "healthy", temp: "42°C" }, { name: "/dev/sdb", type: "HDD", size: "1TB", used: "480GB", health: "healthy", temp: "38°C" }, { name: "/dev/sdc", type: "SSD", size: "500GB", used: "120GB", health: "healthy", temp: "35°C" }, { name: "/dev/nvme0n1", type: "NVMe", size: "1TB", used: "340GB", health: "warning", temp: "55°C" }, ].map((disk, index) => (
{disk.name}
{disk.type} • {disk.size}
{disk.used} / {disk.size}
Temp
{disk.temp}
{disk.health === "healthy" ? ( ) : ( )} {disk.health}
))}
) }