mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Check if vlan->port exists (#13305)
This commit is contained in:
@@ -17,23 +17,24 @@
|
||||
<td>{{ $vlans->first()->vlan_name }}</td>
|
||||
<td>
|
||||
@foreach($vlans as $port)
|
||||
@if(!$port->port)
|
||||
@continue;
|
||||
@endif
|
||||
|
||||
@if(!$vars)
|
||||
<span class="tw-inline-flex">
|
||||
@if($port->port)
|
||||
<x-port-link :port="$port->port">{{ $port->port->getShortLabel() }}</x-port-link>
|
||||
@if($port->untagged)<span> (U)</span>@endif
|
||||
@if(!$loop->last)<span>,</span>@endif
|
||||
@endif
|
||||
<x-port-link :port="$port->port">{{ $port->port->getShortLabel() }}</x-port-link>
|
||||
@if($port->untagged)<span> (U)</span>@endif
|
||||
@if(!$loop->last)<span>,</span>@endif
|
||||
</span>
|
||||
@else
|
||||
<div style="display: block; padding: 2px; margin: 2px; min-width: 139px; max-width:139px; min-height:85px; max-height:85px; text-align: center; float: left; background-color: {{ \LibreNMS\Config::get('list_colour.odd_alt2') }}">
|
||||
|
||||
<div style="font-weight: bold;">{{ $port->port->ifDescr }}</div>
|
||||
<a href="{{ route('device', ['device' => $device->device_id, 'tab' => 'port', 'vars' => 'port='.$port->port->port_id]) }}" onmouseover="return overlib('<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>{{ $device->hostname }}-{{ $port->port->ifDescr }}</div>{{ $port->port->ifAlias }}<img src=\'{{ url('graph.php') }}?type=port_{{ $vars }}&id={{ $port->port->port_id }}&from={{ \LibreNMS\Config::get('time.twoday') }}&to={{ \LibreNMS\Config::get('time.now') }}&width=450&height=150\'>', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);" onmouseout="return nd();">
|
||||
<div style="display: block; padding: 2px; margin: 2px; min-width: 139px; max-width:139px; min-height:85px; max-height:85px; text-align: center; float: left; background-color: {{ \LibreNMS\Config::get('list_colour.odd_alt2') }}">
|
||||
<div style="font-weight: bold;">{{ $port->port->ifDescr }}</div>
|
||||
<a href="{{ route('device', ['device' => $device->device_id, 'tab' => 'port', 'vars' => 'port='.$port->port->port_id]) }}" onmouseover="return overlib('<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>{{ $device->hostname }}-{{ $port->port->ifDescr }}</div>{{ $port->port->ifAlias }}<img src=\'{{ url('graph.php') }}?type=port_{{ $vars }}&id={{ $port->port->port_id }}&from={{ \LibreNMS\Config::get('time.twoday') }}&to={{ \LibreNMS\Config::get('time.now') }}&width=450&height=150\'>', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);" onmouseout="return nd();">
|
||||
<img src="{{ url('graph.php') }}?type=port_{{ $vars }}&id={{ $port->port->port_id }}&from={{ \LibreNMS\Config::get('time.twoday') }}&to={{ \LibreNMS\Config::get('time.now') }}&width=132&height=40&legend=no">
|
||||
</a>
|
||||
<div style="font-size: 9px;">{{ $port->port->ifAlias }}</div>
|
||||
</div>
|
||||
</a>
|
||||
<div style="font-size: 9px;">{{ $port->port->ifAlias }}</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
|
Reference in New Issue
Block a user