mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Display Name in availability map (#13841)
* Display Name option in availability map widget * fix availability map page and shortDisplayName
This commit is contained in:
@@ -242,7 +242,7 @@ class Device extends BaseModel
|
||||
|
||||
$length = \LibreNMS\Config::get('shorthost_target_length', $length);
|
||||
if ($length < strlen($name)) {
|
||||
$take = substr_count($name, '.', 0, $length) + 1;
|
||||
$take = max(substr_count($name, '.', 0, $length), 1);
|
||||
|
||||
return implode('.', array_slice(explode('.', $name), 0, $take));
|
||||
}
|
||||
|
Reference in New Issue
Block a user