Polish DHCP inactive time display

This commit is contained in:
seo
2026-07-20 23:37:18 +09:00
parent 34bb82b750
commit 2d79ee3de4
3 changed files with 28 additions and 4 deletions
+7 -1
View File
@@ -2689,7 +2689,7 @@ function parse_live_wifi_rows(string $iface, string $band, string $text, array $
$rows[] = $cur;
}
return $rows;
return array_values(array_filter($rows, static fn(array $row): bool => !wifi_client_stale($row)));
}
function lan_fdb_macs(string $iface = 'eth1'): array
@@ -2780,6 +2780,12 @@ function wifi_time_ms(string $value): int
return PHP_INT_MAX;
}
function wifi_client_stale(array $client): bool
{
$inactiveMs = wifi_time_ms((string)($client['inactive_time'] ?? ''));
return $inactiveMs >= 3600000;
}
function wifi_unknown(mixed $value): bool
{
$text = strtoupper(trim((string)$value));