mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add ORDER BY to the ports query when showing the ports list on device overview (#13276)
This commit is contained in:
@@ -50,7 +50,7 @@ if (ObjectCache::portCounts(['total'], $device['device_id'])['total'] > 0) {
|
||||
|
||||
$ifsep = '';
|
||||
|
||||
foreach (dbFetchRows("SELECT * FROM `ports` WHERE device_id = ? AND `deleted` != '1' AND `disabled` = 0", [$device['device_id']]) as $data) {
|
||||
foreach (dbFetchRows("SELECT * FROM `ports` WHERE device_id = ? AND `deleted` != '1' AND `disabled` = 0 ORDER BY ifName", [$device['device_id']]) as $data) {
|
||||
$data = cleanPort($data);
|
||||
$data = array_merge($data, $device);
|
||||
echo "$ifsep" . generate_port_link($data, makeshortif(strtolower($data['label'])));
|
||||
|
||||
Reference in New Issue
Block a user