router.html: Label historic neighbors in plot with "(old)"

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2018-04-13 13:14:29 +02:00
parent 6a85c59ce6
commit b6b1b801fe
1 changed files with 5 additions and 1 deletions

View File

@ -260,7 +260,11 @@ def router_info(dbid):
if label == ni2["hostname"] and ni["mac"] != ni2["mac"]:
# This shows the NEIGHBOR'S interface name
label += "@" + ni["netif"]
neighlabel[ni["mac"]] = label
append = " (old)"
for nnn in router["neighbours"]:
if nnn["mac"] == ni["mac"]:
append = ""
neighlabel[ni["mac"]] = label + append
gwfetch = mysql.fetchall("""
SELECT quality, mac, time FROM router_stats_gw WHERE router = %s