@extends('layouts.app') @section('title', $device->name.' — RouterOS') @section('content')

{{ $device->name }}

Live RouterOS state read over the API from {{ $device->management_ip }}:{{ $device->mgmt_port }}.

← Device All devices
{{-- Identity / resource / health are arbitrary RouterOS key-value maps. --}} @foreach ([ 'identity' => 'System identity', 'resource' => 'Resources', 'health' => 'Hardware health', ] as $key => $heading) @php $rows = $info[$key] ?? []; @endphp @if (! empty($rows))

{{ $heading }}

@foreach ($rows as $field => $value) @endforeach
{{ $field }} {{ is_scalar($value) ? $value : json_encode($value) }}
@endif @endforeach @php $interfaces = $info['interfaces'] ?? []; @endphp

Interfaces

{{ count($interfaces) }} reported by the device
@if (! empty($interfaces))
@foreach ($interfaces as $iface) @endforeach
NameTypeMACMTU RunningRxTx
{{ $iface['name'] ?? '—' }} {{ $iface['type'] ?? '—' }} {{ $iface['mac-address'] ?? '—' }} {{ $iface['mtu'] ?? '—' }} @php $running = ($iface['running'] ?? 'false') === 'true'; @endphp {{ $running ? 'running' : 'stopped' }} {{ isset($iface['rx-byte']) ? human_bytes((int) $iface['rx-byte']) : '—' }} {{ isset($iface['tx-byte']) ? human_bytes((int) $iface['tx-byte']) : '—' }}
@else @include('components.empty-state', [ 'title' => 'No interfaces reported', 'message' => 'The device accepted the API session but returned an empty /interface/print.', ]) @endif

Read at {{ now()->format('j M Y H:i:s') }}. This page queries the device live; nothing here is cached.

@endsection