mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webui: Updated remaining display options where we do not show sysName if hostname is IP (#6585)
* webui: Updated remaining display options where we do not show sysName if hostname is IP * renamed function + simplified
This commit is contained in:
committed by
Tony Murray
parent
1135bb9146
commit
34c35f3627
@@ -226,7 +226,7 @@ if (defined('SHOW_SETTINGS')) {
|
||||
$deviceLabelOld = 'availability-map-oldview-box-down';
|
||||
$host_down_count++;
|
||||
}
|
||||
$device_system_name = ip_to_sysname($device, $device['hostname']);
|
||||
$device_system_name = format_hostname($device);
|
||||
|
||||
if ($config['webui']['availability_map_compact'] == 0) {
|
||||
if ($directpage == "yes") {
|
||||
@@ -276,7 +276,7 @@ if (defined('SHOW_SETTINGS')) {
|
||||
$serviceState = "down";
|
||||
$service_down_count++;
|
||||
}
|
||||
$service_system_name = ip_to_sysname($service, $service['hostname']);
|
||||
$service_system_name = format_hostname($service);
|
||||
|
||||
if ($config['webui']['availability_map_compact'] == 0) {
|
||||
if ($directpage == "yes") {
|
||||
|
@@ -185,8 +185,8 @@ var greenMarker = L.AwesomeMarkers.icon({
|
||||
$icon = 'redMarker';
|
||||
$z_offset = 10000; // move marker to foreground
|
||||
}
|
||||
$temp_output .= "var title = '<a href=\"" . generate_device_url($map_devices) . "\"><img src=\"".getIcon($map_devices)."\" width=\"32\" height=\"32\" alt=\"\"> ".ip_to_sysname($map_devices, $map_devices['hostname'])."</a>';
|
||||
var tooltip = '".ip_to_sysname($map_devices, $map_devices['hostname'])."';
|
||||
$temp_output .= "var title = '<a href=\"" . generate_device_url($map_devices) . "\"><img src=\"".getIcon($map_devices)."\" width=\"32\" height=\"32\" alt=\"\"> ".format_hostname($map_devices)."</a>';
|
||||
var tooltip = '".format_hostname($map_devices)."';
|
||||
var marker = L.marker(new L.LatLng(".$map_devices['lat'].", ".$map_devices['lng']."), {title: tooltip, icon: $icon, zIndexOffset: $z_offset});
|
||||
marker.bindPopup(title);
|
||||
markers.addLayer(marker);\n";
|
||||
|
Reference in New Issue
Block a user