diff options
author | ninioe <ninioe@gmail.com> | 2016-07-12 16:04:40 +0300 |
---|---|---|
committer | ninioe <ninioe@gmail.com> | 2016-07-12 16:04:40 +0300 |
commit | d045c1e2174146ddc8ad8b2ef4442863f3d84a11 (patch) | |
tree | 458ac9a09ef9df6426a34067072164c44ac18020 /tools | |
parent | 8d5b4ec5ec8e4aaa2c34793e3100a7782551afbd (diff) | |
download | traccar-server-d045c1e2174146ddc8ad8b2ef4442863f3d84a11.tar.gz traccar-server-d045c1e2174146ddc8ad8b2ef4442863f3d84a11.tar.bz2 traccar-server-d045c1e2174146ddc8ad8b2ef4442863f3d84a11.zip |
Added support for Alarm popup & positions history cleaner
1. added support for Alarm and Alarm Type in popup and also in history
records. can be muted with a toggle button in the UI
2. added a timer to clear positions history once a day. the default is
to save positions history for 7 days if not defined in the configuration
file.
3. prevent the lock of the UI files (js, html, css, etc..) for wondows
developers in debug mode. It's easier to do changes to the UI without
stopping the app each time.
4. tools: added support in test-generator.py to simulate Alert, also
added minify.bat file to compile new js files for the UI using sencha
SDK for windows developers
Diffstat (limited to 'tools')
-rw-r--r-- | tools/minify.bat | 5 | ||||
-rwxr-xr-x | tools/test-generator.py | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/tools/minify.bat b/tools/minify.bat new file mode 100644 index 000000000..dfa9c5895 --- /dev/null +++ b/tools/minify.bat @@ -0,0 +1,5 @@ +@echo off +cd C:\Users\Erez\Documents\traccar\web +set SDK=C:\inetpub\wwwroot\ext-6.0.0 + +sencha -sdk %SDK% compile -classpath=app.js,app,%SDK%\packages\core\src,%SDK%\packages\core\overrides,%SDK%\classic\classic\src,%SDK%\classic\classic\overrides exclude -all and include -recursive -file app.js and exclude -namespace=Ext and concatenate -closure app.min.js diff --git a/tools/test-generator.py b/tools/test-generator.py index 681d1755d..4beadc375 100755 --- a/tools/test-generator.py +++ b/tools/test-generator.py @@ -32,8 +32,11 @@ for i in range(0, len(waypoints)): lon = lon1 + (lon2 - lon1) * j / count points.append((lat, lon)) -def send(lat, lon, course): +#changed by Erez +def send(lat, lon, course, alarm): params = (('id', id), ('timestamp', int(time.time())), ('lat', lat), ('lon', lon), ('bearing', course)) + if alarm: + params = params + (('alarm', 'true'),) urllib2.urlopen(server + '?' + urllib.urlencode(params)).read() def course(lat1, lon1, lat2, lon2): @@ -50,6 +53,7 @@ index = 0 while True: (lat1, lon1) = points[index % len(points)] (lat2, lon2) = points[(index + 1) % len(points)] - send(lat1, lon1, course(lat1, lon1, lat2, lon2)) + alarm = ((index % 10) == 0)#added by Erez + send(lat1, lon1, course(lat1, lon1, lat2, lon2), alarm) time.sleep(period) index += 1 |