dsfdsf
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-24 23:54:04 +02:00
parent 739e4d4c42
commit d6f09326f4
21 changed files with 355 additions and 364 deletions

View File

@@ -10,16 +10,16 @@ $hasConfig = !empty($instances);
'title' => 'Pi-hole Dashboard',
'description' => 'Status, Blockings, Usage und Steuerung fuer beide Instanzen.',
]) ?>
<div class="card pihole-page" data-pihole-page="dashboard">
<div class="module-flow pihole-page" data-pihole-page="dashboard">
<div class="card" style="margin-top:1rem;">
<section class="module-box">
<div class="pihole-section-header">
<strong>Hosts</strong>
<a class="nav-link" href="/module/pihole/instances">Instanzen verwalten</a>
<a class="module-button module-button--secondary module-button--small" 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>
<div style="margin-top:.75rem;"><a class="module-button module-button--primary" href="/module/pihole/instances">+ Neue Instanz</a></div>
<?php else: ?>
<div class="pihole-list" style="margin-top:1rem;">
<?php foreach ($instances as $instance): ?>
@@ -35,32 +35,32 @@ $hasConfig = !empty($instances);
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
</section>
<?php if (!$hasConfig): ?>
<?php return; ?>
<?php else: ?>
<div class="pihole-grid" style="margin-top:1rem;">
<div class="card pihole-stat">
<div class="module-box-grid module-box-grid--stats pihole-grid">
<div class="module-box-soft pihole-stat">
<div class="muted">DNS Queries (heute)</div>
<div class="pihole-stat-value" data-summary-dns></div>
</div>
<div class="card pihole-stat">
<div class="module-box-soft pihole-stat">
<div class="muted">Ads geblockt</div>
<div class="pihole-stat-value" data-summary-blocked></div>
<div class="pihole-stat-sub" data-summary-percent></div>
</div>
<div class="card pihole-stat">
<div class="module-box-soft pihole-stat">
<div class="muted">Unique Clients</div>
<div class="pihole-stat-value" data-summary-clients></div>
</div>
<div class="card pihole-stat">
<div class="module-box-soft pihole-stat">
<div class="muted">Status</div>
<div class="pihole-stat-value" data-summary-status></div>
</div>
</div>
<div class="card" style="margin-top:1.25rem;">
<section class="module-box">
<div class="pihole-section-header">
<strong>Blocker steuern (alle Instanzen)</strong>
<span class="muted" data-summary-last-refresh>Letztes Update: </span>
@@ -77,17 +77,17 @@ $hasConfig = !empty($instances);
<button class="nav-link" data-action="disable-custom" data-instance="all">Custom</button>
</div>
</div>
</div>
</section>
<div class="card" style="margin-top:1.25rem;">
<section class="module-box">
<div class="pihole-section-header">
<strong>Instanzen</strong>
<span class="muted">Einzeln steuerbar &amp; getrennte Updates</span>
</div>
<div class="pihole-instance-grid" data-instance-cards></div>
</div>
</section>
<div class="card" style="margin-top:1.25rem;">
<section class="module-box">
<div class="pihole-section-header">
<strong>Usage (Aggregiert)</strong>
<span class="muted">Query-Typen und Weiterleitungen</span>
@@ -102,12 +102,12 @@ $hasConfig = !empty($instances);
<div class="pihole-list" data-forward-destinations></div>
</div>
</div>
</div>
</section>
<?php endif; ?>
</div>
<template id="pihole-instance-template">
<div class="card pihole-instance" data-instance="">
<div class="module-box-soft pihole-instance" data-instance="">
<div class="pihole-instance-header">
<div>
<strong data-instance-name></strong>

View File

