aboutsummaryrefslogtreecommitdiff
path: root/templates/full
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/full
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/full')
-rw-r--r--templates/full/alarm.vm10
-rw-r--r--templates/full/commandResult.vm10
-rw-r--r--templates/full/deviceFuelDrop.vm9
-rw-r--r--templates/full/deviceMoving.vm10
-rw-r--r--templates/full/deviceOffline.vm10
-rw-r--r--templates/full/deviceOnline.vm10
-rw-r--r--templates/full/deviceOverspeed.vm19
-rw-r--r--templates/full/deviceStopped.vm10
-rw-r--r--templates/full/deviceUnknown.vm10
-rw-r--r--templates/full/driverChanged.vm10
-rw-r--r--templates/full/geofenceEnter.vm10
-rw-r--r--templates/full/geofenceExit.vm10
-rw-r--r--templates/full/ignitionOff.vm10
-rw-r--r--templates/full/ignitionOn.vm10
-rw-r--r--templates/full/maintenance.vm10
-rw-r--r--templates/full/test.vm7
-rw-r--r--templates/full/textMessage.vm9
-rw-r--r--templates/full/unknown.vm7
18 files changed, 181 insertions, 0 deletions
diff --git a/templates/full/alarm.vm b/templates/full/alarm.vm
new file mode 100644
index 000000000..8f1164291
--- /dev/null
+++ b/templates/full/alarm.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: alarm!")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Alarm: $position.getString("alarm")<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+</body>
+</html>
diff --git a/templates/full/commandResult.vm b/templates/full/commandResult.vm
new file mode 100644
index 000000000..5b6d8ef3e
--- /dev/null
+++ b/templates/full/commandResult.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: command result received")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Result: $position.getString("result")<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Link: <a href="$webUrl?eventId=$event.id">$webUrl?eventId=$event.id</a>
+</body>
+</html>
diff --git a/templates/full/deviceFuelDrop.vm b/templates/full/deviceFuelDrop.vm
new file mode 100644
index 000000000..c30ec3a1c
--- /dev/null
+++ b/templates/full/deviceFuelDrop.vm
@@ -0,0 +1,9 @@
+#set($subject = "$device.name: fuel drop")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+</body>
+</html>
diff --git a/templates/full/deviceMoving.vm b/templates/full/deviceMoving.vm
new file mode 100644
index 000000000..6e98af1de
--- /dev/null
+++ b/templates/full/deviceMoving.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: moving")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Moving<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+</body>
+</html>
diff --git a/templates/full/deviceOffline.vm b/templates/full/deviceOffline.vm
new file mode 100644
index 000000000..1f6d02fb2
--- /dev/null
+++ b/templates/full/deviceOffline.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: offline")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Offline<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Link: <a href="$webUrl?eventId=$event.id">$webUrl?eventId=$event.id</a>
+</body>
+</html>
diff --git a/templates/full/deviceOnline.vm b/templates/full/deviceOnline.vm
new file mode 100644
index 000000000..9211eff11
--- /dev/null
+++ b/templates/full/deviceOnline.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: online")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Online<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Link: <a href="$webUrl?eventId=$event.id">$webUrl?eventId=$event.id</a>
+</body>
+</html>
diff --git a/templates/full/deviceOverspeed.vm b/templates/full/deviceOverspeed.vm
new file mode 100644
index 000000000..e5e576f3a
--- /dev/null
+++ b/templates/full/deviceOverspeed.vm
@@ -0,0 +1,19 @@
+#set($subject = "$device.name: exceeds the speed")
+#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
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Exceeds the speed: $speedString#{if}($geofence) in $geofence.name#{else}#{end}<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+</body>
+</html>
diff --git a/templates/full/deviceStopped.vm b/templates/full/deviceStopped.vm
new file mode 100644
index 000000000..2ec0f8db9
--- /dev/null
+++ b/templates/full/deviceStopped.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: stopped")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Stopped<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+</body>
+</html>
diff --git a/templates/full/deviceUnknown.vm b/templates/full/deviceUnknown.vm
new file mode 100644
index 000000000..34fa01a8a
--- /dev/null
+++ b/templates/full/deviceUnknown.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: status is unknown")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Status is unknown<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Link: <a href="$webUrl?eventId=$event.id">$webUrl?eventId=$event.id</a>
+</body>
+</html>
diff --git a/templates/full/driverChanged.vm b/templates/full/driverChanged.vm
new file mode 100644
index 000000000..ba1e68661
--- /dev/null
+++ b/templates/full/driverChanged.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: driver has changed")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+Driver: #{if}($driver)$driver.name#{else}$event.getString("driverUniqueId")#{end}
+</body>
+</html>
diff --git a/templates/full/geofenceEnter.vm b/templates/full/geofenceEnter.vm
new file mode 100644
index 000000000..e83a0de62
--- /dev/null
+++ b/templates/full/geofenceEnter.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: has entered geofence")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Has entered geofence: $geofence.name<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+</body>
+</html>
diff --git a/templates/full/geofenceExit.vm b/templates/full/geofenceExit.vm
new file mode 100644
index 000000000..3557f6eb2
--- /dev/null
+++ b/templates/full/geofenceExit.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: has exited geofence")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Has exited geofence: $geofence.name<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+</body>
+</html>
diff --git a/templates/full/ignitionOff.vm b/templates/full/ignitionOff.vm
new file mode 100644
index 000000000..0281eef02
--- /dev/null
+++ b/templates/full/ignitionOff.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: ignition OFF")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Ignition OFF<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+</body>
+</html>
diff --git a/templates/full/ignitionOn.vm b/templates/full/ignitionOn.vm
new file mode 100644
index 000000000..27135a7f0
--- /dev/null
+++ b/templates/full/ignitionOn.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: ignition ON")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Ignition ON<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+</body>
+</html>
diff --git a/templates/full/maintenance.vm b/templates/full/maintenance.vm
new file mode 100644
index 000000000..c6973f97a
--- /dev/null
+++ b/templates/full/maintenance.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: maintenance is required")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Maintenance is required: $maintenance.name<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+Point: <a href="$webUrl?eventId=$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
+</body>
+</html>
diff --git a/templates/full/test.vm b/templates/full/test.vm
new file mode 100644
index 000000000..93cbdc549
--- /dev/null
+++ b/templates/full/test.vm
@@ -0,0 +1,7 @@
+#set($subject = "Test message")
+<!DOCTYPE html>
+<html>
+<body>
+Test message
+</body>
+</html>
diff --git a/templates/full/textMessage.vm b/templates/full/textMessage.vm
new file mode 100644
index 000000000..174173c85
--- /dev/null
+++ b/templates/full/textMessage.vm
@@ -0,0 +1,9 @@
+#set($subject = "$device.name: text message received")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Message: $event.getString("message")<br>
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
+</body>
+</html>
diff --git a/templates/full/unknown.vm b/templates/full/unknown.vm
new file mode 100644
index 000000000..566ce0d42
--- /dev/null
+++ b/templates/full/unknown.vm
@@ -0,0 +1,7 @@
+#set($subject = "Unknown type")
+<!DOCTYPE html>
+<html>
+<body>
+Unknown type
+</body>
+</html>