show ping status in map by node color
This commit is contained in:
parent
0db00ad76e
commit
83319163d7
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -104,8 +104,12 @@ export class MapView extends View {
|
|||
|
||||
startdate.setMinutes(startdate.getMinutes() - config.node.offline);
|
||||
if (new Date(node.lastseen) < startdate) {
|
||||
if (node.pingstate.some((x)=>x)) {
|
||||
className += ' warn';
|
||||
}else{
|
||||
className += ' offline';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (node.statistics_respondd && node.statistics_respondd.clients) {
|
||||
|
|
Loading…
Reference in New Issue