aboutsummaryrefslogtreecommitdiff
path: root/templates/mail
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-07 23:09:02 +1300
committerGitHub <noreply@github.com>2016-12-07 23:09:02 +1300
commit6cd8c6ccb5fc3549d3b34d397a7630cd7f2b865e (patch)
treeb50cd6f8a4a38fb3d0bc73b8ee017d3f92c880a5 /templates/mail
parentc674d90bc41e1a4b03fcc1779e711f8d8b79bf90 (diff)
parent23280c00e39bc1a7a899a6e2d5dda230f28a12b3 (diff)
downloadtrackermap-server-6cd8c6ccb5fc3549d3b34d397a7630cd7f2b865e.tar.gz
trackermap-server-6cd8c6ccb5fc3549d3b34d397a7630cd7f2b865e.tar.bz2
trackermap-server-6cd8c6ccb5fc3549d3b34d397a7630cd7f2b865e.zip
Merge pull request #2655 from Abyss777/email_templates
Templates for mail notifications
Diffstat (limited to 'templates/mail')
-rw-r--r--templates/mail/alarm.vm10
-rw-r--r--templates/mail/commandResult.vm9
-rw-r--r--templates/mail/deviceMoving.vm10
-rw-r--r--templates/mail/deviceOffline.vm9
-rw-r--r--templates/mail/deviceOnline.vm9
-rw-r--r--templates/mail/deviceOverspeed.vm17
-rw-r--r--templates/mail/deviceStopped.vm10
-rw-r--r--templates/mail/deviceUnknown.vm9
-rw-r--r--templates/mail/geofenceEnter.vm10
-rw-r--r--templates/mail/geofenceExit.vm10
-rw-r--r--templates/mail/ignitionOff.vm10
-rw-r--r--templates/mail/ignitionOn.vm10
-rw-r--r--templates/mail/maintenance.vm10
-rw-r--r--templates/mail/unknown.vm7
14 files changed, 140 insertions, 0 deletions
diff --git a/templates/mail/alarm.vm b/templates/mail/alarm.vm
new file mode 100644
index 000000000..57b6ba9be
--- /dev/null
+++ b/templates/mail/alarm.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: alarm!")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Alarm: $position.getString("alarm")<br>
+Point: <a href="https://www.openstreetmap.org/?mlat=$position.latitude&mlon=$position.longitude#map=16/$position.latitude/$position.longitude">#if($position.address)$position.address#{else}$position.latitude°, $position.longitude°#end</a><br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/commandResult.vm b/templates/mail/commandResult.vm
new file mode 100644
index 000000000..084152158
--- /dev/null
+++ b/templates/mail/commandResult.vm
@@ -0,0 +1,9 @@
+#set($subject = "$device.name: command result received")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Result: $position.getString("result")<br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/deviceMoving.vm b/templates/mail/deviceMoving.vm
new file mode 100644
index 000000000..2a3c703b5
--- /dev/null
+++ b/templates/mail/deviceMoving.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: moving")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Moving<br>
+Point: <a href="https://www.openstreetmap.org/?mlat=$position.latitude&mlon=$position.longitude#map=16/$position.latitude/$position.longitude">#if($position.address)$position.address#{else}$position.latitude°, $position.longitude°#end</a><br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/deviceOffline.vm b/templates/mail/deviceOffline.vm
new file mode 100644
index 000000000..a62133b71
--- /dev/null
+++ b/templates/mail/deviceOffline.vm
@@ -0,0 +1,9 @@
+#set($subject = "$device.name: offline")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Offline<br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/deviceOnline.vm b/templates/mail/deviceOnline.vm
new file mode 100644
index 000000000..c38393062
--- /dev/null
+++ b/templates/mail/deviceOnline.vm
@@ -0,0 +1,9 @@
+#set($subject = "$device.name: online")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Online<br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/deviceOverspeed.vm b/templates/mail/deviceOverspeed.vm
new file mode 100644
index 000000000..5f8c65096
--- /dev/null
+++ b/templates/mail/deviceOverspeed.vm
@@ -0,0 +1,17 @@
+#set($subject = "$device.name: exceeds the speed")
+#if($speedUnits == 'kmh')
+#set($speedString = $position.speed * 1.852 + ' km/h')
+#elseif($speedUnits == 'mph')
+#set($speedString = $position.speed * 1.15078 + ' mph')
+#else
+#set($speedString = "$position.speed kn")
+#end
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Exceeds the speed: $speedString<br>
+Point: <a href="https://www.openstreetmap.org/?mlat=$position.latitude&mlon=$position.longitude#map=16/$position.latitude/$position.longitude">#if($position.address)$position.address#{else}$position.latitude°, $position.longitude°#end</a><br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/deviceStopped.vm b/templates/mail/deviceStopped.vm
new file mode 100644
index 000000000..003ce2e13
--- /dev/null
+++ b/templates/mail/deviceStopped.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: stopped")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Stopped<br>
+Point: <a href="https://www.openstreetmap.org/?mlat=$position.latitude&mlon=$position.longitude#map=16/$position.latitude/$position.longitude">#if($position.address)$position.address#{else}$position.latitude°, $position.longitude°#end</a><br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/deviceUnknown.vm b/templates/mail/deviceUnknown.vm
new file mode 100644
index 000000000..75203bdfc
--- /dev/null
+++ b/templates/mail/deviceUnknown.vm
@@ -0,0 +1,9 @@
+#set($subject = "$device.name: status is unknown")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Status is unknown<br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/geofenceEnter.vm b/templates/mail/geofenceEnter.vm
new file mode 100644
index 000000000..32ee153bc
--- /dev/null
+++ b/templates/mail/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>
+Point: <a href="https://www.openstreetmap.org/?mlat=$position.latitude&mlon=$position.longitude#map=16/$position.latitude/$position.longitude">#if($position.address)$position.address#{else}$position.latitude°, $position.longitude°#end</a><br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/geofenceExit.vm b/templates/mail/geofenceExit.vm
new file mode 100644
index 000000000..b01653e49
--- /dev/null
+++ b/templates/mail/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>
+Point: <a href="https://www.openstreetmap.org/?mlat=$position.latitude&mlon=$position.longitude#map=16/$position.latitude/$position.longitude">#if($position.address)$position.address#{else}$position.latitude°, $position.longitude°#end</a><br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/ignitionOff.vm b/templates/mail/ignitionOff.vm
new file mode 100644
index 000000000..b45ecfca1
--- /dev/null
+++ b/templates/mail/ignitionOff.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: ignition OFF")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Ignition OFF<br>
+Point: <a href="https://www.openstreetmap.org/?mlat=$position.latitude&mlon=$position.longitude#map=16/$position.latitude/$position.longitude">#if($position.address)$position.address#{else}$position.latitude°, $position.longitude°#end</a><br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/ignitionOn.vm b/templates/mail/ignitionOn.vm
new file mode 100644
index 000000000..b2f1041bb
--- /dev/null
+++ b/templates/mail/ignitionOn.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: ignition ON")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Ignition ON<br>
+Point: <a href="https://www.openstreetmap.org/?mlat=$position.latitude&mlon=$position.longitude#map=16/$position.latitude/$position.longitude">#if($position.address)$position.address#{else}$position.latitude°, $position.longitude°#end</a><br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/maintenance.vm b/templates/mail/maintenance.vm
new file mode 100644
index 000000000..c7bc1a960
--- /dev/null
+++ b/templates/mail/maintenance.vm
@@ -0,0 +1,10 @@
+#set($subject = "$device.name: maintenance is required")
+<!DOCTYPE html>
+<html>
+<body>
+Device: $device.name<br>
+Maintenance is required<br>
+Point: <a href="https://www.openstreetmap.org/?mlat=$position.latitude&mlon=$position.longitude#map=16/$position.latitude/$position.longitude">#if($position.address)$position.address#{else}$position.latitude°, $position.longitude°#end</a><br>
+Time: $event.serverTime<br>
+</body>
+</html>
diff --git a/templates/mail/unknown.vm b/templates/mail/unknown.vm
new file mode 100644
index 000000000..566ce0d42
--- /dev/null
+++ b/templates/mail/unknown.vm
@@ -0,0 +1,7 @@
+#set($subject = "Unknown type")
+<!DOCTYPE html>
+<html>
+<body>
+Unknown type
+</body>
+</html>