mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 11:36:17 +00:00
Update virtual-machines.tsx
This commit is contained in:
@@ -154,7 +154,7 @@ const getUsageColor = (percent: number): string => {
|
|||||||
if (percent >= 95) return "text-red-500"
|
if (percent >= 95) return "text-red-500"
|
||||||
if (percent >= 86) return "text-orange-500"
|
if (percent >= 86) return "text-orange-500"
|
||||||
if (percent >= 71) return "text-yellow-500"
|
if (percent >= 71) return "text-yellow-500"
|
||||||
return "text-white"
|
return "text-foreground"
|
||||||
}
|
}
|
||||||
|
|
||||||
const getIconColor = (percent: number): string => {
|
const getIconColor = (percent: number): string => {
|
||||||
@@ -696,7 +696,7 @@ export function VirtualMachines() {
|
|||||||
)}
|
)}
|
||||||
<Cpu
|
<Cpu
|
||||||
className={`h-4 w-4 ${
|
className={`h-4 w-4 ${
|
||||||
vm.status === "stopped" ? "text-gray-500" : getIconColor(Number.parseFloat(cpuPercent))
|
vm.status === "stopped" ? "text-gray-500" : getUsageColor(Number.parseFloat(cpuPercent))
|
||||||
}`}
|
}`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -708,7 +708,7 @@ export function VirtualMachines() {
|
|||||||
)}
|
)}
|
||||||
<MemoryStick
|
<MemoryStick
|
||||||
className={`h-4 w-4 ${
|
className={`h-4 w-4 ${
|
||||||
vm.status === "stopped" ? "text-gray-500" : getIconColor(Number.parseFloat(memPercent))
|
vm.status === "stopped" ? "text-gray-500" : getUsageColor(Number.parseFloat(memPercent))
|
||||||
}`}
|
}`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -720,7 +720,9 @@ export function VirtualMachines() {
|
|||||||
)}
|
)}
|
||||||
<HardDrive
|
<HardDrive
|
||||||
className={`h-4 w-4 ${
|
className={`h-4 w-4 ${
|
||||||
vm.status === "stopped" ? "text-gray-500" : getIconColor(Number.parseFloat(diskPercent))
|
vm.status === "stopped"
|
||||||
|
? "text-gray-500"
|
||||||
|
: getUsageColor(Number.parseFloat(diskPercent))
|
||||||
}`}
|
}`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user