mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Sort Devices and Groups in Alert Rules 'map to' droplist (#10530)
* alphabetic order of Devices and Groups in Alert Rules
This commit is contained in:
@ -68,4 +68,6 @@ $devices = array_map(function ($device) {
|
||||
|
||||
$more = ($offset + count($devices)) < $total;
|
||||
|
||||
array_multisort(array_column($devices, 'text'), SORT_ASC, $devices);
|
||||
|
||||
return [$devices, $more];
|
||||
|
@ -50,7 +50,7 @@ if (!empty($_REQUEST['limit'])) {
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT `id`, `name` AS `text` FROM `device_groups` $query";
|
||||
$sql = "SELECT `id`, `name` AS `text` FROM `device_groups` $query order by `name`";
|
||||
$groups = dbFetchRows($sql, $params);
|
||||
|
||||
$more = ($offset + count($groups)) < $total;
|
||||
|
Reference in New Issue
Block a user