diff --git a/webroot/css/_map.less b/webroot/css/_map.less index 7478d87..9b50118 100644 --- a/webroot/css/_map.less +++ b/webroot/css/_map.less @@ -5,8 +5,11 @@ border: 2px solid white; border-radius: 10px; } +.leaflet-container .node.warn { + background-color: rgba(255, 165, 0, 0.7); +} .leaflet-container .node.offline { - background-color: rgba(255,0,0,0.5); + background-color: rgba(255,0,0,0.7); } .leaflet-container .node.client24 { border-left: 3px solid green; diff --git a/webroot/js/store.js b/webroot/js/store.js index 5c384a2..399c1f8 100644 --- a/webroot/js/store.js +++ b/webroot/js/store.js @@ -1,7 +1,7 @@ import config from './config'; const list = {}, - storeMaxPing = 5, + storeMaxPing = 5; // Returns the node with specified id (or null if node doesn't exist). export function getNode (nodeid) { diff --git a/webroot/js/view/map.js b/webroot/js/view/map.js index 80ae367..8af6ad5 100644 --- a/webroot/js/view/map.js +++ b/webroot/js/view/map.js @@ -104,7 +104,11 @@ export class MapView extends View { startdate.setMinutes(startdate.getMinutes() - config.node.offline); if (new Date(node.lastseen) < startdate) { - className += ' offline'; + if (node.pingstate.some((x)=>x)) { + className += ' warn'; + }else{ + className += ' offline'; + } }