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 patch aims at showing the client-caused traffic. We use
bat0 for this, at this seems to be the easiest way which does not
require router-specific ifs etc.
This patch distinguishes between routers and gateways:
- For routers, we just use the bat0 data
- For gateways, we aggregate eth0.1, eth1.1, w2ap and w5ap
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
If a router sends his hood, it is considered to be V2.
V2 hoods are highlighted on the statistics page.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This is required to uniquely find the relation between VPN and
bat after change of MAC adresses.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Gateways are listed alphabetically based on their name, then all
without name based on their MAC address.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This replaces UPDATE IF SELECT ELSE INSERT by ON DUPLICATE KEY
UPDATE. In addition, queries have been consolidated by ordering
data in advance and then using executemany.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This adds gateway stats which work similar to the detailed hood
statistics.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
After 7 days of being offline, a router enters the orphaned
state with a grey icon. It is only deleted after a longer period
of 180 days.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
If the default is NULL (as previously), we have ugly problems
with indexing and queries. To circumvent this, the hood is
set to "Default" right at the beginning.
For old data, we add an if to the hood stats calculation.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>