This actually implements polyhood support for the MAP.
This is not connected to the earlier commit which provides
database support for polyhoods. This patch will work
independent of the earlier one.
Although the KeyXchange does not provide polyhood data so far,
the Monitoring's implementation can already be put in place and
will take up the data as soon as it's there.
Note that since we only provide an additional layer for the
map, the overall footprint of this change is relatively small.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Polyhoods need to be read manually. Running
scripts/readpolyhoods.py will erase both tables and reread data.
At the moment, the URL points to a test setup.
This requires changes to the MySQL database!
This is meant for later use and does NOT add any data to the
Monitoring at the moment.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
To get rid of V2 <-> V1 hood changes, an empty hood element is
treated as V2, while a missing one is treated as V1.
This requires a firmware update to work.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
All V1 hoods are assigned to IDs 10xxx in the hoods table.
Since no new hoods are added, they are contained in this range.
In addition, the hoods table is forever, so deleted V1 hoods
stay there. This makes the hoodid a perfect WHERE criterion for
the v2routers page, so it does not have to be updated for every
deleted hood.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This also indicates missing coordinates without a previous reset.
The router detail page shows different messages for both cases
(missing coords and reset). The lists show the "Reset!"
warning in both cases (previously only for real reset).
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Selection of deleted hoods for V1 is a dirty walkaround and
needs to be adjusted for every new deleted hood. Since this is
an undocumented page, this is okay ...
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This will reduce size of stats_hood and, more importantly,
make hood assignment independent of hood name changes:
Previouly: Name change = changing string in every place
Now: Name change = change of one table entry
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This detects local routers based on knowing their hood, but not
having the hood listed in hoodsv2 table.
This classification is performed when the routers' alfred data
is parsed. Thus, offline routers won't change.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This obsoletes the hood initialization file.
Hood are capitalized and "V1" is added at the end.
This may require a rename of the existing hood stats.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This is done for tables router_ipv6 and router_netif.
This is not done for table gw_netif (contains subnet masks).
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Previously, hood names were reformatted to have only the first
letter capitalized. Now, we just take the names as they are.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>