@extends('layouts.app')
@section('title', $device->name)
@section('content')
{{ $device->name }}
{{ title_case_words($device->role) }}
· {{ $device->status }}
· {{ $device->management_ip }}
@if ($device->site) · {{ $device->site->name }} @endif
@if ($device->vendor === 'mikrotik')
@endif
Edit
@include('components.kpi', ['label' => 'Status', 'value' => title_case_words($device->status),
'variant' => $device->status === 'up' ? 'good' : ($device->status === 'down' ? 'bad' : 'warn'), 'href' => '#'])
@include('components.kpi', ['label' => 'Latency', 'value' => $device->last_ping_ms !== null ? number_format($device->last_ping_ms, 1).' ms' : '—',
'variant' => ($device->last_ping_ms ?? 0) < 50 ? 'good' : 'warn', 'href' => '#'])
@include('components.kpi', ['label' => 'Uptime', 'value' => $device->uptime_label, 'href' => '#'])
@include('components.kpi', ['label' => 'Interfaces up', 'value' => $device->interfaces()->where('admin_status', 'up')->count().' / '.$device->interfaces()->count(),
'variant' => 'info', 'href' => '#interfaces'])
@include('components.kpi', ['label' => 'Active alerts', 'value' => $device->alerts()->active()->count(),
'variant' => $device->alerts()->active()->count() > 0 ? 'bad' : 'good', 'href' => '#'])
@include('components.kpi', ['label' => 'Last poll', 'value' => $device->last_polled_at?->diffForHumans() ?? 'never', 'href' => '#'])
Throughput — 24h
@include('components.chart', [
'series' => collect($metrics)->map(fn ($m) => [
'label' => \Carbon\Carbon::parse($m['sampled_at'])->format('H:i'),
'value' => $m['in_bps'],
])->all(),
'type' => 'line', 'format' => 'bytes', 'height' => 200,
])
Device detail
- Hostname
- {{ $device->hostname ?: '—' }}
- Vendor / model
- {{ title_case_words($device->vendor ?? 'unknown') }} {{ $device->model }}
- Serial
- {{ $device->serial_number ?: '—' }}
- Firmware
- {{ $device->firmware_version ?: '—' }}
- OS
- {{ $device->os_version ?: '—' }}
- Monitoring
- {{ title_case_words($device->monitoring_type) }}
- SNMP
- v{{ $device->snmp_version }} {{ $device->snmp_community ? '(community set)' : '(default)' }}
@if ($device->vendor === 'mikrotik')
- RouterOS API
- {{ $device->management_ip }}:{{ $device->api_port }} {{ $device->api_ssl ? '(TLS)' : '' }}
@endif
- Poll interval
- {{ $device->poll_interval }}s
- Site
- {{ $device->site?->name ?? 'Unassigned' }}
- Registered
- {{ $device->created_at->format('d M Y') }}
Interfaces
| Name | Description | Admin | Oper | Speed |
In | Out | In errors | Out errors |
@forelse ($device->interfaces as $interface)
| {{ $interface->name }} |
{{ $interface->description ?: '—' }} |
{{ $interface->admin_status }} |
{{ $interface->oper_status }} |
{{ $interface->speed ? human_bytes($interface->speed) : '—' }} |
{{ human_bytes($interface->in_octets) }} |
{{ human_bytes($interface->out_octets) }} |
{{ number_format($interface->in_errors) }} |
{{ number_format($interface->out_errors) }} |
@empty
|
@include('components.empty-state', ['icon' => '🔌', 'title' => 'No interfaces synced',
'message' => 'Sync the interface table to start tracking port-level counters.',
'action' => ''])
|
@endforelse
Alerts for this device
| Alert | Severity | Triggered | Status |
@forelse ($device->alerts()->latest()->limit(15)->get() as $alert)
| {{ $alert->title }}
{{ \Illuminate\Support\Str::limit($alert->description, 70) }} |
{{ $alert->severity }} |
{{ $alert->created_at->format('d M H:i') }} |
{{ $alert->status }} |
@empty
| @include('components.empty-state', ['icon' => '✓', 'title' => 'No alerts raised']) |
@endforelse
Ping history — 24h
@include('components.chart', [
'series' => collect($pings)->map(fn ($p) => [
'label' => \Carbon\Carbon::parse($p['checked_at'])->format('H:i'),
'value' => $p['response_ms'],
])->all(),
'type' => 'line', 'format' => 'number', 'height' => 200,
])
@if ($device->role === 'olt' && $device->pons->isNotEmpty())
PON ports & ONUs
| PON port | ONUs | Online | Splitter | Status |
@foreach ($device->pons as $pon)
| {{ $pon->pon_port }} |
{{ $pon->onus->count() }} |
{{ $pon->onus->where('status', 'online')->count() }} |
{{ $pon->splitter ?: '—' }} |
{{ $pon->status }} |
@endforeach
@endif
@endsection