Skip to content

Commit

Permalink
Fix port neighbors unknown local port (#16128)
Browse files Browse the repository at this point in the history
Fix issue when somehow the local port is unknown.  Likely this is faulty polling or snmp implementation.
  • Loading branch information
murrant committed Jun 17, 2024
1 parent 8c4caab commit 097d4a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions lang/en/port.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'links' => 'Neighbors',
'xdsl' => 'xDSL',
],
'unknown_port' => 'Unknown Port',
'vlan_count' => 'VLANs: :count',
'vlan_label' => 'VLAN: :label',
'xdsl' => [
Expand Down
11 changes: 8 additions & 3 deletions resources/views/device/tabs/ports/links.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 097d4a3

Please sign in to comment.