mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
custom port view fix (#14637)
* custom port view fix * . * code adjustment * code adjustment * .
This commit is contained in:
parent
752bbc1531
commit
df0c41672a
@ -19,10 +19,15 @@ unset($seperator);
|
||||
|
||||
// show title from config file (but ucwords it)
|
||||
$ctypes = collect(\LibreNMS\Config::get('custom_descr', []))->keyBy(function ($descr) {
|
||||
if (is_array($descr)) {
|
||||
return strtolower($descr[0]);
|
||||
}
|
||||
|
||||
return strtolower($descr);
|
||||
});
|
||||
array_walk($types_array, function (&$type) use ($ctypes) {
|
||||
$type = ucwords($ctypes->get(strtolower($type), $type));
|
||||
$name = $ctypes->get(strtolower($type), $type);
|
||||
$type = ucwords(is_array($name) ? $name[0] : $name);
|
||||
});
|
||||
|
||||
$types = implode(' + ', $types_array);
|
||||
|
Loading…
Reference in New Issue
Block a user