<?php  if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } $fleet_online = 0; try { $fleet_online = (int)Database::scalar("SELECT COUNT(*) FROM nodes WHERE status = 'online'"); } catch (\Throwable $e) {} $fleet_total = 0; try { $fleet_total = (int)Database::scalar("SELECT COUNT(*) FROM nodes"); } catch (\Throwable $e) {} $threats_today = 0; try { $threats_today = (int)Database::scalar("SELECT COUNT(*) FROM sec_watchdog_events WHERE DATE(created_at) = CURDATE()"); } catch (\Throwable $e) {} $events_today = 0; try { $events_today = (int)Database::scalar("SELECT COUNT(*) FROM events WHERE category = 'security' AND DATE(created_at) = CURDATE()"); } catch (\Throwable $e) {} ?> <div id="system-summary" class="system-summary"> <div class="summary-row"><span class="summary-label">Fleet</span><span class="summary-value"><?= $fleet_online ?> /<?= $fleet_total ?> online</span></div> <div class="summary-row"><span class="summary-label">Watchdog Alerts</span><span class="summary-value"><?= $threats_today ?> </span></div> <div class="summary-row"><span class="summary-label">Security Events</span><span class="summary-value"><?= $events_today ?> </span></div> </div>