Files
nexus/modules/pihole/pages/queries.php
Lars Gebhardt-Kusche 44945a31da
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped
asdsad
2026-04-27 01:38:54 +02:00

45 lines
1.7 KiB
PHP

<?php
$assets = app()->assets();
$assets->addStyle('/module/pihole/asset?file=pihole.css');
$assets->addScript('/module/pihole/asset?file=pihole.js', 'footer', true);
$settings = modules()->settings('pihole');
$instances = module_fn('pihole', 'instances');
$hasConfig = !empty($instances);
$refreshSeconds = (int)($settings['queries_refresh_sec'] ?? 5);
if ($refreshSeconds < 0) {
$refreshSeconds = 5;
}
?>
<?= module_shell_header('pihole', [
'title' => 'Zugriffe & Blockings',
'description' => 'Aktuelle Blockings, Top Clients und Status pro Instanz.',
]) ?>
<div class="module-flow pihole-page" data-pihole-page="queries" data-refresh-seconds="<?= e((string)$refreshSeconds) ?>">
<?php if (!$hasConfig): ?>
<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="module-button module-button--secondary module-button--small" href="/module/pihole/instances">Instanzen verwalten</a></div>
</div>
<?php else: ?>
<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="module-box">
<div class="pihole-section-header">
<strong>Top Clients (Aggregiert)</strong>
<span class="muted">Anfragen nach Client</span>
</div>
<div class="pihole-list" data-top-clients></div>
</div>
</div>
<?php endif; ?>
</div>
<?= module_shell_footer() ?>