map: display node as "offline" only if both ping and respondd replies are missing
If node is reachable both by ping and respondd, node is now displayed as up. If one of ping or respondd is down, node is displayed in "warning" state.
This commit is contained in:
parent
f3bb60dd38
commit
cdd003bd4c
|
@ -103,8 +103,14 @@ export class MapView extends View {
|
||||||
tx5 = node.wireless.txpower5 || '-';
|
tx5 = node.wireless.txpower5 || '-';
|
||||||
|
|
||||||
startdate.setMinutes(startdate.getMinutes() - config.node.offline);
|
startdate.setMinutes(startdate.getMinutes() - config.node.offline);
|
||||||
if (new Date(node.lastseen) < startdate) {
|
const reachableByRespondd = (new Date(node.lastseen) >= startdate);
|
||||||
if (node.pingstate.some((x)=>x)) {
|
const reachableByPing = (node.pingstate.some((x)=>x));
|
||||||
|
if (reachableByPing) {
|
||||||
|
if (!reachableByRespondd) {
|
||||||
|
className += ' warn';
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (reachableByRespondd) {
|
||||||
className += ' warn';
|
className += ' warn';
|
||||||
}else{
|
}else{
|
||||||
className += ' offline';
|
className += ' offline';
|
||||||
|
|
Loading…
Reference in New Issue