Commit Graph

459 Commits

Author SHA1 Message Date
4c52271897 api/alfred: Treat empty hood element as V2
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>
2019-05-11 23:49:50 +02:00
2ee6da55e9 v2routers: Use hoodid to identify V1 hoods
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>
2019-05-11 23:49:45 +02:00
1f1d04abc8 map: Adjust default position
Adjust map initial position and zoom to cover whole Freifunk
Franken area.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-05-11 23:49:37 +02:00
103a404eea api/alfred2: Introduce alfred mode WITHOUT fetch_id
Read alfred data without surrounding {"64":"<data>"},
so just <data> can be sent.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-05-11 23:49:31 +02:00
dc9b71ae01 router/router_list/user.html: Indicate missing coordinates
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>
2019-05-11 23:49:26 +02:00
24e934b66c map: Include layer selection in URL
This provides a permalink which includes the map settings.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-05-11 23:49:20 +02:00
f26f01f73c statistics.html/gws.html: Show gwinfo version of gateways
This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-05-11 23:49:14 +02:00
0bdb90d020 gwinfo: Actually use rewritten stats_page variable
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-05-11 23:49:09 +02:00
d651af1aae router_list.html: Highlight missing contact addresses
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-05-11 23:49:03 +02:00
3fe6ba79cb Changelog: Update
In addition: Search/replace for all auml/ouml/uuml.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 14:14:10 +01:00
95a67bf0a4 db/*: Add quotes for all tables and fields
This is a cosmetic change only meant to harmonize style.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 14:14:10 +01:00
c6fdf34a0a MySQL: Increase size of field gw_class
Former field seemed to cut certain values.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 14:14:10 +01:00
c218072ac1 filters.py: Catch ValueError in case of malformatted IP address
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 14:14:10 +01:00
c23561a8f8 user_list.html: Show V2 router percentage as column
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 14:14:10 +01:00
0f82f43385 router_list.html: Add filter for V1/V2/Local
Usage: network:<local|v2|v1>

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 14:13:50 +01:00
f99f05fb71 hoodstatistics: Make possible to show stats for deleted hood
At the moment, this requires the user to know the internal
hood ID.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:15:21 +01:00
339122bc0c api: Merge code for different node lists
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
e495b200eb config: Increase orphan threshold to 10 days
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
c657f1544f user.html: Make uptime sortable (as in router_list.html)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
5c4360b944 router_list.html/user.html: Make status column sortable
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
bdff2b74b0 statistics.html: Add option to hide hoods by type (V1/V2/local)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
7d2488bcc5 v2routers: Added page for V1/V2 comparison
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>
2018-11-23 13:14:51 +01:00
4c2b4f1628 gateways: Add new page with gateway data (IPs, DHCP ranges)
Shows all interfaces without checking vpnif.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
7e34a20451 gwinfo: Delete IP addresses for old netif entries
This ensures that only the latest addresses are shown on the
gateway overview page.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
3ee01379dd router.html: Fix display of WebUI and remove try/catch
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
f14e9a51be statistics.html: Fix order in hoods table
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
80d6a421e5 router.html: Show hood version next to hood name
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:50 +01:00
0bf2312fe4 Global: Put hoods into table and use smallint for reference
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>
2018-11-23 13:14:50 +01:00
dd6d101ccd Global: Identify local routers and indicate their status
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>
2018-11-23 13:14:50 +01:00
b38af9a74b Global: Read V1 hoods from KeyXchange
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>
2018-11-23 13:14:50 +01:00
77bd43c73a Global: Add V2 hoods to table
This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:50 +01:00
74ba799912 alfred/gwinfo: Provide specific error message if JSON non-parsable
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:50 +01:00
c1c728f2a3 Global: Convert IPv4/IPv6 from char to numbers/binary
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>
2018-11-23 13:14:50 +01:00
bc3460f2e0 Global: Change MAC address storage to use BIGINT
This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:41 +01:00
ea7f0ed199 map: Show hood borders in different colors
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:41:46 +01:00
9ea489da74 map: Fix capitalization of hood names
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>
2018-11-22 18:41:09 +01:00
e7d68398e2 statistics.html: Remove trailing whitespace
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:40:20 +01:00
478c0fb8dd gwinfo: Support internal IPv4/IPv6 and DHCP ranges (v1.4)
This updates gwinfo script AND evaluation code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:37:30 +01:00
24c64f5605 graph.js: Enable additional parameters for plots
This makes the applications of the affected plots more versatile
and thus reduces the need for duplicate code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:33:58 +01:00
49cb6673d7 router.html: Rephrase option to report router
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:32:28 +01:00
ef3b4d78fa config.py: Decreased netif stats to 10 days
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:31:57 +01:00
05fda04ccd user_list: Fix not counting router for mixed-case mail adresses
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:31:44 +01:00
d3c8a7a64d uwsgi: Suppress logging every request
Errors (Status 4xx/5xx) will still be logged.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:30:58 +01:00
4bfe42bb67 map: Indicate WAN uplink with white center in dots
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:30:22 +01:00
79bada38bb Changelog: Update
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:11:07 +02:00
d779b10778 config.py: Use dedicated folder for log files
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:16 +02:00
e46380eb50 config.py: Wait 15 minutes before offline status
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:16 +02:00
c7ebe21caa config.py: Adjust gw stats collection (only 1 day)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:16 +02:00
7a03e43c3b config.py: Adjust netif stats collection (14 days every 5 min)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:16 +02:00
cf3517d9d2 api/alfred: Fix check for existing router and delete fragments
The router id "router_id" is only evaluated based on the
router_netif table. If the corresponding entry in the router
table is missing, an error occurs.

To deal with that, we now use the "olddata" variable for ifs,
which is initialized based on the router table. If nothing is
found there, we trigger delete_router to get rid of fragments
in other tables.

The latter is necessary, as we identify routers by MAC addresses
and thus old entries will keep to be a problem if just a new
entry is added to router_netif.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:15 +02:00