<?php if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } RBAC::enforce('view.security'); require_once '/var/www/shared/encryption.php'; ?> <div class="workspace" id="ws-watchdog"> <div class="workspace-header"><h1>Watchdog</h1></div> <div id="watchdog-tabs" class="sub-tabs"> <button class="sub-tab active" data-panel="wd-live">Live</button> <button class="sub-tab" data-panel="wd-profiles">Profiles</button> <button class="sub-tab" data-panel="wd-threats">Threats</button> <button class="sub-tab" data-panel="wd-predict">Predict</button> <button class="sub-tab" data-panel="wd-enforce">Enforce</button> </div> <div id="panel-wd-live" class="panel"></div> <div id="panel-wd-profiles" class="panel" style="display:none"></div> <div id="panel-wd-threats" class="panel" style="display:none"></div> <div id="panel-wd-predict" class="panel" style="display:none"></div> <div id="panel-wd-enforce" class="panel" style="display:none"></div> </div><?php require_once __DIR__.'/../modules/watchdog/live_feed.php'; require_once __DIR__.'/../modules/watchdog/profiles_viewer.php'; require_once __DIR__.'/../modules/watchdog/threats_flags.php'; require_once __DIR__.'/../modules/watchdog/predict_engine.php'; require_once __DIR__.'/../modules/watchdog/enforce_blocklist.php'; ?> <script nonce="<?= $cspNonce ?? '' ?>"> (function(){ var tabs = document.querySelectorAll('#watchdog-tabs .sub-tab'); tabs.forEach(function(t){ t.addEventListener('click', function(){ tabs.forEach(function(x){x.classList.remove('active')}); t.classList.add('active'); var panels = document.querySelectorAll('#ws-watchdog > .panel'); panels.forEach(function(p){p.style.display='none'}); var target = document.getElementById('panel-'+t.dataset.panel); if(target) target.style.display=''; }); }); })(); </script>