@extends('layouts.app') @section('title', 'Network performance') @section('content')

Network performance

{{ $from->format('d M Y') }} – {{ $to->format('d M Y') }}

@include('components.kpi', ['label' => 'Availability', 'value' => percent($summary['availability']), 'variant' => $summary['availability'] >= 99.5 ? 'good' : 'warn', 'href' => '#']) @include('components.kpi', ['label' => 'Devices monitored', 'value' => number_format($summary['devices']), 'variant' => 'info', 'href' => '#']) @include('components.kpi', ['label' => 'Alerts raised', 'value' => number_format($summary['alerts']), 'variant' => $summary['alerts'] > 0 ? 'warn' : 'good', 'href' => '#']) @include('components.kpi', ['label' => 'Critical alerts', 'value' => number_format($summary['critical']), 'variant' => $summary['critical'] > 0 ? 'bad' : 'good', 'href' => '#']) @include('components.kpi', ['label' => 'Avg latency', 'value' => $summary['avg_latency'] ? number_format($summary['avg_latency'], 1).' ms' : '—', 'href' => '#']) @include('components.kpi', ['label' => 'Peak throughput', 'value' => human_bytes($summary['peak_throughput']).'/s', 'variant' => 'info', 'href' => '#'])

Aggregate throughput

@include('components.chart', [ 'series' => collect($bandwidth)->map(fn ($b) => [ 'label' => \Carbon\Carbon::parse($b['date'])->format('d M'), 'value' => $b['peak_bps'], ])->all(), 'type' => 'line', 'format' => 'bytes', 'height' => 210, ])

Alert volume

@include('components.chart', [ 'series' => collect($alertTrend)->map(fn ($a) => [ 'label' => \Carbon\Carbon::parse($a['date'])->format('d M'), 'value' => $a['total'], ])->all(), 'type' => 'bar', 'format' => 'number', 'height' => 210, ])

Alert types

@php $maxAlert = collect($alertTypes)->max('total') ?: 1; @endphp @forelse ($alertTypes as $type)
{{ title_case_words($type['type']) }} {{ $type['total'] }}
@empty

No alerts raised in this period.

@endforelse

Least reliable devices

@forelse ($worstDevices as $device) @empty @endforelse
DeviceDowntimeAlertsAvailability
{{ $device['name'] }} {{ $device['downtime_minutes'] }} min {{ $device['alerts'] }} {{ percent($device['availability']) }}
@include('components.empty-state', ['icon' => '✓', 'title' => 'All devices reliable'])
@endsection