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 ec5de0bf4d
commit d8e890c7b7

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