mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
Merge pull request #2127 from 9er/fgmarkers
Move red map markers to foreground
This commit is contained in:
@@ -62,5 +62,6 @@ Contributors to LibreNMS:
|
|||||||
- Xavier Beaudouin <kiwi@oav.net> (xbeaudouin)
|
- Xavier Beaudouin <kiwi@oav.net> (xbeaudouin)
|
||||||
- Falk Stern <falk@fourecks.de> (fstern)
|
- Falk Stern <falk@fourecks.de> (fstern)
|
||||||
- Donovan Bridoux <donovan.bridoux@gmail.com> (PandaWawawa)
|
- Donovan Bridoux <donovan.bridoux@gmail.com> (PandaWawawa)
|
||||||
|
- Sebastian Neuner <sebastian@sneuner.org> (9er)
|
||||||
|
|
||||||
[1]: http://observium.org/ "Observium web site"
|
[1]: http://observium.org/ "Observium web site"
|
||||||
|
|||||||
@@ -123,11 +123,13 @@ var greenMarker = L.AwesomeMarkers.icon({
|
|||||||
}
|
}
|
||||||
foreach (dbFetchRows($sql, array($_SESSION['user_id'])) as $map_devices) {
|
foreach (dbFetchRows($sql, array($_SESSION['user_id'])) as $map_devices) {
|
||||||
$icon = 'greenMarker';
|
$icon = 'greenMarker';
|
||||||
|
$z_offset = 0;
|
||||||
if ($map_devices['status'] == 0) {
|
if ($map_devices['status'] == 0) {
|
||||||
$icon = 'redMarker';
|
$icon = 'redMarker';
|
||||||
|
$z_offset = 10000; // move marker to foreground
|
||||||
}
|
}
|
||||||
$temp_output .= "var title = '<a href=\"" . generate_device_url($map_devices) . "\"><img src=\"".getImageSrc($map_devices)."\" width=\"32\" height=\"32\" alt=\"\">".$map_devices['hostname']."</a>';
|
$temp_output .= "var title = '<a href=\"" . generate_device_url($map_devices) . "\"><img src=\"".getImageSrc($map_devices)."\" width=\"32\" height=\"32\" alt=\"\">".$map_devices['hostname']."</a>';
|
||||||
var marker = L.marker(new L.LatLng(".$map_devices['lat'].", ".$map_devices['lng']."), {title: title, icon: $icon});
|
var marker = L.marker(new L.LatLng(".$map_devices['lat'].", ".$map_devices['lng']."), {title: title, icon: $icon, zIndexOffset: $z_offset});
|
||||||
marker.bindPopup(title);
|
marker.bindPopup(title);
|
||||||
markers.addLayer(marker);\n";
|
markers.addLayer(marker);\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user