asdasd
All checks were successful
Deploy / deploy-staging (push) Successful in 5s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-16 01:35:08 +02:00
parent 9f2af4676d
commit 82ad817ad3
2 changed files with 24 additions and 7 deletions

View File

@@ -36,14 +36,11 @@ try {
}
$repo = new KeaHostRepository($pdo, $metadataRepo);
$hosts = $repo->findAll(50);
$stats['total'] = count($hosts);
$hosts = $repo->findAll(200);
$stats['reservations'] = $repo->countReservations();
$stats['leases'] = $repo->countLeases();
$stats['total'] = $stats['reservations'] + $stats['leases'];
foreach ($hosts as $host) {
if (($host['source'] ?? '') === 'lease') {
$stats['leases']++;
} else {
$stats['reservations']++;
}
$group = trim((string)($host['metadata']['group_name'] ?? ''));
if ($group !== '') {
$stats['groups'][$group] = ($stats['groups'][$group] ?? 0) + 1;