mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix some graphs not respecting device display name (#14684)
Just a quick fix
This commit is contained in:
@@ -8,7 +8,7 @@ if ($auth && is_numeric($vars['mod']) && is_numeric($vars['chan'])) {
|
||||
$title .= ' :: ' . $entity['entPhysicalName'];
|
||||
$title .= ' :: Fabric ' . $vars['chan'];
|
||||
|
||||
$graph_title = shorthost($device['hostname']) . '::' . $entity['entPhysicalName'] . '::Fabric' . $vars['chan'];
|
||||
$graph_title = DeviceCache::get($device['device_id'])->shortDisplayName() . '::' . $entity['entPhysicalName'] . '::Fabric' . $vars['chan'];
|
||||
|
||||
$rrd_filename = Rrd::name($device['hostname'], ['c6kxbar', $vars['mod'], $vars['chan']]);
|
||||
}
|
||||
|
@@ -2,6 +2,6 @@
|
||||
|
||||
if ($auth || device_permitted($device['device_id'])) {
|
||||
$title = generate_device_link($device);
|
||||
$graph_title = $device['hostname'];
|
||||
$graph_title = DeviceCache::get($device['device_id'])->displayName();
|
||||
$auth = true;
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ if (is_numeric($vars['id']) && ($auth || port_permitted($vars['id']))) {
|
||||
$title = generate_device_link($device);
|
||||
$title .= ' :: Port ' . generate_port_link($port);
|
||||
|
||||
$graph_title = shorthost($device['hostname']) . '::' . strtolower(makeshortif($port['ifDescr']));
|
||||
$graph_title = DeviceCache::get($device['device_id'])->shortDisplayName() . '::' . strtolower(makeshortif($port['ifDescr']));
|
||||
|
||||
if (($port['ifAlias'] != '') && ($port['ifAlias'] != $port['ifDescr'])) {
|
||||
$title .= ', ' . \LibreNMS\Util\Clean::html($port['ifAlias'], []);
|
||||
|
@@ -3,6 +3,6 @@
|
||||
if (is_numeric($vars['device']) && ($auth || device_permitted($vars['src']))) {
|
||||
$device = device_by_id_cache($vars['device']);
|
||||
$title = generate_device_link($device);
|
||||
$graph_title = $device['hostname'];
|
||||
$graph_title = DeviceCache::get($device['device_id'])->displayName();
|
||||
$auth = true;
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ foreach ($duration_list as $duration) {
|
||||
$graph_array['duration'] = $duration['duration'];
|
||||
|
||||
$human_duration = \LibreNMS\Util\Time::humanTime($duration['duration']);
|
||||
$graph_title = $device['hostname'] . ' - ' . $human_duration;
|
||||
$graph_title = DeviceCache::get($device['device_id'])->displayName() . ' - ' . $human_duration;
|
||||
|
||||
echo "<div class='panel panel-default'>
|
||||
<div class='panel-heading'>
|
||||
|
Reference in New Issue
Block a user