@@ -136,57 +136,62 @@ if ($primaryId === '') {
'title' => 'Pi-hole Instanzen',
'description' => 'Pi-hole Instanzen hinzufuegen, bearbeiten und loeschen.',
]) ?>
<div class="card">
<div style="display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;">
<h1 style="margin:0;">Instanzen</h1>
<div style="display:flex; gap:10px; flex-wrap:wrap;">
<button class="cta-button" type="button" data-instance-new>+ Neue Instanz</button>
<div class="module-flow">
<section class="module-box">
<div class="module-box-head">
<div>
<h2 class="module-box-title">Instanzen</h2>
<p>Pi-hole Instanzen hinzufuegen, bearbeiten und loeschen.</p>
</div>
<div style="display:flex; gap:10px; flex-wrap:wrap;">
<button class="module-button module-button--primary" type="button" data-instance-new>+ Neue Instanz</button>
</div>
</div>
</div>
<?php if ($error): ?>
<div class="card notice-card" style="margin-top:1rem; border-color:#ffb4a8; background:#fff5f3; color:#7a2114;">
<?= e($error) ?>
</div>
<?php elseif ($notice): ?>
<div class="card notice-card" style="margin-top:1rem; border-color:var(--accent-2);">
<?= e($notice) ?>
</div>
<?php endif; ?>
<div class="pihole-instance-grid" style="margin-top:1rem;">
<?php if (!$instances): ?>
<div class="card" style="padding:16px;">Keine Instanzen vorhanden.</div>
<?php else: ?>
<?php foreach ($instances as $instance): ?>
<div class="card pihole-instance-card"
data-instance-id="<?= e((string)$instance['id']) ?>"
data-name="<?= e((string)($instance['name'] ?? '')) ?>"
data-url="<?= e((string)($instance['url'] ?? '')) ?>"
data-primary="<?= !empty($instance['is_primary']) ? '1' : '0' ?>">
<div class="pihole-instance-header">
<div>
<strong><?= e((string)($instance['name'] ?? '')) ?></strong>
<div class="muted">ID: <?= e((string)($instance['id'] ?? '')) ?></div>
<div class="muted">URL: <?= e((string)($instance['url'] ?? '')) ?></div>
</div>
<?php if (!empty($instance['is_primary']) || $instance['id'] === $primaryId): ?>
<span class="pihole-status">Primaer</span>
<?php endif; ?>
</div>
<div class="pihole-card-actions">
<button class="nav-link" type="button" data-instance-edit>Bearbeiten</button>
<button class="nav-link" type="button" data-instance-test>Test Verbindung</button>
<form method="post" onsubmit="return confirm('Instanz wirklich loeschen?')">
<input type="hidden" name="delete_id" value="<?= e((string)($instance['id'] ?? '')) ?>">
<button class="nav-link" type="submit">Loeschen</button>
</form>
</div>
<div class="pihole-test-result" data-instance-result></div>
</div>
<?php endforeach; ?>
<?php if ($error): ?>
<div class="setup-db-message setup-db-message--error" style="margin-top:16px;">
<?= e($error) ?>
</div>
<?php elseif ($notice): ?>
<div class="setup-db-message setup-db-message--success" style="margin-top:16px;">
<?= e($notice) ?>
</div>
<?php endif; ?>
</div>
<div class="module-box-grid module-box-grid--panels" style="margin-top:16px;">
<?php if (!$instances): ?>
<div class="module-box-soft">Keine Instanzen vorhanden.</div>
<?php else: ?>
<?php foreach ($instances as $instance): ?>
<div class="module-box-soft pihole-instance-card"
data-instance-id="<?= e((string)$instance['id']) ?>"
data-name="<?= e((string)($instance['name'] ?? '')) ?>"
data-url="<?= e((string)($instance['url'] ?? '')) ?>"
data-primary="<?= !empty($instance['is_primary']) ? '1' : '0' ?>">
<div class="pihole-instance-header">
<div>
<strong><?= e((string)($instance['name'] ?? '')) ?></strong>
<div class="muted">ID: <?= e((string)($instance['id'] ?? '')) ?></div>
<div class="muted">URL: <?= e((string)($instance['url'] ?? '')) ?></div>
</div>
<?php if (!empty($instance['is_primary']) || $instance['id'] === $primaryId): ?>
<span class="pihole-status">Primaer</span>
<?php endif; ?>
</div>
<div class="pihole-card-actions">
<button class="module-button module-button--secondary module-button--small" type="button" data-instance-edit>Bearbeiten</button>
<button class="module-button module-button--secondary module-button--small" type="button" data-instance-test>Test Verbindung</button>
<form method="post" onsubmit="return confirm('Instanz wirklich loeschen?')">
<input type="hidden" name="delete_id" value="<?= e((string)($instance['id'] ?? '')) ?>">
<button class="module-button module-button--secondary module-button--small" type="submit">Loeschen</button>
</form>
</div>
<div class="pihole-test-result" data-instance-result></div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</section>
</div>
<div class="modal" data-instance-modal aria-hidden="true">

