Commit Graph

762 Commits

Author SHA1 Message Date
Adrian Schmutzler 82aa45ba70 user_list: Fix not counting router for mixed-case mail adresses
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-08-13 16:05:12 +02:00
Adrian Schmutzler ffbdfdf5ac uwsgi: Suppress logging every request
Errors (Status 4xx/5xx) will still be logged.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-11 11:26:37 +02:00
Adrian Schmutzler 5c4d6577ea map: Indicate WAN uplink also for selected (blue) dots
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-11 11:24:39 +02:00
Adrian Schmutzler c36b16a675 map: Indicate WAN uplink with white center in dots
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:54:08 +02:00
Adrian Schmutzler f85f57813e Realign with master
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:06:53 +02:00
Adrian Schmutzler 3e32ce740e Changelog: Update
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:00:19 +02:00
Adrian Schmutzler 3ae997a8a5 config.py: Use dedicated folder for log files
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:00:11 +02:00
Adrian Schmutzler da7ee2f70a config.py: Wait 15 minutes before offline status
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 13:20:51 +02:00
Adrian Schmutzler 2a4dfd9303 config.py: Adjust gw stats collection (only 1 day)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 13:19:54 +02:00
Adrian Schmutzler 9a7c4a1eb6 config.py: Adjust netif stats collection (14 days every 5 min)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 13:18:41 +02:00
Adrian Schmutzler 27c1c1a36a scripts: Redirect cron output to log only
This prevents information sent via e-mail.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 13:14:20 +02:00
Adrian Schmutzler 617dcd1190 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-06-20 13:43:41 +02:00
Adrian Schmutzler 6d73f7facd stattools: Return all hoods as keys in router_traffic_hood
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-06-19 23:04:10 +02:00
Adrian Schmutzler b6ad63f7fa api/alfred: Support Babel neighbor IP address inside tag
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-06-18 12:10:32 +02:00
Adrian Schmutzler dd575951de api/alfred: Support loadavg5
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-06-18 11:58:05 +02:00
Dominik Heidler 0ddf994dc5 Improve readability of selected mesh network devs 2018-06-13 11:41:51 +02:00
Adrian Schmutzler d5f9c7f3b8 api/alfred: Improve retrieval of L3 mac address from IPv6
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-05-10 18:27:28 +02:00
Adrian Schmutzler a3d81e7114 map/router.html: Show neighbor links in black
This improves contrast to the background

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-05-10 18:06:01 +02:00
Adrian Schmutzler b3a21b62b3 map/router.html: Change color of ethernet connections to dark green
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-05-10 18:04:39 +02:00
Adrian Schmutzler d562a6d9f1 maptools: Always use "best" connection for link color
This is much easier to maintain and prevents from having a
wrong average if e.g. w2mesh and w5mesh are present, but only
the better one is used.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-30 13:38:46 +02:00
Adrian Schmutzler 9644e5e94e map/router.html: Fix highlighting of Layer3 connections
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-30 13:18:55 +02:00
Adrian Schmutzler 71f1177978 statistics.html: Fix number of newest routers
This is a late adjustment to the introduction of the traffic plot.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-29 15:43:25 +02:00
Adrian Schmutzler ec815c4cef map/router.html: Indicate ethernet mesh connections by color
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-29 15:33:31 +02:00
Adrian Schmutzler 00aa6b2cbc maptools: Treat case of multiple neighbor interfaces correctly
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-29 15:32:23 +02:00
Adrian Schmutzler c1f7c7b397 statistics.html: Treat gateway traffic differently for traffic plot
This patch distinguishes between routers and gateways:

- For routers, we still use the bat0 data
- For gateways, we aggregate eth0.1, eth1.1, w2ap and w5ap

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-27 16:07:28 +02:00
Adrian Schmutzler da4ceefeed router.html: Display Gateway
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-27 15:19:56 +02:00
Adrian Schmutzler 86ce24fdff api/alfred: Introduce gateway field
This introduced a boolean gateway field, which is set based on
the gateway connections sent via alfred.

If a device provides no gateways which it is connected to, it is
assumed to respresent a gateway.

This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-27 15:10:45 +02:00
Adrian Schmutzler 49f40be9ce statistics.html: Use legend of traffic plot for explanation
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-18 18:43:57 +02:00
Adrian Schmutzler 6c0f198d2a statistics.html: Explain tx/rx in traffic plot
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-18 18:32:44 +02:00
Adrian Schmutzler 1c04b159ca init_db: Add missing gw tables
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-18 16:18:22 +02:00
Adrian Schmutzler f9aca45d6e 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.

To be done (not addressed in this patch):
- Readjust number of new routers to match height of left and right
  column

This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-18 12:56:53 +02:00
Adrian Schmutzler 490b691e8d Realign with master
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:42:13 +02:00
Adrian Schmutzler 0ae384687e Changelog: Update
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 12:39:18 +02:00
Adrian Schmutzler 3558603d58 Revert "config.py: Adjustments for 8 GiB RAM"
This reverts commit 5249b5e24f.
2018-04-16 12:25:45 +02:00
Adrian Schmutzler 3978c88026 router.html: Fix display of "Loading" during load of neighbor stats
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-13 13:32:03 +02:00
Adrian Schmutzler 7db9e8ad13 router.html: Three columns for legend in neighbor plot
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-13 13:28:47 +02:00
Adrian Schmutzler d8e890c7b7 router.html: Label historic neighbors in plot with "(old)"
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-13 13:14:29 +02:00
Adrian Schmutzler ec5de0bf4d 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-13 12:57:45 +02:00
Adrian Schmutzler 365318812c router.html: Move neighbor stats rearrangement to server code
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-13 11:33:42 +02:00
Adrian Schmutzler cb0dd3f5ee router.html: Fix assignment of neighbor names
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-12 22:30:55 +02:00
Adrian Schmutzler e139bb0b54 scripts: Add scripts to defragment MySQL tables
scripts/defragtables.py:
- If run without argument, all tables EXCEPT stats are defragmented
  (quick run)
- If run with argument e.g. "1", all table INCLUDING stats are
  defragmented (will take about one hour)

scripts/defragtable.py <space-separated list of tables>:
- Defragments the specified tables; will crash if table does not
  exist

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-12 22:13:06 +02:00
Adrian Schmutzler 9c16f13982 routertools: Also delete from router_gw and router_stats_gw
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-12 20:56:59 +02:00
Adrian Schmutzler 05ad437f91 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-12 20:49:31 +02:00
Adrian Schmutzler d467db229c graph.js: Move reset button to the bottom left
This prevents overlay with large legends.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-12 20:06:14 +02:00
Adrian Schmutzler f56efad565 statistics.html: Show "models per client" pie chart
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-12 18:48:48 +02:00
Adrian Schmutzler d3e9759ea7 map: Add extra layer for position popup
By default, position popup is off again until you select the layer:
With the layer enabled, behavior is as before.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-10 09:41:27 +02:00
Adrian Schmutzler 3553666919 router.html: Indicate when full neighbor stats are loading
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-06 18:56:22 +02:00
Adrian Schmutzler b5f6c538a2 Revert "router.html: Include simple debugging of step durations"
This reverts commit c77efa2502.
2018-04-06 18:07:46 +02:00
Adrian Schmutzler 4933c7931d 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-06 17:25:59 +02:00
Adrian Schmutzler 62f3b1bb45 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-06 17:20:18 +02:00