@extends('layouts.app')
@section('title', 'NOC')
@section('content')
Network Operations Centre
Auto-refreshes every {{ $refreshSeconds }}s · last poll {{ $lastPoll?->diffForHumans() ?? 'never' }}
@include('components.kpi', ['label' => 'Devices up', 'value' => $counts['up'].' / '.$counts['total'],
'variant' => $counts['down'] > 0 ? 'bad' : 'good', 'href' => route('devices.index', ['status' => 'up'])])
@include('components.kpi', ['label' => 'Availability 30d', 'value' => percent($counts['availability']),
'variant' => $counts['availability'] >= 99.5 ? 'good' : 'warn', 'href' => route('reports.network')])
@include('components.kpi', ['label' => 'Active alerts', 'value' => $counts['alerts'],
'variant' => $counts['alerts'] > 0 ? ($counts['critical'] > 0 ? 'bad' : 'warn') : 'good',
'delta' => $counts['critical'].' critical', 'href' => route('alerts.index')])
@include('components.kpi', ['label' => 'Online subscribers', 'value' => number_format($counts['online']),
'variant' => 'good', 'href' => route('radius.sessions', ['online' => 1])])
@include('components.kpi', ['label' => 'Aggregate throughput', 'value' => human_bytes($counts['throughput']).'/s',
'variant' => 'info', 'href' => route('reports.network')])
@include('components.kpi', ['label' => 'Sites', 'value' => $counts['sites'].' / '.$counts['sites_total'],
'delta' => $counts['sites_total'] - $counts['sites'].' offline', 'href' => route('sites.index')])
{{-- Alert feed --}}
@if ($alerts->isNotEmpty())
@foreach ($alerts as $alert)
{{ $alert->severity }}
{{ $alert->title }}
@if ($alert->occurrences > 1)
×{{ $alert->occurrences }}
@endif
{{ $alert->device?->name ?? $alert->site?->name ?? 'Network' }}
·
@if ($alert->first_triggered_at && $alert->first_triggered_at->ne($alert->created_at))
· first seen {{ $alert->first_triggered_at->diffForHumans() }}
@endif
{{ $alert->description }}
@if ($alert->ticket_id)
Ticket raised · linked
@endif
@endforeach
@else
@include('components.empty-state', ['icon' => '✓', 'title' => 'All clear',
'message' => 'No active alerts across the estate.'])
@endif
{{-- Bandwidth --}}
Aggregate bandwidth — 24h
All monitored interfaces
@include('components.chart', [
'series' => collect($bandwidth)->map(fn ($p) => [
'label' => \Carbon\Carbon::parse($p['sampled_at'])->format('H:i'),
'value' => $p['total_bps'],
])->all(),
'type' => 'line', 'format' => 'bytes', 'height' => 210,
])
{{-- Sites --}}
| Site | Location | Type | Devices | Up | Status | Last poll |
@forelse ($sites as $site)
@php
$total = $site->devices->count();
$up = $site->devices->where('status', 'up')->count();
@endphp
| {{ $site->name }}
{{ $site->site_code }} |
{{ $site->city }} {{ $site->region }} |
{{ title_case_words($site->type) }} |
{{ $total }} |
{{ $up }} |
{{ $site->status }} |
{{ $site->last_poll_at?->diffForHumans() ?? 'never' }} |
@empty
|
@include('components.empty-state', ['icon' => '⚑', 'title' => 'No sites registered',
'action' => 'Add a site'])
|
@endforelse
{{-- Devices --}}
| Device | Role | Site | Management IP |
Latency | Uptime | Status | Last poll | |
@forelse ($devices as $device)
|
{{ $device->name }}
{{ $device->model }} · {{ $device->firmware_version }}
|
{{ $device->role }} |
{{ $device->site?->name ?: '—' }} |
{{ $device->management_ip }}
|
@if ($device->status === 'up' && $device->last_ping_ms !== null)
{{ number_format($device->last_ping_ms, 1) }} ms
@else
—
@endif
|
{{ $device->uptime_label }} |
{{ $device->status }} |
{{ $device->last_polled_at?->diffForHumans() ?? 'never' }} |
Open |
@empty
|
@include('components.empty-state', ['icon' => '⚙', 'title' => 'No devices registered',
'message' => 'Add your routers, OLTs, switches and APs to start monitoring.',
'action' => '+ Add device'])
|
@endforelse
{{-- Maintenance windows --}}
@if ($maintenance->isNotEmpty())
Maintenance windows
| Title | Window | Scope | Owner | Status | |
@foreach ($maintenance as $window)
| {{ $window->title }} |
{{ $window->starts_at->format('d M H:i') }} – {{ $window->ends_at->format('d M H:i') }} |
{{ $window->scope_description }} |
{{ $window->createdBy?->name ?? '—' }} |
{{ $window->status }} |
@if ($window->status === 'scheduled')
@elseif ($window->status === 'in_progress')
@endif
|
@endforeach
@endif
@endsection