pi hole settings
This commit is contained in:
@@ -4,10 +4,7 @@
|
||||
"description": "Pi-hole Monitoring, Listen und Steuerung fuer zwei Instanzen.",
|
||||
"menu": [
|
||||
{ "label": "Dashboard", "href": "/module/pihole" },
|
||||
{ "label": "Instanzen", "href": "/module/pihole/instances" },
|
||||
{ "label": "Listen", "href": "/module/pihole/lists" },
|
||||
{ "label": "Zugriffe", "href": "/module/pihole/queries" },
|
||||
{ "label": "Setup", "href": "/modules/setup/pihole" }
|
||||
{ "label": "Instanzen", "href": "/module/pihole/instances" }
|
||||
],
|
||||
"sidebar": {
|
||||
"enabled": true,
|
||||
@@ -15,26 +12,8 @@
|
||||
"default": "collapsed",
|
||||
"items": [
|
||||
{ "label": "Dashboard", "href": "/module/pihole" },
|
||||
{ "label": "Instanzen", "href": "/module/pihole/instances" },
|
||||
{ "label": "Listen", "href": "/module/pihole/lists" },
|
||||
{ "label": "Zugriffe", "href": "/module/pihole/queries" },
|
||||
{ "label": "Setup", "href": "/modules/setup/pihole" }
|
||||
{ "label": "Instanzen", "href": "/module/pihole/instances" }
|
||||
]
|
||||
},
|
||||
"setup": {
|
||||
"fields": [
|
||||
{ "name": "instances_json", "label": "Instanzen (JSON)", "type": "textarea", "required": false, "help": "Mehrere Instanzen als JSON-Array. Beispiel: [{\"id\":\"pihole-main\",\"name\":\"Pi-hole Main\",\"url\":\"http://pi-hole.local\",\"token\":\"TOKEN\",\"is_primary\":true},{\"id\":\"pihole-backup\",\"name\":\"Pi-hole Backup\",\"url\":\"http://pi-hole-2.local\",\"token\":\"TOKEN2\"}]" },
|
||||
{ "name": "primary_id", "label": "Primaer-ID (optional)", "type": "text", "required": false, "help": "Wenn gesetzt, wird diese Instanz als Primaer fuer Listen-Updates genutzt." },
|
||||
{ "name": "primary_name", "label": "Primaer-Name (Legacy)", "type": "text", "required": false, "help": "Anzeige-Name (z.B. Pi-hole Main)" },
|
||||
{ "name": "primary_url", "label": "Primaer-URL (Legacy)", "type": "text", "required": false, "help": "Basis-URL der Instanz, z.B. http://pi-hole.local" },
|
||||
{ "name": "primary_token", "label": "Primaer-API Token (Legacy)", "type": "password", "required": false, "help": "Token aus dem Pi-hole Admin (API Token)." },
|
||||
{ "name": "secondary_name", "label": "Sekundaer-Name (Legacy)", "type": "text", "required": false, "help": "Anzeige-Name (z.B. Pi-hole Backup)" },
|
||||
{ "name": "secondary_url", "label": "Sekundaer-URL (Legacy)", "type": "text", "required": false, "help": "Basis-URL der zweiten Instanz" },
|
||||
{ "name": "secondary_token", "label": "Sekundaer-API Token (Legacy)", "type": "password", "required": false },
|
||||
{ "name": "api_path", "label": "API Pfad", "type": "text", "required": false, "help": "Standard: /admin/api.php" },
|
||||
{ "name": "api_timeout_sec", "label": "API Timeout (Sek.)", "type": "number", "required": false, "help": "Standard 8" },
|
||||
{ "name": "verify_tls", "label": "TLS Verifikation aktiv", "type": "checkbox", "required": false, "help": "Deaktivieren nur wenn das Zertifikat unsicher ist." },
|
||||
{ "name": "lists_primary_only", "label": "Listen nur auf Primaer", "type": "checkbox", "required": false, "help": "Listen-Updates und neue Listen nur auf der Primaer-Instanz ausfuehren." }
|
||||
]
|
||||
}
|
||||
"setup": { "fields": [] }
|
||||
}
|
||||
|
||||
@@ -11,12 +11,33 @@ $hasConfig = !empty($instances);
|
||||
<h1 style="margin-top:.75rem;">Pi-hole Dashboard</h1>
|
||||
<p class="muted">Status, Blockings, Usage und Steuerung fuer beide Instanzen.</p>
|
||||
|
||||
<?php if (!$hasConfig): ?>
|
||||
<div class="card" style="margin-top:1rem; border-color:var(--accent);">
|
||||
<strong>Setup erforderlich</strong>
|
||||
<div class="muted" style="margin-top:.35rem;">Bitte zuerst die Pi-hole Instanzen im Setup konfigurieren.</div>
|
||||
<div style="margin-top:.75rem;"><a class="nav-link" href="/modules/setup/pihole">Setup oeffnen</a></div>
|
||||
<div class="card" style="margin-top:1rem;">
|
||||
<div class="pihole-section-header">
|
||||
<strong>Hosts</strong>
|
||||
<a class="nav-link" href="/module/pihole/instances">Instanzen verwalten</a>
|
||||
</div>
|
||||
<?php if (!$instances): ?>
|
||||
<div class="muted" style="margin-top:.75rem;">Keine Pi-hole Instanzen vorhanden. Bitte zuerst hinzufuegen.</div>
|
||||
<div style="margin-top:.75rem;"><a class="cta-button" href="/module/pihole/instances">+ Neue Instanz</a></div>
|
||||
<?php else: ?>
|
||||
<div class="pihole-list" style="margin-top:1rem;">
|
||||
<?php foreach ($instances as $instance): ?>
|
||||
<div class="pihole-list-row">
|
||||
<div>
|
||||
<strong><?= e((string)($instance['name'] ?? $instance['id'] ?? '')) ?></strong>
|
||||
<div class="muted"><?= e((string)($instance['url'] ?? '')) ?></div>
|
||||
</div>
|
||||
<?php if (!empty($instance['is_primary'])): ?>
|
||||
<span class="pihole-status">Primaer</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if (!$hasConfig): ?>
|
||||
<?php return; ?>
|
||||
<?php else: ?>
|
||||
<div class="pihole-grid" style="margin-top:1rem;">
|
||||
<div class="card pihole-stat">
|
||||
|
||||
@@ -13,9 +13,9 @@ $hasConfig = !empty($instances);
|
||||
|
||||
<?php if (!$hasConfig): ?>
|
||||
<div class="card" style="margin-top:1rem; border-color:var(--accent);">
|
||||
<strong>Setup erforderlich</strong>
|
||||
<div class="muted" style="margin-top:.35rem;">Bitte zuerst die Pi-hole Instanzen im Setup konfigurieren.</div>
|
||||
<div style="margin-top:.75rem;"><a class="nav-link" href="/modules/setup/pihole">Setup oeffnen</a></div>
|
||||
<strong>Keine Instanzen konfiguriert</strong>
|
||||
<div class="muted" style="margin-top:.35rem;">Bitte zuerst eine Pi-hole Instanz hinzufuegen.</div>
|
||||
<div style="margin-top:.75rem;"><a class="nav-link" href="/module/pihole/instances">Instanzen verwalten</a></div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="card" style="margin-top:1rem;">
|
||||
|
||||
@@ -13,9 +13,9 @@ $hasConfig = !empty($instances);
|
||||
|
||||
<?php if (!$hasConfig): ?>
|
||||
<div class="card" style="margin-top:1rem; border-color:var(--accent);">
|
||||
<strong>Setup erforderlich</strong>
|
||||
<div class="muted" style="margin-top:.35rem;">Bitte zuerst die Pi-hole Instanzen im Setup konfigurieren.</div>
|
||||
<div style="margin-top:.75rem;"><a class="nav-link" href="/modules/setup/pihole">Setup oeffnen</a></div>
|
||||
<strong>Keine Instanzen konfiguriert</strong>
|
||||
<div class="muted" style="margin-top:.35rem;">Bitte zuerst eine Pi-hole Instanz hinzufuegen.</div>
|
||||
<div style="margin-top:.75rem;"><a class="nav-link" href="/module/pihole/instances">Instanzen verwalten</a></div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="pihole-split" style="margin-top:1rem;">
|
||||
|
||||
Reference in New Issue
Block a user