<?php if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } RBAC::enforce('view.security'); require_once __DIR__ . '/../modules/logs/logs_data.php'; ?> <div class="view-header"> <div class="vh-title"><h1>Event Log Stream</h1></div> <div class="vh-actions"> <select class="search-input" id="log-cat-filter" style="min-width:160px"><?php foreach ($categories as $v => $l): ?> <option value="<?= UI::e($v) ?>"<?= $catFilter === (string)$v ? 'selected' : '' ?>><?= UI::e($l) ?></option><?php endforeach; ?> </select> <span class="badge badge-info"><?= number_format($totalEvents) ?> events</span> </div> </div> <div class="glass" style="padding:0;overflow:hidden"> <?php require_once __DIR__ . '/../modules/logs/event_stream.php'; ?> </div> <script nonce="<?= $cspNonce ?? '' ?>"> (function(){ document.getElementById('log-cat-filter').addEventListener('change',function(){location.href='?view=logs&cat='+this.value;}); })(); </script>