@extends('layouts.app') @section('title', 'Online Clients - ISP ERP System') @section('page-title', 'Online Clients Management') @section('content')

Online Clients Management

@if(auth()->user()->role === 'mac_reseller') Monitor your assigned MikroTik servers and their online clients @else Monitor all active clients connected to MikroTik servers @endif

@if((isset($selectedIsp) && $selectedIsp) || (isset($selectedServer) && $selectedServer)) @endif
{{ $metrics['totalOnlineClients'] }}
Online Clients
{{ $metrics['activeServers'] }}
Active Servers
{{ $metrics['totalBandwidth'] }}
Total Bandwidth
{{ $metrics['totalServers'] }}
Total Servers
All Online Clients
@if($onlineClients->count() > 0)
@if(auth()->user()->role === 'mac_reseller' || auth()->user()->role === 'admin') @endif @foreach($onlineClients as $client) @if(auth()->user()->role === 'mac_reseller' || auth()->user()->role === 'admin') @endif @endforeach
UsernameClient Name Contact PackageServer IP Address Uptime Service Bytes In/Out Packets In/Out Caller ID Actions
{{ $client['username'] }}
{{ $client['client_name'] ?? 'N/A' }}
{{ $client['client_phone'] ?? 'N/A' }}
{{ $client['client_email'] ?? 'N/A' }}
{{ $client['package_name'] ?? 'N/A' }}
৳{{ $client['package_price'] ?? '0' }}
{{ $client['server_name'] }}
{{ $client['server_ip'] }}
{{ $client['address'] }} {{ $client['uptime'] }} {{ strtoupper($client['service']) }}
{{ \App\Helpers\FormatHelper::formatBytes(isset($client['bytes_in']) ? (is_numeric($client['bytes_in']) ? $client['bytes_in'] : (int)$client['bytes_in']) : 0) }}
{{ \App\Helpers\FormatHelper::formatBytes(isset($client['bytes_out']) ? (is_numeric($client['bytes_out']) ? $client['bytes_out'] : (int)$client['bytes_out']) : 0) }}
{{ number_format(isset($client['packets_in']) ? (is_numeric($client['packets_in']) ? (int)$client['packets_in'] : 0) : 0) }}
{{ number_format(isset($client['packets_out']) ? (is_numeric($client['packets_out']) ? (int)$client['packets_out'] : 0) : 0) }}
{{ $client['caller_id'] }}
@else
No Online Clients Found

No clients are currently connected to any MikroTik servers.

@endif
@endsection