@extends('layouts.app') @section('title','Active Hotspot Users — BlueBando v3') @section('content') @php // formatter function bb_format_bytes($bytes) { $bytes = (float)$bytes; if ($bytes < 1024) return $bytes.' B'; if ($bytes < 1048576) return round($bytes/1024,2).' KB'; if ($bytes < 1073741824) return round($bytes/1048576,2).' MB'; if ($bytes < 1099511627776) return round($bytes/1073741824,2).' GB'; return round($bytes/1099511627776,2).' TB'; } $count = is_array($sessions) ? count($sessions) : 0; // compute max traffic for bar + chart $maxTraffic = 0; foreach ($sessions as $tmp) { $t = (int)($tmp['_traffic'] ?? 0); if ($t > $maxTraffic) $maxTraffic = $t; } $maxTraffic = $maxTraffic ?: 1; $routerId = optional($currentRouter)->id; @endphp
| Server | User | Address | MAC Address | Uptime | Bytes In | Bytes Out | Traffic | Time Left | Login By | Actions | Comment |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $server }} | {{ $user }} | {{ $address }} | {{ $mac }} | {{ $uptime }} | {{ bb_format_bytes($bytesIn) }} | {{ bb_format_bytes($bytesOut) }} |
{{ bb_format_bytes($trafficBytes) }}
|
{{ $timeLeft }} | @if($loginBy) {{ $loginBy }} @endif |
{{-- Kick --}}
@if($id)
@endif
{{-- Kick by MAC --}}
@if($mac)
@endif
{{-- Disable user --}}
@if($user)
@endif
|
{{ $comment }} |