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

Topology

{{ $links->total() }} link(s). The map that answers "what goes down if this device dies?"

@include('components.kpi', ['label' => 'Links', 'value' => (string) $totals['count'], 'variant' => 'info']) @include('components.kpi', ['label' => 'Up', 'value' => (string) $totals['up'], 'variant' => 'good']) @include('components.kpi', ['label' => 'Down', 'value' => (string) $totals['down'], 'variant' => $totals['down'] ? 'bad' : 'good']) @include('components.kpi', ['label' => 'Total capacity', 'value' => number_format($totals['capacity']).' Mbps'])

Record a link

@csrf
@error('source_device_id'){{ $message }}@enderror
@error('target_device_id'){{ $message }}@enderror
@if ($links->isEmpty()) @include('components.empty-state', [ 'icon' => '🔗', 'title' => 'No links recorded', 'message' => 'Record the connections between devices so you can see what is affected when one fails.', ]) @else @foreach ($links as $link) @endforeach
FromPortToPort MediumCapacityDistance Status
{{ $link->source?->name ?: '—' }} {{ $link->source_port ?: '—' }} → {{ $link->target?->name ?: '—' }} {{ $link->target_port ?: '—' }} {{ title_case_words($link->medium) }} {{ $link->capacity_mbps ? number_format($link->capacity_mbps) : '—' }} {{ $link->distance_km ? $link->distance_km.' km' : '—' }} {{ title_case_words($link->status) }}
@csrf @method('PUT')
@csrf @method('DELETE')
@endif
@if ($links->hasPages())
{{ $links->links('partials.pagination') }}
@endif
@endsection