Update AppImage

This commit is contained in:
MacRimi
2025-10-23 17:21:48 +02:00
parent 13dd400795
commit 9f62f8eff9
2 changed files with 57 additions and 47 deletions

View File

@@ -515,6 +515,7 @@ export function StorageOverview() {
<div className="space-y-4"> <div className="space-y-4">
{proxmoxStorage.storage {proxmoxStorage.storage
.filter((storage) => storage && storage.name && storage.total > 0) .filter((storage) => storage && storage.name && storage.total > 0)
.sort((a, b) => a.name.localeCompare(b.name))
.map((storage) => ( .map((storage) => (
<div key={storage.name} className="border rounded-lg p-4"> <div key={storage.name} className="border rounded-lg p-4">
<div className="flex items-center justify-between mb-3"> <div className="flex items-center justify-between mb-3">
@@ -612,15 +613,15 @@ export function StorageOverview() {
</div> </div>
<div className="grid grid-cols-3 gap-4 text-sm"> <div className="grid grid-cols-3 gap-4 text-sm">
<div> <div>
<p className="text-muted-foreground">Size</p> <p className="text-sm text-muted-foreground">Size</p>
<p className="font-medium">{pool.size}</p> <p className="font-medium">{pool.size}</p>
</div> </div>
<div> <div>
<p className="text-muted-foreground">Allocated</p> <p className="text-sm text-muted-foreground">Allocated</p>
<p className="font-medium">{pool.allocated}</p> <p className="font-medium">{pool.allocated}</p>
</div> </div>
<div> <div>
<p className="text-muted-foreground">Free</p> <p className="text-sm text-muted-foreground">Free</p>
<p className="font-medium">{pool.free}</p> <p className="font-medium">{pool.free}</p>
</div> </div>
</div> </div>

View File

@@ -399,9 +399,7 @@ export function SystemOverview() {
const tempStatus = getTemperatureStatus(systemData.temperature) const tempStatus = getTemperatureStatus(systemData.temperature)
const localStorage = proxmoxStorageData?.storage.find( const localStorage = proxmoxStorageData?.storage.find((s) => s.name === "local")
(s) => s.name === "local-lvm" || s.name === "local-zfs" || s.name === "local",
)
const getLoadStatus = (load: number, cores: number) => { const getLoadStatus = (load: number, cores: number) => {
if (load < cores) { if (load < cores) {
@@ -531,54 +529,65 @@ export function SystemOverview() {
<CardContent> <CardContent>
{storageData ? ( {storageData ? (
<div className="space-y-4"> <div className="space-y-4">
<div className="flex justify-between items-center pb-3 border-b border-border"> <div className="space-y-2 pb-3 border-b border-border">
<span className="text-sm text-muted-foreground">Total Capacity:</span> <div className="flex justify-between items-center">
<span className="text-lg font-semibold text-foreground">{storageData.total} TB</span> <span className="text-sm text-muted-foreground">Total Capacity:</span>
<span className="text-lg font-semibold text-foreground">{storageData.total} TB</span>
</div>
<div className="flex justify-between items-center">
<span className="text-sm text-muted-foreground">Physical Disks:</span>
<span className="text-sm font-semibold text-foreground">
{storageData.disk_count} disk{storageData.disk_count !== 1 ? "s" : ""}
</span>
</div>
</div> </div>
{localStorage ? ( <div className="space-y-2 pb-3 border-b border-border">
<> <div className="text-xs font-medium text-muted-foreground mb-2">Node Storage</div>
<div className="pt-2"> <div className="flex justify-between items-center">
<div className="text-xs text-muted-foreground mb-2">System Storage ({localStorage.name})</div> <span className="text-xs text-muted-foreground">Used:</span>
<div className="flex justify-between items-center mb-1"> <span className="text-sm font-semibold text-foreground">{storageData.used.toFixed(1)} GB</span>
<span className="text-sm text-muted-foreground">Used:</span> </div>
<span className="text-sm font-semibold text-foreground">{localStorage.used} GB</span> <div className="flex justify-between items-center">
</div> <span className="text-xs text-muted-foreground">Available:</span>
<div className="flex justify-between items-center mb-2"> <span className="text-sm font-semibold text-green-500">{storageData.available.toFixed(1)} GB</span>
<span className="text-sm text-muted-foreground">Available:</span> </div>
<span className="text-sm font-semibold text-green-500">{localStorage.available} GB</span> <Progress
</div> value={(storageData.used / (storageData.used + storageData.available)) * 100}
<Progress value={localStorage.percent} className="mt-2 [&>div]:bg-blue-500" /> className="mt-2 [&>div]:bg-blue-500"
<div className="flex justify-between items-center mt-1"> />
<span className="text-xs text-muted-foreground"> <div className="flex justify-between items-center mt-1">
{localStorage.used} / {localStorage.total} GB <span className="text-xs text-muted-foreground">
</span> {storageData.used.toFixed(1)} / {(storageData.used + storageData.available).toFixed(1)} GB
<span className="text-xs text-muted-foreground">{localStorage.percent.toFixed(1)}%</span> </span>
</div> <span className="text-xs text-muted-foreground">
</div> {((storageData.used / (storageData.used + storageData.available)) * 100).toFixed(1)}%
</> </span>
) : ( </div>
<> </div>
{localStorage && (
<div className="space-y-2">
<div className="text-xs font-medium text-muted-foreground mb-2">Local Storage (System)</div>
<div className="flex justify-between items-center"> <div className="flex justify-between items-center">
<span className="text-sm text-muted-foreground">Used:</span> <span className="text-xs text-muted-foreground">Used:</span>
<span className="text-lg font-semibold text-foreground">{storageData.used} GB</span> <span className="text-sm font-semibold text-foreground">{formatStorage(localStorage.used)}</span>
</div> </div>
<div className="flex justify-between items-center"> <div className="flex justify-between items-center">
<span className="text-sm text-muted-foreground">Available:</span> <span className="text-xs text-muted-foreground">Available:</span>
<span className="text-lg font-semibold text-green-500">{storageData.available} GB</span> <span className="text-sm font-semibold text-green-500">
{formatStorage(localStorage.available)}
</span>
</div> </div>
<Progress <Progress value={localStorage.percent} className="mt-2 [&>div]:bg-purple-500" />
value={(storageData.used / (storageData.used + storageData.available)) * 100} <div className="flex justify-between items-center mt-1">
className="mt-2 [&>div]:bg-blue-500" <span className="text-xs text-muted-foreground">
/> {formatStorage(localStorage.used)} / {formatStorage(localStorage.total)}
</> </span>
<span className="text-xs text-muted-foreground">{localStorage.percent.toFixed(1)}%</span>
</div>
</div>
)} )}
<div className="pt-2 border-t border-border">
<p className="text-xs text-muted-foreground">
{storageData.disk_count} physical disk{storageData.disk_count !== 1 ? "s" : ""} configured
</p>
</div>
</div> </div>
) : ( ) : (
<div className="text-center py-8 text-muted-foreground">Storage data not available</div> <div className="text-center py-8 text-muted-foreground">Storage data not available</div>