mirror of https://github.com/aredn/aredn.git
Hide long time idle neighbors (#1082)
* Dont show neighbor we can't resolve or route to * Hide neighbor which have been non-routable for over an hour
This commit is contained in:
parent
434cfdf50a
commit
f3d49eab64
|
@ -490,6 +490,7 @@ function lqm()
|
||||||
device = station.device,
|
device = station.device,
|
||||||
firstseen = now,
|
firstseen = now,
|
||||||
lastseen = now,
|
lastseen = now,
|
||||||
|
lastrouted = now,
|
||||||
pending = now + pending_timeout,
|
pending = now + pending_timeout,
|
||||||
refresh = 0,
|
refresh = 0,
|
||||||
mac = station.mac,
|
mac = station.mac,
|
||||||
|
@ -689,6 +690,7 @@ function lqm()
|
||||||
local rt = track.ip and ip.route(track.ip) or nil
|
local rt = track.ip and ip.route(track.ip) or nil
|
||||||
if rt and tostring(rt.gw) == track.ip then
|
if rt and tostring(rt.gw) == track.ip then
|
||||||
track.routable = true
|
track.routable = true
|
||||||
|
track.lastrouted = now
|
||||||
else
|
else
|
||||||
track.routable = false
|
track.routable = false
|
||||||
end
|
end
|
||||||
|
|
|
@ -220,7 +220,9 @@ html.print([[<hr>
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
links += `<div><span class="m">${name(track)}</span><span class="s">${track.type}</span><span class="s">${get_snr(track)}</span><span class="p">${distance}</span><span class="s">${quality}</span><span class="i">${status}</span></div>`;
|
if (track.lastrouted + 3600 > data.info.now && (status !== "idle" || track.hostname)) {
|
||||||
|
links += `<div><span class="m">${name(track)}</span><span class="s">${track.type}</span><span class="s">${get_snr(track)}</span><span class="p">${distance}</span><span class="s">${quality}</span><span class="i">${status}</span></div>`;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (links.length) {
|
if (links.length) {
|
||||||
document.getElementById("links").innerHTML = links;
|
document.getElementById("links").innerHTML = links;
|
||||||
|
|
Loading…
Reference in New Issue