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

This commit is contained in:
2026-04-15 02:48:23 +02:00
parent 7157c98dcb
commit 598348a4b6
8 changed files with 532 additions and 11 deletions

View File

@@ -20,6 +20,7 @@ $stats = [
'reservations' => 0,
'leases' => 0,
'groups' => [],
'free_ips' => [],
];
try {
@@ -48,6 +49,15 @@ try {
$stats['groups'][$group] = ($stats['groups'][$group] ?? 0) + 1;
}
}
if ($metadataRepo !== null) {
$stats['free_ips'] = array_map(
static fn(array $ips): int => count($ips),
$metadataRepo->availableIpsByGroup(
array_merge($repo->usedIpAddresses(), $metadataRepo->desiredIps()),
4096
)
);
}
} catch (\Exception $e) {
$error = "Datenbankfehler: " . $e->getMessage();
}