Fix port neighbors unknown local port (#16128)

Fix issue when somehow the local port is unknown.  Likely this is faulty polling or snmp implementation.
This commit is contained in:
Tony Murray
2024-06-17 02:42:15 -05:00
committed by GitHub
parent 8c4caab81a
commit 097d4a3f94
2 changed files with 9 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ return [
'links' => 'Neighbors',
'xdsl' => 'xDSL',
],
'unknown_port' => 'Unknown Port',
'vlan_count' => 'VLANs: :count',
'vlan_label' => 'VLAN: :label',
'xdsl' => [

View File

@@ -10,9 +10,14 @@
</thead>
@foreach($data['links'] as $link)
<tr>
<td><x-port-link :port="$link->port"></x-port-link>
@if($link->port->getLabel() !== $link->port->getDescription() )
<br />{{ $link->port->getDescription() }}
<td>
@if($link->port)
<x-port-link :port="$link->port"></x-port-link>
@if($link->port->getLabel() !== $link->port->getDescription() )
<br />{{ $link->port->getDescription() }}
@endif
@else
{{ __('port.unknown_port') }}
@endif
</td>
<td>