Commit Graph

51 Commits

Author SHA1 Message Date
Martin/Geno 58d843ae7e
fix some issues on connect 2018-08-03 09:13:22 +02:00
Martin/Geno 21c398ca42
sql rewrite 2018-08-03 09:13:12 +02:00
Oliver Gerlich 444d80f77e map: save list of enabled layers in localStorage 2018-07-22 21:56:00 +02:00
Oliver Gerlich f02b047f9a map: fix exception when enabling Clients layers
The layer data array must not contain "null" entries.
2018-07-22 21:47:26 +02:00
Oliver Gerlich 668ba59b8d node page: ask for confirmation before resetting node location 2018-07-22 21:47:20 +02:00
Oliver Gerlich bd7b9c10aa node page: add "Reset Location" button, to unset node location
This can be helpful if the node was placed far away (eg. due to IP-based
geolocation).
2018-07-22 21:47:11 +02:00
Oliver Gerlich d95b41315c node page: don't display "undefined" if node has never been saved yet 2018-07-22 21:46:43 +02:00
Oliver Gerlich 2cc533c481 node page: display map correctly also if node doesn't have location info 2018-07-22 21:46:29 +02:00
Oliver Gerlich d7e98625e2 node: don't show "Start follow position" button at all if browser does not support navigator.geolocation 2018-07-22 21:46:22 +02:00
Oliver Gerlich 3a18da51c8 menu: remove logo
It doesn't provide any functionality, and it uses up valuable screen space
on a phone screen.
2018-07-22 21:45:41 +02:00
Oliver Gerlich bd7cef3f00 socket: don't notify user on every failed connection attempt
Only notify user if the websocket connection was already established and is
now closed.
2018-07-22 21:45:36 +02:00
Oliver Gerlich 2fca4b49fe fix exception in list.renderView() introduced by adding debouncer.run()
Use arrow function to keep "this" at the same value it has in render().
2018-07-19 22:48:40 +02:00
Oliver Gerlich e77e94ef85 list perf: limit list to 20 nodes by default
Also add links to bottom of list to select how many nodes shall be
displayed, and store the selection in localStorage.

The shorter list has much better performance. A long list is not really
useful anyway; rather let the user filter/sort it to display interesting
nodes only.
2018-07-19 02:00:39 +02:00
Oliver Gerlich 885b3232c3 move debouncing logic to separate Debouncer class, and use it for list view
While the normal GUI is re-rendered at most every 100 msec, the list is
re-rendered at most every second (since it is very expensive to render).
2018-07-19 01:51:21 +02:00
Oliver Gerlich 67dd56d71d call render() again after render bouncer timer has elapsed
This is necessary so that the GUI really shows the latest data from server
after the timer has elapsed.

Also add some other minor fixes.
2018-07-19 01:51:21 +02:00
Martin/Geno ba1045aacd render bouncer 2018-07-19 01:51:21 +02:00
Martin/Geno af80ade82b
Disable notification of successful node update 2018-07-17 23:37:03 +02:00
Oliver Gerlich b97ac6ea43 node page: display GPS coordinates next to toggle button 2018-07-17 22:51:41 +02:00
Oliver Gerlich fb0f2f054d node page: some fixes for GPS-following
- rename storePosition to gpsPosition
- don't check for btnGPS.innerHTML contents (this is fragile); check for
  this.gpsPosition instead
- fix call to updatePosition() when clicking "Stop following"
2018-07-17 22:51:41 +02:00
Oliver Gerlich ad7cc8d0aa node page: fix bug if navigator.geolocation.watchPosition() returns 0 as id 2018-07-17 22:51:41 +02:00
Oliver Gerlich 7f498b4a6e node page: set node details (hostname/owner etc.) also if location is unknown 2018-07-17 22:51:41 +02:00
Oliver Gerlich b3b8d1f53f menu: rename "Statistics" to "Stats" to save some space on phone screens 2018-07-17 22:36:32 +02:00
Oliver Gerlich 043e7225fd list perf: use documentFragment to add all rows to table in one operation 2018-07-17 22:31:29 +02:00
Oliver Gerlich 66d8951ad9 list perf: use textContent instead of innerHTML 2018-07-17 22:31:29 +02:00
Oliver Gerlich 10a717f558 list: fix exception when typing in list filter fields 2018-07-17 22:31:29 +02:00
Martin/Geno 485ecc13c6
default channel on create node + send callback 2018-07-15 22:47:05 +02:00
Martin/Geno 63f77d87c7
fix statistics channel view 2018-07-15 21:55:31 +02:00
Oliver Gerlich cd511dce8e web: rework store.js and interaction with view/node.js
- store.getNode() no longer adds new node to the list
- instead, store.createNode() can be used to create an empty new node
- view/node.js now now transfer a local copy of the node object it wants to
  modify, rather then modifying the real object from store.list. If the
  change is accepted by server, the server will send the new values for the
  changed object anyway.

Previously, if the user visited the node page for a nonexistent node but
didn't make any changes, the list view would always throw an exception
because an incomplete node object was contained in the list.
2018-07-15 21:51:11 +02:00
Martin/Geno 82270e6fa3
cleanup and migrate to newer libraries (use NEW Javascript env) + add secret 2018-06-30 17:22:20 +02:00
Martin/Geno a86ac56b75
cleanup 2018-06-30 01:58:09 +02:00
Martin Geno 17ccb2c4ff
channel used stats 2017-07-06 14:25:24 +02:00
Martin Geno 1a7989a24e
ssh update on connect + web: define unseen before offline 2017-07-06 08:54:27 +02:00
Martin Geno e02273e0ef
[TASK] autoselect https websocket (wss) 2017-07-01 02:10:56 +02:00
Martin Geno 3b74ddbf6a
[BUGFIX] consoleView 2017-05-30 18:56:52 +02:00
Martin Geno 7aa5896c4f
[TASK] add console to backend 2017-05-30 16:39:14 +02:00
Martin Geno 2e5873a541
[TASK] add consoleView 2017-05-30 15:36:51 +02:00
Martin Geno f3e9b6c0db
[TASK] add functions to listView + allow unlearn nodes 2017-05-30 02:16:46 +02:00
Martin Geno f48aaf3236
[TASK] add hostname to nodeView 2017-05-29 23:39:49 +02:00
Martin Geno 9439c7285a
[TASK] config location for breminale 2017-05-19 21:14:44 +02:00
Martin Geno a4045b50a6
eslint all (with some exludes) 2017-05-16 19:25:09 +02:00
Martin Geno d3fcd7f232
eslint 2017-05-16 16:27:35 +02:00
Martin Geno 2e2142b155
[TASK] add geojson support 2017-05-16 08:38:31 +02:00
Martin Geno e2774c3880
[TASK] add position editing of node 2017-05-16 01:29:16 +02:00
Martin Geno 7a4a6c66e9
add stats + map 2017-05-15 22:41:06 +02:00
Martin Geno b190bd43c4
[TASK] nice list 2017-05-14 09:41:40 +02:00
Martin Geno ac87050fa0
[TASK] add tablesort and routing 2017-05-11 20:30:22 +02:00
Martin Geno 3e1242c5cf
[TASK] frontend improve notify run without gui 2017-05-09 18:05:55 +02:00
Martin Geno 85ba20ba4f
[TASK] switch to own freifunk bremen themen 2017-05-09 17:45:16 +02:00
Martin Geno b03f59dfc7
[TASK] gui add notification 2017-05-09 03:14:03 +02:00
Martin Geno 24248d3673
[BUGFIX] improve websocket and stats of nodes 2017-05-09 01:03:44 +02:00