mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Sort Settings by translated names (#11280)
If browser language is different from the language set in LibreNMS, it might sort slightly incorrectly.
This commit is contained in:
@@ -17,17 +17,16 @@ class SettingsController extends Controller
|
||||
* @param DynamicConfig $dynamicConfig
|
||||
* @param string $tab
|
||||
* @param string $section
|
||||
* @return \Illuminate\Http\Response
|
||||
* @return \Illuminate\Http\Response|\Illuminate\View\View
|
||||
*/
|
||||
public function index(DynamicConfig $dynamicConfig, $tab = 'global', $section = '')
|
||||
{
|
||||
$data = [
|
||||
'active_tab' => $tab,
|
||||
'active_section' => $section,
|
||||
'groups' => $dynamicConfig->getGroups()->reduce(function ($groups, $group) {
|
||||
/** @var Collection $groups */
|
||||
return $groups->put($group, []);
|
||||
}, new Collection())->forget('global'),
|
||||
'groups' => $dynamicConfig->getGroups()->reject(function ($group) {
|
||||
return $group == 'global';
|
||||
}),
|
||||
];
|
||||
|
||||
return view('settings.index', $data);
|
||||
|
||||
Reference in New Issue
Block a user