{{ __('Routers') }} @php // A platform owner is looking at every seller's hardware at once. They can // see it and reach it for support, but linking and configuring a router // belongs to whoever sells the Wi-Fi through it. $isPlatformOwner = auth()->user()?->hasRole('Super Admin') ?? false; @endphp @unless ($isPlatformOwner) {{ __('Link MikroTik') }} @endunless
{{-- Preferred path: the router configures itself from a pasted one-liner --}} {{ __('Link a MikroTik') }} {{-- Manual entry stays for routers already reachable on a public IP --}}
@foreach ($routers as $router)
{{ $router->router_name }}
{{ $router->ip_address }}
{{ __('Username') }}: {{ $router->username }}
{{ __('SSH Port') }}: {{ $router->ssh_port ?? '-' }}
{{ __('API Port') }}: {{ $router->api_port ?? '-' }}
{{ __('Customers') }}: {{ $router->user_list_count }}
action === 'connected' ? 'checked' : '' }} x-data="{ dataSyncFunction(customer_id) { $(customer_id).text(''); let spinnerSpan = document.createElement('span'); spinnerSpan.classList.add('spinner-border', 'spinner-border-sm', 'text-primary'); spinnerSpan.setAttribute('aria-hidden', 'true'); $(customer_id).append(spinnerSpan); } }" x-on:click="if($event.target.checked){dataSyncFunction('#customers-' + {{ $router->id }})}">
@endforeach