@extends('layouts.adminlte-layout') @section('title', 'Dashboard') @section('content-header')

Dashboard

@endsection @section('page-content')

{{ $stats['total_clients'] ?? 0 }}

Total Clients

More info

{{ $stats['active_clients'] ?? 0 }}

Active Clients

More info

{{ $stats['connected_clients'] ?? 0 }}

Connected Now

More info

@php $bytes = $stats['total_traffic'] ?? 0; $units = ['B', 'KB', 'MB', 'GB', 'TB']; for ($i = 0; $bytes > 1024 && $i < count($units) - 1; $i++) { $bytes /= 1024; } echo round($bytes, 2) . ' ' . $units[$i]; @endphp

Total Traffic

More info

Recent Clients

@if(isset($recentClients) && count($recentClients) > 0) @foreach($recentClients as $client) @endforeach
Name Email Status
{{ $client->name }} {{ $client->email ?? 'No email' }} {{ ucfirst($client->status) }}
@else

No clients yet

@endif

Connected Clients

{{ count($activeConnections) }} Online
@if(isset($activeConnections) && count($activeConnections) > 0) @foreach($activeConnections as $connection) @endforeach
Client IP Address Traffic Time
@if($connection->vpn_client_id && $connection->client) {{ $connection->client->name }} @else Unknown Client @endif {{ $connection->real_address ?? 'N/A' }}
{{ $connection->virtual_address ?? 'N/A' }}
{{ number_format(($connection->bytes_sent ?? 0) / 1024) }} KB
{{ number_format(($connection->bytes_received ?? 0) / 1024) }} KB
{{ $connection->connected_at->diffForHumans(null, true) }}
@else

No active connections

@endif
@endsection