Update AppImage

This commit is contained in:
MacRimi
2025-10-25 22:10:08 +02:00
parent 6bf5bd97b5
commit a229231c0c
2 changed files with 131 additions and 106 deletions

View File

@@ -640,6 +640,7 @@ export function NetworkMetrics() {
<Router className="h-5 w-5" /> <Router className="h-5 w-5" />
{selectedInterface?.name} - Interface Details {selectedInterface?.name} - Interface Details
</DialogTitle> </DialogTitle>
{selectedInterface?.status.toLowerCase() === "up" && selectedInterface?.vm_type !== "vm" && (
<div className="flex justify-end pt-2"> <div className="flex justify-end pt-2">
<Select value={modalTimeframe} onValueChange={(value: any) => setModalTimeframe(value)}> <Select value={modalTimeframe} onValueChange={(value: any) => setModalTimeframe(value)}>
<SelectTrigger className="w-[140px] bg-card border-border"> <SelectTrigger className="w-[140px] bg-card border-border">
@@ -654,6 +655,7 @@ export function NetworkMetrics() {
</SelectContent> </SelectContent>
</Select> </Select>
</div> </div>
)}
</DialogHeader> </DialogHeader>
{selectedInterface && ( {selectedInterface && (
@@ -789,6 +791,8 @@ export function NetworkMetrics() {
</div> </div>
)} )}
{/* Network Traffic Statistics - Only show if interface is UP and NOT a VM interface */}
{selectedInterface.status.toLowerCase() === "up" && selectedInterface.vm_type !== "vm" ? (
<div> <div>
<h3 className="text-sm font-semibold text-muted-foreground mb-4"> <h3 className="text-sm font-semibold text-muted-foreground mb-4">
Network Traffic Statistics ( Network Traffic Statistics (
@@ -830,7 +834,27 @@ export function NetworkMetrics() {
</div> </div>
</div> </div>
</div> </div>
) : selectedInterface.status.toLowerCase() === "up" && selectedInterface.vm_type === "vm" ? (
<div className="bg-muted/30 rounded-lg p-6 text-center">
<AlertCircle className="h-12 w-12 text-muted-foreground mx-auto mb-3" />
<h3 className="text-lg font-semibold text-foreground mb-2">Historical Metrics Not Available</h3>
<p className="text-sm text-muted-foreground">
Proxmox does not store historical network metrics for individual VM interfaces. Only cumulative
statistics since last boot are available below.
</p>
</div>
) : (
<div className="bg-muted/30 rounded-lg p-6 text-center">
<AlertCircle className="h-12 w-12 text-muted-foreground mx-auto mb-3" />
<h3 className="text-lg font-semibold text-foreground mb-2">Interface Inactive</h3>
<p className="text-sm text-muted-foreground">
This interface is currently down. Network traffic statistics are not available.
</p>
</div>
)}
{/* Cumulative Statistics - Only show if interface is UP */}
{selectedInterface.status.toLowerCase() === "up" && (
<div> <div>
<h3 className="text-sm font-semibold text-muted-foreground mb-4"> <h3 className="text-sm font-semibold text-muted-foreground mb-4">
Cumulative Statistics (Since Last Boot) Cumulative Statistics (Since Last Boot)
@@ -882,6 +906,7 @@ export function NetworkMetrics() {
)} )}
</div> </div>
</div> </div>
)}
{/* Bond Information */} {/* Bond Information */}
{selectedInterface.type === "bond" && selectedInterface.bond_slaves && ( {selectedInterface.type === "bond" && selectedInterface.bond_slaves && (

View File

@@ -183,7 +183,7 @@ export function NetworkTrafficChart({ timeframe, interfaceName, onTotalsCalculat
if (loading) { if (loading) {
return ( return (
<div className="flex items-center justify-center h-[200px]"> <div className="flex items-center justify-center h-[300px]">
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" /> <Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
</div> </div>
) )
@@ -191,7 +191,7 @@ export function NetworkTrafficChart({ timeframe, interfaceName, onTotalsCalculat
if (error) { if (error) {
return ( return (
<div className="flex flex-col items-center justify-center h-[200px] gap-2"> <div className="flex flex-col items-center justify-center h-[300px] gap-2">
<p className="text-muted-foreground text-sm">Network metrics not available yet</p> <p className="text-muted-foreground text-sm">Network metrics not available yet</p>
<p className="text-xs text-red-500">{error}</p> <p className="text-xs text-red-500">{error}</p>
</div> </div>
@@ -200,15 +200,15 @@ export function NetworkTrafficChart({ timeframe, interfaceName, onTotalsCalculat
if (data.length === 0) { if (data.length === 0) {
return ( return (
<div className="flex items-center justify-center h-[200px]"> <div className="flex items-center justify-center h-[300px]">
<p className="text-muted-foreground text-sm">No network metrics available</p> <p className="text-muted-foreground text-sm">No network metrics available</p>
</div> </div>
) )
} }
return ( return (
<ResponsiveContainer width="100%" height={200}> <ResponsiveContainer width="100%" height={300}>
<AreaChart data={data} margin={{ bottom: 40, left: 10, right: 10 }}> <AreaChart data={data} margin={{ bottom: 80, left: 10 }}>
<CartesianGrid strokeDasharray="3 3" stroke="currentColor" className="text-border" /> <CartesianGrid strokeDasharray="3 3" stroke="currentColor" className="text-border" />
<XAxis <XAxis
dataKey="time" dataKey="time"
@@ -217,7 +217,7 @@ export function NetworkTrafficChart({ timeframe, interfaceName, onTotalsCalculat
tick={{ fill: "currentColor", fontSize: 12 }} tick={{ fill: "currentColor", fontSize: 12 }}
angle={-45} angle={-45}
textAnchor="end" textAnchor="end"
height={40} height={60}
interval={tickInterval} interval={tickInterval}
/> />
<YAxis <YAxis