Update AppImage

This commit is contained in:
MacRimi
2025-10-26 16:23:46 +01:00
parent 13b9dd0262
commit 11fae19e33
2 changed files with 156 additions and 107 deletions

View File

@@ -163,13 +163,10 @@ export function NetworkMetrics() {
revalidateOnReconnect: true,
})
// const { data: interfaceTotalsData } = useSWR<{
// timeframe: string
// interfaces: Record<string, { received: number; sent: number }>
// }>(`/api/network/interfaces/totals?timeframe=${timeframe}`, fetcher, {
// refreshInterval: 60000,
// revalidateOnFocus: false,
// })
const { data: interfaceHistoricalData } = useSWR<any>(`/api/node/metrics?timeframe=${timeframe}`, fetcher, {
refreshInterval: 30000,
revalidateOnFocus: false,
})
if (isLoading) {
return (
@@ -401,7 +398,6 @@ export function NetworkMetrics() {
<div className="space-y-4">
{networkData.physical_interfaces.map((interface_, index) => {
const typeBadge = getInterfaceTypeBadge(interface_.type)
// const interfaceTotals = interfaceTotalsData?.interfaces?.[interface_.name] // Removed
return (
<div
@@ -448,9 +444,8 @@ export function NetworkMetrics() {
</div>
<div className="col-span-2 md:col-span-1">
<div className="text-muted-foreground text-xs">Traffic ({getTimeframeLabel()})</div>
<div className="text-muted-foreground text-xs">Traffic since last boot</div>
<div className="font-medium text-foreground text-xs">
{/* Removed timeframe-based data, will now show Traffic since last boot */}
<span className="text-green-500"> {formatBytes(interface_.bytes_recv)}</span>
{" / "}
<span className="text-blue-500"> {formatBytes(interface_.bytes_sent)}</span>
@@ -488,7 +483,6 @@ export function NetworkMetrics() {
<div className="space-y-4">
{networkData.bridge_interfaces.map((interface_, index) => {
const typeBadge = getInterfaceTypeBadge(interface_.type)
// const interfaceTotals = interfaceTotalsData?.interfaces?.[interface_.name] // Removed
return (
<div
@@ -563,9 +557,8 @@ export function NetworkMetrics() {
</div>
<div className="col-span-2 md:col-span-1">
<div className="text-muted-foreground text-xs">Traffic ({getTimeframeLabel()})</div>
<div className="text-muted-foreground text-xs">Traffic since last boot</div>
<div className="font-medium text-foreground text-xs">
{/* Removed timeframe-based data, will now show Traffic since last boot */}
<span className="text-green-500"> {formatBytes(interface_.bytes_recv)}</span>
{" / "}
<span className="text-blue-500"> {formatBytes(interface_.bytes_sent)}</span>
@@ -717,12 +710,12 @@ export function NetworkMetrics() {
const displayInterface = currentInterfaceData || selectedInterface
// console.log("[v0] Selected Interface:", selectedInterface.name)
// console.log("[v0] Selected Interface bytes_recv:", selectedInterface.bytes_recv)
// console.log("[v0] Selected Interface bytes_sent:", selectedInterface.bytes_sent)
// console.log("[v0] Display Interface bytes_recv:", displayInterface.bytes_recv)
// console.log("[v0] Display Interface bytes_sent:", displayInterface.bytes_sent)
// console.log("[v0] Modal Network Data available:", !!modalNetworkData)
console.log("[v0] Selected Interface:", selectedInterface.name)
console.log("[v0] Selected Interface bytes_recv:", selectedInterface.bytes_recv)
console.log("[v0] Selected Interface bytes_sent:", selectedInterface.bytes_sent)
console.log("[v0] Display Interface bytes_recv:", displayInterface.bytes_recv)
console.log("[v0] Display Interface bytes_sent:", displayInterface.bytes_sent)
console.log("[v0] Modal Network Data available:", !!modalNetworkData)
return (
<>