dsfdsf
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
"title": "KEA DHCP",
|
||||
"description": "Verwaltung von KEA DHCP Hosts und Reservierungen.",
|
||||
"actions": [
|
||||
{ "label": "Gruppen verwalten", "href": "/module/kea/groups", "variant": "secondary" },
|
||||
{ "label": "Setup", "href": "/modules/setup/kea", "variant": "secondary" }
|
||||
],
|
||||
"tabs": [
|
||||
{ "label": "Hosts", "href": "/module/kea", "match_prefixes": ["/module/kea", "/module/kea/edit"] },
|
||||
{ "label": "Gruppen", "href": "/module/kea/groups", "match_prefixes": ["/module/kea/groups"] }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,21 +3,6 @@
|
||||
"version": "1.2.0",
|
||||
"schema_version": 3,
|
||||
"description": "Verwaltung von KEA DHCP Hosts und Reservierungen.",
|
||||
"menu": [
|
||||
{ "label": "Hosts", "href": "/module/kea" },
|
||||
{ "label": "Gruppen", "href": "/module/kea/groups" },
|
||||
{ "label": "Setup", "href": "/modules/setup/kea" }
|
||||
],
|
||||
"sidebar": {
|
||||
"enabled": true,
|
||||
"collapsible": true,
|
||||
"default": "collapsed",
|
||||
"items": [
|
||||
{ "label": "Hosts", "href": "/module/kea" },
|
||||
{ "label": "Gruppen", "href": "/module/kea/groups" },
|
||||
{ "label": "Setup", "href": "/modules/setup/kea" }
|
||||
]
|
||||
},
|
||||
"setup": {
|
||||
"fields": [
|
||||
{ "name": "db.driver", "label": "KEA DB Driver", "type": "text", "required": true, "help": "Standard-KEA-Datenbank, die auch vom KEA-Dienst selbst genutzt wird." },
|
||||
|
||||
@@ -101,17 +101,22 @@ $metadata = is_array($host['metadata'] ?? null) ? $host['metadata'] : [];
|
||||
$selectedGroup = (string)($metadata['group_name'] ?? '');
|
||||
$selectedIp = (string)($metadata['desired_ip'] ?? '');
|
||||
?>
|
||||
<section class="kea-page">
|
||||
<div class="section-head">
|
||||
<div>
|
||||
<h2 class="section-title">KEA Eintrag bearbeiten</h2>
|
||||
<p>Zusatzdaten werden separat von der KEA-Datenbank gespeichert.</p>
|
||||
<?= module_shell_header('kea', [
|
||||
'title' => 'KEA Eintrag bearbeiten',
|
||||
]) ?>
|
||||
<div class="module-flow kea-page">
|
||||
<section class="module-box">
|
||||
<div class="module-box-head">
|
||||
<div>
|
||||
<h2 class="module-box-title">KEA Eintrag bearbeiten</h2>
|
||||
<p>Zusatzdaten werden separat von der KEA-Datenbank gespeichert.</p>
|
||||
</div>
|
||||
<div class="setup-actions">
|
||||
<a class="module-button module-button--secondary" href="/module/kea/groups">Gruppen verwalten</a>
|
||||
<a class="module-button module-button--secondary" href="/module/kea">Zurueck</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="setup-actions">
|
||||
<a class="nav-link" href="/module/kea/groups">Gruppen verwalten</a>
|
||||
<a class="nav-link" href="/module/kea">Zurueck</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="kea-message kea-message--error" role="alert">
|
||||
@@ -125,11 +130,11 @@ $selectedIp = (string)($metadata['desired_ip'] ?? '');
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="kea-panel">
|
||||
<div class="kea-panel__head">
|
||||
<section class="module-box kea-panel">
|
||||
<div class="module-box-head kea-panel__head">
|
||||
<div>
|
||||
<span class="pill"><?= ($source === 'lease') ? 'Lease' : 'Reservierung' ?></span>
|
||||
<h3><?= e((string)($host['hostname'] ?: 'Unbekannt')) ?></h3>
|
||||
<h2 class="module-box-title"><?= e((string)($host['hostname'] ?: 'Unbekannt')) ?></h2>
|
||||
<p class="muted">
|
||||
IP <?= e((string)($host['ipv4_address'] ?? '')) ?> · MAC <?= e((string)($host['dhcp_identifier'] ?? '')) ?>
|
||||
</p>
|
||||
@@ -190,13 +195,13 @@ $selectedIp = (string)($metadata['desired_ip'] ?? '');
|
||||
<a class="nav-link" href="/module/kea">Abbrechen</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="kea-panel">
|
||||
<div class="kea-panel__head">
|
||||
<section class="module-box kea-panel">
|
||||
<div class="module-box-head kea-panel__head">
|
||||
<div>
|
||||
<span class="pill">Pruefungen</span>
|
||||
<h3>Gerätechecks</h3>
|
||||
<h2 class="module-box-title">Gerätechecks</h2>
|
||||
<p class="muted">Pruefergebnisse werden in der Nexus-DHCP-Datenbank gespeichert und koennen spaeter fuer Reports genutzt werden.</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -224,7 +229,7 @@ $selectedIp = (string)($metadata['desired_ip'] ?? '');
|
||||
<p class="muted">Vorbereitet fuer spaetere HTTP/Port-Erkennung. Noch nicht automatisch aktiv, damit keine ungewollten Scans laufen.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
(() => {
|
||||
const ipsByGroup = <?= json_encode($availableIpsByGroup, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?>;
|
||||
@@ -257,4 +262,5 @@ $selectedIp = (string)($metadata['desired_ip'] ?? '');
|
||||
})();
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
</div>
|
||||
<?= module_shell_footer() ?>
|
||||
|
||||
@@ -75,14 +75,19 @@ $matrixForGroup = static function (array $group) use ($usedIpLookup): array {
|
||||
return $dots;
|
||||
};
|
||||
?>
|
||||
<section class="kea-page">
|
||||
<div class="section-head">
|
||||
<div>
|
||||
<h2 class="section-title">KEA Gruppen</h2>
|
||||
<p>Gruppen und IP-Bereiche fuer DHCP-Reservierungen.</p>
|
||||
<?= module_shell_header('kea', [
|
||||
'title' => 'KEA Gruppen',
|
||||
]) ?>
|
||||
<div class="module-flow kea-page">
|
||||
<section class="module-box">
|
||||
<div class="module-box-head">
|
||||
<div>
|
||||
<h2 class="module-box-title">KEA Gruppen</h2>
|
||||
<p>Gruppen und IP-Bereiche fuer DHCP-Reservierungen.</p>
|
||||
</div>
|
||||
<a class="module-button module-button--secondary" href="/module/kea">Zurueck</a>
|
||||
</div>
|
||||
<a class="nav-link" href="/module/kea">Zurueck</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="kea-message kea-message--error" role="alert">
|
||||
@@ -93,11 +98,11 @@ $matrixForGroup = static function (array $group) use ($usedIpLookup): array {
|
||||
<div class="kea-message kea-message--success"><?= e($notice) ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="kea-panel">
|
||||
<div class="kea-panel__head">
|
||||
<section class="module-box kea-panel">
|
||||
<div class="module-box-head kea-panel__head">
|
||||
<div>
|
||||
<span class="pill">Gruppe</span>
|
||||
<h3>Gruppe anlegen</h3>
|
||||
<h2 class="module-box-title">Gruppe anlegen</h2>
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" class="kea-edit-form">
|
||||
@@ -123,13 +128,13 @@ $matrixForGroup = static function (array $group) use ($usedIpLookup): array {
|
||||
<button class="cta-button" type="submit">Gruppe speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="kea-panel">
|
||||
<div class="kea-panel__head">
|
||||
<section class="module-box kea-panel">
|
||||
<div class="module-box-head kea-panel__head">
|
||||
<div>
|
||||
<span class="pill">IP-Bereich</span>
|
||||
<h3>Bereich zuweisen</h3>
|
||||
<h2 class="module-box-title">Bereich zuweisen</h2>
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" class="kea-edit-form">
|
||||
@@ -155,13 +160,13 @@ $matrixForGroup = static function (array $group) use ($usedIpLookup): array {
|
||||
<button class="cta-button" type="submit">Bereich speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="kea-panel">
|
||||
<div class="kea-panel__head">
|
||||
<section class="module-box-table kea-panel">
|
||||
<div class="module-box-head kea-panel__head">
|
||||
<div>
|
||||
<span class="pill">Uebersicht</span>
|
||||
<h3>Gruppen und freie IPs</h3>
|
||||
<h2 class="module-box-title">Gruppen und freie IPs</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kea-table-wrap">
|
||||
@@ -217,5 +222,6 @@ $matrixForGroup = static function (array $group) use ($usedIpLookup): array {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<?= module_shell_footer() ?>
|
||||
|
||||
@@ -10,16 +10,18 @@
|
||||
'title' => 'KEA DHCP Hosts',
|
||||
'description' => 'Reservierungen und aktuelle Leases aus der KEA-Datenbank.',
|
||||
]) ?>
|
||||
<section class="kea-page">
|
||||
<div class="section-head">
|
||||
<div>
|
||||
<h2 class="section-title">KEA DHCP Hosts</h2>
|
||||
<p>Reservierungen und aktuelle Leases aus der KEA-Datenbank.</p>
|
||||
<p class="muted kea-refresh-state" data-kea-refresh-state>
|
||||
Automatische Aktualisierung alle 5 Sekunden.
|
||||
</p>
|
||||
<div class="module-flow kea-page">
|
||||
<section class="module-box">
|
||||
<div class="module-box-head">
|
||||
<div>
|
||||
<h2 class="module-box-title">KEA DHCP Hosts</h2>
|
||||
<p>Reservierungen und aktuelle Leases aus der KEA-Datenbank.</p>
|
||||
<p class="muted kea-refresh-state" data-kea-refresh-state>
|
||||
Automatische Aktualisierung alle 5 Sekunden.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="kea-message kea-message--error" role="alert">
|
||||
@@ -34,34 +36,34 @@
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<div class="stats">
|
||||
<div class="stat-card">
|
||||
<div class="module-box-grid module-box-grid--stats stats">
|
||||
<section class="module-box-soft stat-card">
|
||||
<span class="stat-label">Einträge</span>
|
||||
<span class="stat-value" data-kea-stat="total"><?= e((string)($stats['total'] ?? 0)) ?></span>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
</section>
|
||||
<section class="module-box-soft stat-card">
|
||||
<span class="stat-label">Reservierungen</span>
|
||||
<span class="stat-value" data-kea-stat="reservations"><?= e((string)($stats['reservations'] ?? 0)) ?></span>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
</section>
|
||||
<section class="module-box-soft stat-card">
|
||||
<span class="stat-label">Leases</span>
|
||||
<span class="stat-value" data-kea-stat="leases"><?= e((string)($stats['leases'] ?? 0)) ?></span>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
</section>
|
||||
<section class="module-box-soft stat-card">
|
||||
<span class="stat-label">Gruppen</span>
|
||||
<span class="stat-value" data-kea-stat="groups"><?= e((string)count($stats['groups'] ?? [])) ?></span>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
</section>
|
||||
<section class="module-box-soft stat-card">
|
||||
<span class="stat-label">Freie Gruppen-IPs</span>
|
||||
<span class="stat-value" data-kea-stat="free_ips"><?= e((string)array_sum($stats['free_ips'] ?? [])) ?></span>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="kea-panel">
|
||||
<div class="kea-panel__head">
|
||||
<section class="module-box-table kea-panel">
|
||||
<div class="module-box-head kea-panel__head">
|
||||
<div>
|
||||
<span class="pill">Inventar</span>
|
||||
<h3>Registrierte Geräte</h3>
|
||||
<h2 class="module-box-title">Registrierte Geräte</h2>
|
||||
<p class="muted">Zusatzdaten werden in der separaten Nexus-DHCP-Datenbank gespeichert.</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -129,8 +131,8 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
(() => {
|
||||
const rowsTarget = document.querySelector('[data-kea-host-rows]');
|
||||
|
||||
Reference in New Issue
Block a user