Skip to content

Commit aef8816

Browse files
authored
Ports: show ifIndex to allow restoring sort to ifIndex (librenms#18374)
1 parent 60375ac commit aef8816

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

app/Http/Controllers/Device/Tabs/PortsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function data(Device $device, Request $request): array
8080
Validator::validate($request->all(), [
8181
'page' => 'int',
8282
'perPage' => ['regex:/^(\d+|all)$/'],
83-
'sort' => 'in:media,mac,port,traffic,speed',
83+
'sort' => 'in:media,mac,port,traffic,speed,index',
8484
'order' => 'in:asc,desc',
8585
'disabled' => 'in:0,1',
8686
'ignored' => 'in:0,1',

resources/views/device/tabs/ports/detail.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<table id="ports-fdb" class="table table-condensed table-hover table-striped tw:mt-1 tw:mb-0!">
33
<thead>
44
<tr>
5+
<th width="50"><a href="{{ $request->fullUrlWithQuery(['sort' => 'index', 'order' => $data['sort'] !== 'index' ? 'asc' : $data['next_order']]) }}">{{ __('Index') }}</a></th>
56
<th width="350"><a href="{{ $request->fullUrlWithQuery(['sort' => 'port', 'order' => $data['sort'] == 'port' ? $data['next_order'] : 'asc']) }} ">{{ __('Port') }}</a></th>
67
<th width="100" class="tw:hidden tw:md:table-cell">{{ __('Port Groups') }}</th>
78
<th width="100">{{ __('Graphs') }}</th>

resources/views/device/tabs/ports/includes/port_row.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<tr>
2+
<td>{{ $port->ifIndex }}</td>
23
<td>
34
<div>
45
<x-port-link :port="$port" class="tw:inline">

0 commit comments

Comments
 (0)