From 011713badfeb7889b6390696d96b40f4d535c992 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sun, 31 Mar 2024 18:53:11 +1300 Subject: [PATCH] we don't want red on the map --- src/public/index.html | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/public/index.html b/src/public/index.html index 1674d16..916f594 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -43,12 +43,6 @@ } .icon-offline { - background-color: #dc2626; - border-radius: 25px; - border: 1px solid white; - } - - .icon-unknown { background-color: #2563eb; border-radius: 25px; border: 1px solid white; @@ -1651,11 +1645,6 @@ iconSize: [16, 16], // increase from 12px to 16px to make hover easier }); - var iconUnknown = L.divIcon({ - className: 'icon-unknown', - iconSize: [16, 16], // increase from 12px to 16px to make hover easier - }); - // create legend var legendLayerGroup = new L.LayerGroup(); var legend = L.control({position: 'bottomleft'}); @@ -1665,8 +1654,7 @@ div.style.padding = '12px'; div.innerHTML = `
MQTT Connection
` + `
Connected
` - + `
Disconnected
` - + `
Not Seen Yet
`; + + `
Disconnected
`; return div; }; @@ -1970,11 +1958,9 @@ } // icon based on mqtt connection state - var icon = iconUnknown; + var icon = iconOffline; if(node.mqtt_connection_state === "online"){ icon = iconOnline; - } else if(node.mqtt_connection_state === "offline"){ - icon = iconOffline; } // create node marker @@ -2227,9 +2213,9 @@ if(node.mqtt_connection_state === "online"){ mqttStatus = `Online ${mqttStatusLastUpdated}`; } else if(node.mqtt_connection_state === "offline"){ - mqttStatus = `Offline ${mqttStatusLastUpdated}`; + mqttStatus = `Offline ${mqttStatusLastUpdated}`; } else { - mqttStatus = `Not Seen Yet`; + mqttStatus = `Offline`; } var tooltip = `` +