mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 02:18:39 +00:00
This reverts commit cbe2ba55ce
.
This commit is contained in:
parent
723600751c
commit
cfc9aca6a4
@ -180,15 +180,12 @@ class Device extends BaseModel
|
||||
{
|
||||
$hostname_is_ip = IP::isValid($this->hostname);
|
||||
|
||||
$return_value = SimpleTemplate::parse($this->display ?: \LibreNMS\Config::get('device_display_default', '{{ $hostname }}'), [
|
||||
return SimpleTemplate::parse($this->display ?: \LibreNMS\Config::get('device_display_default', '{{ $hostname }}'), [
|
||||
'hostname' => $this->hostname,
|
||||
'sysName' => $this->sysName ?: $this->hostname,
|
||||
'sysName_fallback' => $hostname_is_ip ? $this->sysName : $this->hostname,
|
||||
'ip' => $this->overwrite_ip ?: ($hostname_is_ip ? $this->hostname : $this->ip),
|
||||
]);
|
||||
|
||||
// in case the displayName is a string without any content, return hostname
|
||||
return trim($return_value) ?: $this->hostname;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user