{{-- Network Address Card Component - TailServer Theme For displaying IP address information with gateway, netmask, and tools Usage: --}} @props([ 'type' => 'ipv4', 'ip', 'gateway' => null, 'netmask' => null, 'cidr' => null, 'isPublic' => false, 'isIpv6' => false, 'guestInterface' => null, 'fromGuestAgent' => false, ]) {{-- Header --}}

{{ strtoupper($type) }} Address

{{ $type === 'ipv6' ? 'IPv6' : 'IPv4' }}
{{-- Address Grid --}}
{{-- IP Address --}}

IP Address

{{ $ip }}
@if($cidr)

CIDR: {{ $ip }}{{ $cidr }}

@endif
{{-- Gateway --}}

Gateway

{{ $gateway ?? 'N/A' }} @if($gateway) @endif

{{ $fromGuestAgent && !$gateway ? 'Not configured in database' : 'Default route for this network' }}

{{-- Netmask --}}

Subnet Mask

{{ $netmask ?? 'N/A' }} @if($netmask) @endif

{{ $fromGuestAgent && !$netmask ? 'Not configured in database' : 'Network address range mask' }}

{{-- Network Tools (for public IPs) --}} @if($isPublic)
@if($isIpv6) Ping MTR BGP @else Ping MTR BGP @endif
@endif
{{-- Guest Agent Technical Details --}} @if($guestInterface)

Technical Details (Guest Agent)

@if(isset($guestInterface['hardware-address']))
MAC Address
{{ $guestInterface['hardware-address'] }}

Hardware address for this interface

@endif @if(isset($guestInterface['name']))
Interface Name {{ $guestInterface['name'] }}

Network interface identifier within the guest OS

@endif @if(isset($guestInterface['statistics']))
Statistics
@if(isset($guestInterface['statistics']['rx-bytes']))
RX: {{ number_format($guestInterface['statistics']['rx-bytes']) }} bytes
@endif @if(isset($guestInterface['statistics']['tx-bytes']))
TX: {{ number_format($guestInterface['statistics']['tx-bytes']) }} bytes
@endif @if(isset($guestInterface['statistics']['rx-packets']))
RX Packets: {{ number_format($guestInterface['statistics']['rx-packets']) }}
@endif @if(isset($guestInterface['statistics']['tx-packets']))
TX Packets: {{ number_format($guestInterface['statistics']['tx-packets']) }}
@endif

Network traffic statistics from guest OS

@endif
@endif