aboutsummaryrefslogtreecommitdiff
path: root/templates/short/deviceOverspeed.vm
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-28 17:07:25 +1200
committerGitHub <noreply@github.com>2018-06-28 17:07:25 +1200
commite849d3a56f55c83dc0ebed02165a124e30e22dbd (patch)
tree730e542145652ca1d06c64a6944dfa70e0b31b6b /templates/short/deviceOverspeed.vm
parent4d6229c7daa4a7b8f28337c5eca9a422876c98b1 (diff)
parent14840af2abd9976b8f5634af8e77f4a7126dfac1 (diff)
downloadtrackermap-server-e849d3a56f55c83dc0ebed02165a124e30e22dbd.tar.gz
trackermap-server-e849d3a56f55c83dc0ebed02165a124e30e22dbd.tar.bz2
trackermap-server-e849d3a56f55c83dc0ebed02165a124e30e22dbd.zip
Merge pull request #3950 from Abyss777/notification_refactor
Notification refactor to allow custom "notificators"
Diffstat (limited to 'templates/short/deviceOverspeed.vm')
-rw-r--r--templates/short/deviceOverspeed.vm10
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/short/deviceOverspeed.vm b/templates/short/deviceOverspeed.vm
new file mode 100644
index 000000000..5e92f662c
--- /dev/null
+++ b/templates/short/deviceOverspeed.vm
@@ -0,0 +1,10 @@
+#if($speedUnit == 'kmh')
+#set($speedValue = $position.speed * 1.852)
+#set($speedString = $numberTool.format("0.0 km/h", $speedValue))
+#elseif($speedUnit == 'mph')
+#set($speedValue = $position.speed * 1.15078)
+#set($speedString = $numberTool.format("0.0 mph", $speedValue))
+#else
+#set($speedString = $numberTool.format("0.0 kn", $position.speed))
+#end
+$device.name exceeds the speed $speedString#{if}($geofence) in $geofence.name#{else}#{end} at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)