View File

@@ -10,15 +10,15 @@ $hasConfig = !empty($instances);
'title' => 'Listen & Domains',
'description' => 'Top-Domains, Listen-Updates und neue Eintraege auf der Primaer-Instanz.',
]) ?>
<div class="card pihole-page" data-pihole-page="lists">
<div class="module-flow pihole-page" data-pihole-page="lists">
<?php if (!$hasConfig): ?>
<div class="card" style="margin-top:1rem; border-color:var(--accent);">
<div class="module-box">
<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 style="margin-top:.75rem;"><a class="module-button module-button--secondary module-button--small" href="/module/pihole/instances">Instanzen verwalten</a></div>
</div>
<?php else: ?>
<div class="card" style="margin-top:1rem;">
<section class="module-box">
<div class="pihole-section-header">
<strong>Listen-Updates</strong>
<span class="muted">Gravity / Blocklisten neu laden</span>
@@ -27,17 +27,17 @@ $hasConfig = !empty($instances);
<button class="cta-button" data-action="gravity" data-instance="primary">Listen aktualisieren (Primaer)</button>
</div>
<div class="pihole-update" data-list-update-status></div>
</div>
</section>
<div class="pihole-split" style="margin-top:1.25rem;">
<div class="card">
<div class="module-box-grid module-box-grid--panels pihole-split">
<div class="module-box">
<div class="pihole-section-header">
<strong>Top geblockte Domains (Aggregiert)</strong>
<span class="muted">Letzte Statistiken</span>
</div>
<div class="pihole-list" data-top-ads></div>
</div>
<div class="card">
<div class="module-box">
<div class="pihole-section-header">
<strong>Top erlaubte Domains (Aggregiert)</strong>
<span class="muted">Letzte Statistiken</span>
@@ -46,7 +46,7 @@ $hasConfig = !empty($instances);
</div>
</div>
<div class="card" style="margin-top:1.25rem;">
<section class="module-box">
<div class="pihole-section-header">
<strong>Domainlisten erweitern</strong>
<span class="muted">Eintraege werden auf der Primaer-Instanz gesetzt</span>
@@ -66,9 +66,9 @@ $hasConfig = !empty($instances);
<button class="cta-button" type="submit">Hinzufuegen</button>
</form>
<div class="pihole-update" data-domain-status></div>
</div>
</section>
<div class="card" style="margin-top:1.25rem;">
<section class="module-box">
<div class="pihole-section-header">
<strong>Adlist-URL hinzufuegen</strong>
<span class="muted">Optional: unterstuetzt nur wenn die API den Endpunkt anbietet.</span>
@@ -81,7 +81,7 @@ $hasConfig = !empty($instances);
<button class="nav-link" type="submit">Adlist hinzufuegen</button>
</form>
<div class="pihole-update" data-adlist-status></div>
</div>
</section>
<?php endif; ?>
</div>
<?= module_shell_footer() ?>

View File

@@ -10,23 +10,23 @@ $hasConfig = !empty($instances);
'title' => 'Zugriffe & Blockings',
'description' => 'Aktuelle Blockings, Top Clients und Status pro Instanz.',
]) ?>
<div class="card pihole-page" data-pihole-page="queries">
<div class="module-flow pihole-page" data-pihole-page="queries">
<?php if (!$hasConfig): ?>
<div class="card" style="margin-top:1rem; border-color:var(--accent);">
<div class="module-box">
<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 style="margin-top:.75rem;"><a class="module-button module-button--secondary module-button--small" href="/module/pihole/instances">Instanzen verwalten</a></div>
</div>
<?php else: ?>
<div class="pihole-split" style="margin-top:1rem;">
<div class="card">
<div class="module-box-grid module-box-grid--panels pihole-split">
<div class="module-box">
<div class="pihole-section-header">
<strong>Aktuelle Blockings</strong>
<span class="muted">Letzte geblockte Domains</span>
</div>
<div class="pihole-blocked" data-recent-blocked></div>
</div>
<div class="card">
<div class="module-box">
<div class="pihole-section-header">
<strong>Top Clients (Aggregiert)</strong>
<span class="muted">Anfragen nach Client</span>