diff --git a/AppImage/components/virtual-machines.tsx b/AppImage/components/virtual-machines.tsx index 198b552..7181b55 100644 --- a/AppImage/components/virtual-machines.tsx +++ b/AppImage/components/virtual-machines.tsx @@ -145,6 +145,12 @@ const getUsageColor = (percent: number): string => { return "text-white" } +const getIconColor = (percent: number): string => { + if (percent >= 80) return "text-red-500" + if (percent >= 50) return "text-yellow-500" + return "text-green-500" +} + const getProgressColor = (percent: number): string => { if (percent >= 80) return "[&>div]:bg-red-500" if (percent >= 50) return "[&>div]:bg-yellow-500" @@ -586,50 +592,41 @@ export function VirtualMachines() { -
- {/* Line 1: Status badge + Type badge + Name + ID */} -
- - {getStatusIcon(vm.status)} - - - {typeBadge.icon} - {typeBadge.label} - - {vm.name} - ID: {vm.vmid} -
- - {/* Line 2: IP + Uptime */} -
- {lxcIP && ( - - - {lxcIP} - - )} - Uptime: {formatUptime(vm.uptime)} -
- - {/* Line 3: CPU, Memory, Disk (numbers only with colors) */} -
-
- - {cpuPercent}% +
+
+ {/* Status circle with play/stop icon */} +
+ {vm.status === "running" ? ( + + ) : ( + + )}
-
- - - {memGB}/{maxMemGB} GB - + + {/* Name and ID */} +
+
+ {vm.name} ({vm.vmid}) +
-
- - - {diskGB}/{maxDiskGB} GB - + + {/* Status icons */} +
+ {/* Network icon - always green */} + + + {/* CPU icon - color based on usage */} + + + {/* Memory icon - color based on usage */} + + + {/* Disk icon - color based on usage */} +