Commit Graph

88 Commits

Author SHA1 Message Date
Adrian Schmutzler 0d320259e9 map: Remove V1 hood layer
This removes the layer which used to show the hood borders, not
the one with the V1 routers.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-05-11 23:51:59 +02:00
Adrian Schmutzler c5291413f1 map: Add Polyhood support
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>
2019-05-11 23:50:15 +02:00
Adrian Schmutzler 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
Adrian Schmutzler 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
Adrian Schmutzler 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
Adrian Schmutzler 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
Adrian Schmutzler 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
Adrian Schmutzler 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
Adrian Schmutzler 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
Adrian Schmutzler 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
Adrian Schmutzler 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
Dominik Heidler 22df21dc7e router.html: Improve readability of selected mesh network devs
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
2018-07-03 14:10:15 +02:00
Adrian Schmutzler 166cad518a map/router.html: Indicate ethernet mesh connections by color
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 13:49:41 +02:00
Adrian Schmutzler aa99035e23 statistics.html: Show aggregated traffic for hoods and total
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>
2018-07-03 13:45:40 +02:00
Adrian Schmutzler b6b1b801fe router.html: Label historic neighbors in plot with "(old)"
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:21:42 +02:00
Adrian Schmutzler 6a85c59ce6 router.html: Display name for all neighbors (including "historic")
This change the behavior concerning the displayed netif name in
the legend of the neighbor stats plot. Previously, the netif name
of the device was shown, now we show the netif name corresponding
to the neighbor. This is necessary, as we do not log netif names
for neighbors.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:21:32 +02:00
Adrian Schmutzler 54764f7f43 router.html: Show former neighbors in neighbor stats plot
If a router is currently not connected as neighbor, we don't see
its history. This patch shows all current and former neighbors.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:18:22 +02:00
Adrian Schmutzler 2fcd8af88e router.html: Only load netif data when clicked
The data for each netif is only loaded when the respective row
is clicked.
Correspondingly, br-mesh is loaded initially.

So far, it is unclear how big the impact of the netif filter in
MySQL transactions is, as those have no key of their own.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:10:53 +02:00
Adrian Schmutzler ab89b6a144 router.html: Don't load full neighbor stats, but only on demand
With this patch, only the neighbor stats for the last day are
loaded by default. If you want more, a hyperlink is implemented
for this purpose.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:07:20 +02:00
Adrian Schmutzler b9aab43459 router_list.html: Show last contact
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-22 16:53:03 +01:00
Adrian Schmutzler c208663f70 router.html/map: Treat quality differently based on routing protocol
Adds display support for BATMAN_V data.

This is step 1 of 2. It does change the background colors for
neighbors, but does NOT change the link colors in the map.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-22 16:45:40 +01:00
Adrian Schmutzler 84eb048904 router.html: Log blocked status changes to router events
Like normal router events, the block/unblock events are deleted
if they become old enough.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-22 16:44:17 +01:00
Adrian Schmutzler 3742f5415d router.html: Add explanation and color highlighting for netifs
Label netifs AFTER json if clause

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-22 16:42:31 +01:00
Adrian Schmutzler 7091cc5054 Don't show "Blocked" status for V2 routers
This affects only whether the status indication is SHOWN. It does
not affect the storage of this tag.

One can still en- or disable the blocked status of a V2 router via
the options menu.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-22 16:24:10 +01:00
Adrian Schmutzler b43be1bfcc user.html: Log off user after he deleted himself
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-02 13:02:27 +01:00
Adrian Schmutzler 4dab09748c Introduce option to set routers as blocked by KeyXchange
This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-02 12:59:05 +01:00
Adrian Schmutzler 94b9d92b8a statistics.html: Check for GW and hood when using selector
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-02 12:56:41 +01:00
Adrian Schmutzler d8e9add933 statistics.html: Show number of gateways in hood table
The number counts all GWs with 2 or more online routers.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-02 12:54:23 +01:00
Adrian Schmutzler 662bec1a16 Change GWinfo to store vpnmac instead of vpnif
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>
2018-02-02 01:09:49 +01:00
Adrian Schmutzler 9da232ac50 router.html: Fix code flow to provide JSON without reading stats
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-02 01:02:22 +01:00
Adrian Schmutzler c71849efe4 router.html: /mac/<routermac> now supports GET parameters
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-02 01:01:03 +01:00
Adrian Schmutzler a9912dccd2 statistics.html: Show details about selected gateway
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-01-15 12:30:09 +01:00
Adrian Schmutzler 669895cd7b router.html/statistics.html: Display gateway/batX where available
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-01-15 12:30:08 +01:00
Adrian Schmutzler 1d64dc3e25 statistics.html: Add logging of 500 errors
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-01-15 12:30:08 +01:00
Adrian Schmutzler ceddd7f636 Add gateway-specific statistics
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>
2018-01-15 12:29:55 +01:00
Adrian Schmutzler 34a7c4c58e statistics.html: Add gateway overview
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-01-15 12:27:15 +01:00
Adrian Schmutzler 0af1c76254 statistics.html: Consolidate code
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-01-15 00:21:11 +01:00
Adrian Schmutzler f12a3f5a3e api/alfred and router.html: Collect and show gateway information
This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-01-15 00:10:29 +01:00
Adrian Schmutzler 55dc7b4ad5 Rename net_if from router_neighbor table to netif
This includes various changes throughout the code. Additionally,
some fields are reordered.

This requires a change of the MySQL table router_neighbor!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-30 18:21:08 +01:00
Adrian Schmutzler 58ce32e322 Change router_stats_netif to use ids for netifs
This introduces a serious of changes to code and database.

This patch requires changes to the MySQL database.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-30 17:18:22 +01:00
Adrian Schmutzler b5a33f6e70 resetpw: Fix variable name and tidy up
Fixes HTTP 500 error.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:06:53 +01:00
Adrian Schmutzler 6a6a2806f6 logout: Remove admin from session
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:03:27 +01:00
Adrian Schmutzler 4f1bda0e83 user_info: Rearrange POST block
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:03:27 +01:00
Adrian Schmutzler 63316c7046 user.html: Users should have the right to delete their own account
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:03:27 +01:00
Adrian Schmutzler cf3d3eb790 user.html: Only show authorized options in pulldown
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:03:27 +01:00
Adrian Schmutzler 4d3736b7aa user_info: Fix data reload from DB after changes
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:03:27 +01:00
Adrian Schmutzler cea5c191a6 user.html: Display abuse properties and add ability to change it
Every user having abuse enabled will receive e-mails if routers
are reported.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:03:27 +01:00
Adrian Schmutzler 85a6c49574 register: Block registration with empty fields
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:03:27 +01:00
Adrian Schmutzler 559ced0520 router.html: Only show authorized options in pulldown
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:03:27 +01:00
Adrian Schmutzler 4389f4f11a router_info: Remove redundant user evaluation
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:03:27 +01:00