@php
$totalMikrotik = \App\Models\Mikrotik::count();
$onlineMikrotik = \App\Models\Mikrotik::where('status', 'online')->count();
$networkHealth = $totalMikrotik > 0 ? round(($onlineMikrotik / $totalMikrotik) * 100) : 0;
@endphp
Network Status
{{ $networkHealth }}%
{{ $onlineMikrotik }}/{{ $totalMikrotik }} router online
@php
$totalOdpPorts = \App\Models\TopOdp::sum('jml_port_odp');
$usedPorts = \App\Models\Pelanggan::where('status', 'aktif')->count();
$portUtilization = $totalOdpPorts > 0 ? round(($usedPorts / $totalOdpPorts) * 100) : 0;
@endphp
Port Utilization
{{ $portUtilization }}%
{{ $usedPorts }}/{{ $totalOdpPorts }} port terpakai
@php
$activePelanggan = \App\Models\Pelanggan::where('status', 'aktif')->count();
$totalPelanggan = \App\Models\Pelanggan::count();
$serviceUptime = $totalPelanggan > 0 ? round(($activePelanggan / $totalPelanggan) * 100) : 100;
@endphp
Service Uptime
{{ $serviceUptime }}%
{{ $activePelanggan }}/{{ $totalPelanggan }} pelanggan aktif