diff --git a/config/fileload.php b/config/fileload.php index 1d94f93..56cc528 100755 --- a/config/fileload.php +++ b/config/fileload.php @@ -1,41 +1,48 @@ session()->start(); -$clientId = $app->session()->ensureClientId(); - -// Optionally expose a single global for templates if desired -$GLOBALS['client_id'] = $clientId; +// Globales Config Objekt erstellen +global $appConfig; +$dbEnabled = defined('APP_DB_ENABLED') ? APP_DB_ENABLED : true; +$appConfig = new \App\Config($dbConfig, $dbEnabled); \ No newline at end of file diff --git a/public/page/index.php b/public/page/index.php index df960db..d0765bb 100755 --- a/public/page/index.php +++ b/public/page/index.php @@ -1,3 +1,22 @@ findAll(50); + } catch (\Exception $e) { + $error = "Datenbankfehler: " . $e->getMessage(); + } +} else { + $error = "Datenbankverbindung ist nicht konfiguriert oder deaktiviert."; +} + +tpl('kea_dashboard', 'landing', compact('hosts', 'error')); \ No newline at end of file diff --git a/public/page/kea_dashboard.php b/public/page/kea_dashboard.php new file mode 100644 index 0000000..b3bffff --- /dev/null +++ b/public/page/kea_dashboard.php @@ -0,0 +1,74 @@ + +
Fehler
+= e($error) ?>
++ Übersicht der statischen Reservierungen und bekannten Clients. +
+| Hostname | +IP Adresse | +MAC Adresse | +Kontext | ++ Edit + | +
|---|---|---|---|---|
| Keine Hosts gefunden. | +||||
| + = e($host['hostname'] ?: 'Unbekannt') ?> + | ++ = e($host['ipv4_address']) ?> + | ++ = e($host['dhcp_identifier']) ?> + | ++ = e($host['user_context'] ?? '-') ?> + | ++ Bearbeiten + | +