mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated clusters to show red if at least one host is down
This commit is contained in:
@@ -1821,3 +1821,24 @@ label {
|
|||||||
|
|
||||||
@media only screen and (min-width: 1024px) {
|
@media only screen and (min-width: 1024px) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.redCluster {
|
||||||
|
background-color: rgba(255,0,0);
|
||||||
|
background-color: rgba(255,0,0,0.7);
|
||||||
|
text-align: center;
|
||||||
|
width: 25px !important;
|
||||||
|
height: 25px !important;
|
||||||
|
font-size: 14px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.greenCluster {
|
||||||
|
background-color: rgba(0,255,0);
|
||||||
|
background-color: rgba(0,255,0,0.7);
|
||||||
|
text-align: center;
|
||||||
|
width: 25px !important;
|
||||||
|
height: 25px !important;
|
||||||
|
font-size: 14px;
|
||||||
|
color: black;
|
||||||
|
border-color:transparent;
|
||||||
|
}
|
||||||
|
@@ -137,6 +137,17 @@ L.tileLayer(\'//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\', {
|
|||||||
|
|
||||||
var markers = L.markerClusterGroup({
|
var markers = L.markerClusterGroup({
|
||||||
maxClusterRadius: ' . $group_radius . ',
|
maxClusterRadius: ' . $group_radius . ',
|
||||||
|
iconCreateFunction: function (cluster) {
|
||||||
|
var markers = cluster.getAllChildMarkers();
|
||||||
|
var n = 0;
|
||||||
|
newClass = "greenCluster marker-cluster marker-cluster-small leaflet-zoom-animated leaflet-clickable";
|
||||||
|
for (var i = 0; i < markers.length; i++) {
|
||||||
|
if (markers[i].options.icon.options.markerColor == "red") {
|
||||||
|
newClass = "redCluster marker-cluster marker-cluster-small leaflet-zoom-animated leaflet-clickable";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return L.divIcon({ html: cluster.getChildCount(), className: newClass, iconSize: L.point(40, 40) });
|
||||||
|
},
|
||||||
});
|
});
|
||||||
var redMarker = L.AwesomeMarkers.icon({
|
var redMarker = L.AwesomeMarkers.icon({
|
||||||
icon: \'server\',
|
icon: \'server\',
|
||||||
|
Reference in New Issue
Block a user