Commit Graph

32 Commits

Author SHA1 Message Date
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 ec66c05361 api/nodelist: Fix condition for coordinates
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-30 17:15:54 +01:00
Adrian Schmutzler 71bb5a3a68 map: Show router popup only for selected layer
If KeyXchange v1 routers are not shown, their popup windows are
now also disabled (as the user would expect); same for v2.

Fixes #95.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-30 17:12:12 +01:00
Adrian Schmutzler 20e71afeb0 Provide possibility to ban routers
If routers are supposed to be removed from the Monitoring
permanently, they can now be banned based on their MAC address.

All admins can do that via the web interface.

ATTENTION: This requires a database update!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 17:03:27 +01:00
Adrian Schmutzler 818dc79b7d api/alfred: Remove old comments
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 16:44:07 +01:00
Adrian Schmutzler ae3b065f63 api/alfred: Fix alignment of mysql.close()
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-21 16:43:52 +01:00
Adrian Schmutzler 41ef7f281a api.py/application.py: Write extended information to full log
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-10 20:25:16 +01:00
Adrian Schmutzler 4fa16a738a api/alfred: Get IP address of alfred senders
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-10 19:41:59 +01:00
Adrian Schmutzler d0d173d935 Introduce debugging function
This adds a timestamp to all debug outputs

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-23 22:02:27 +01:00
Adrian Schmutzler 58b6bc34f9 helpers/api: Fix MAC search
This fixes searching for MAC addresses in the router list and
via api/get_router_by_mac/

Additionally, regex is enabled for MAC addresses.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-19 15:41:19 +01:00
Adrian Schmutzler b2541fe40e api/alfred: Write time and duration of alfred calls to file
Attention: This contains a hardcoded path!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-19 15:40:08 +01:00
Adrian Schmutzler af545d8194 config: Introduce path for debug output
Includes update of file names for debug files.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-19 15:36:43 +01:00
Adrian Schmutzler 3fd731a5a2 Introduced orphaned state between offline and deletion
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>
2017-11-16 20:41:38 +01:00
Adrian Schmutzler 6f61cc6fdc Optimize MySQL commit for /api/alfred plus some debugging
Signed-off-by: Adrian Schmutzler <adsc@monitoring.freifunk-franken.de>
2017-11-16 20:40:45 +01:00
Adrian Schmutzler 8dc3633246 Fix missing timezone awareness of immutable data types
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-16 15:05:24 +01:00
Adrian Schmutzler a65873c2ee Global stats put into separate scripts and run by cron
Most of the processes is executed every five minutes, but
deleting can be done only once per day ...

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-16 15:00:12 +01:00
Adrian Schmutzler 412203a946 api: Add wifianalall (all hoods)
Puts reused code into a helper function

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-16 00:01:01 +01:00
Adrian Schmutzler 87093a9066 Add hood-specific statistics
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-16 00:00:48 +01:00
Adrian Schmutzler e3fe995407 MySQL: alpha3
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-16 00:00:07 +01:00
Dominik Heidler f8c5913ad1 Commit unstaged changes from production instance 2017-08-21 11:49:26 +02:00
Adrian Schmutzler b013533dfe Add API script to output JSON list of routers with MAC address
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-08-18 14:38:57 +02:00
Dominik Heidler 8f7a55042a Fix code style 2017-08-18 14:24:20 +02:00
Adrian Schmutzler 5f65d38908 Add WifiAnalyzer alias file output
Syntax: /api/wifianal/<hood>

This returns raw text.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-08-18 13:20:47 +02:00
Adrian Schmutzler 2a3cd94619 Harmonize tab style in api.py
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-08-17 23:36:06 +02:00
Steffen Pankratz 0ef01992ed Added nodelist API endpoint.
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
2016-05-03 22:24:34 +02:00
Dominik Heidler af2a80f5ee Delete routers with last_contact > 100 days ago 2016-03-10 13:55:15 +01:00
Dominik Heidler 4cddcbfec3 Fix MAC Address redirect 2016-02-06 11:42:11 +01:00
Dominik Heidler 4984d614e7 Implement /get_router_by_mac/<mac>
- To allow hotlink from router webui
- Will redirect to router page when there is
  exactly one router with this mac
- Otherwise redirect to router list with mac
  set as filter
2016-01-25 16:49:14 +01:00
Dominik Heidler 6c385b3408 add statistics page 2015-11-11 15:27:50 +01:00
Dominik Heidler 8dc6760ccc add network statistics 2015-11-03 16:03:14 +01:00
Dominik Heidler 934d2851e5 add alfred support and dynamic map creation 2015-10-10 17:42:44 +02:00