{{-- Network Address Card Component - AdminLTE style 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' }}

{{-- Netmask --}}
Subnet Mask
{{ $netmask ?? 'N/A' }} @if($netmask) @endif

{{ $fromGuestAgent && !$netmask ? 'Not configured' : 'Network range' }}

{{-- 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

@if(isset($guestInterface['hardware-address']))
MAC Address
{{ $guestInterface['hardware-address'] }}
@endif @if(isset($guestInterface['name']))
Interface {{ $guestInterface['name'] }}
@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
@endif
@endif