diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-07-25 16:20:15 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-25 16:20:15 +1200 |
commit | 4a31e34ca62d4b1941d3bc329afc127ef7263f34 (patch) | |
tree | 09b9ad0420a4819a350bcdcffeeee2342c5d2483 /tools | |
parent | 866c3073ef48a24d86834a391a4d3d91209a6eed (diff) | |
parent | b4841fa0a6293c0b895cf6bb65c6c2d871c78397 (diff) | |
download | trackermap-server-4a31e34ca62d4b1941d3bc329afc127ef7263f34.tar.gz trackermap-server-4a31e34ca62d4b1941d3bc329afc127ef7263f34.tar.bz2 trackermap-server-4a31e34ca62d4b1941d3bc329afc127ef7263f34.zip |
Merge pull request #2104 from ninioe/master
Added support for Alarm notifications & positions history cleaner & show alarms in report & Mute button & unlock UI files (for windows)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/minify.bat | 5 | ||||
-rwxr-xr-x | tools/test-generator.py | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/tools/minify.bat b/tools/minify.bat new file mode 100644 index 000000000..6ab8fd94b --- /dev/null +++ b/tools/minify.bat @@ -0,0 +1,5 @@ +@echo off +cd C:\[traccar path]\traccar\web +set SDK=C:\[sencha path]\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 8d7377c2c..b4edbfbaf 100755 --- a/tools/test-generator.py +++ b/tools/test-generator.py @@ -32,8 +32,10 @@ for i in range(0, len(waypoints)): lon = lon1 + (lon2 - lon1) * j / count points.append((lat, lon)) -def send(conn, lat, lon, course): +def send(conn, lat, lon, course, alarm): params = (('id', id), ('timestamp', int(time.time())), ('lat', lat), ('lon', lon), ('bearing', course)) + if alarm: + params = params + (('alarm', 'sos'),) conn.request('GET', '?' + urllib.urlencode(params)) conn.getresponse() @@ -53,6 +55,7 @@ conn = httplib.HTTPConnection(server) while True: (lat1, lon1) = points[index % len(points)] (lat2, lon2) = points[(index + 1) % len(points)] - send(conn, lat1, lon1, course(lat1, lon1, lat2, lon2)) + alarm = ((index % 10) == 0) + send(conn, lat1, lon1, course(lat1, lon1, lat2, lon2), alarm) time.sleep(period) - index += 1 + index += 1
\ No newline at end of file |