From 825ee0d178a24620f075cb4ffb8d49c75b046484 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 26 Jun 2018 12:05:16 +0500 Subject: Cleanup and some adjustments --- templates/full/alarm.vm | 10 ++++++++++ templates/full/commandResult.vm | 10 ++++++++++ templates/full/deviceFuelDrop.vm | 9 +++++++++ templates/full/deviceMoving.vm | 10 ++++++++++ templates/full/deviceOffline.vm | 10 ++++++++++ templates/full/deviceOnline.vm | 10 ++++++++++ templates/full/deviceOverspeed.vm | 19 +++++++++++++++++++ templates/full/deviceStopped.vm | 10 ++++++++++ templates/full/deviceUnknown.vm | 10 ++++++++++ templates/full/driverChanged.vm | 10 ++++++++++ templates/full/geofenceEnter.vm | 10 ++++++++++ templates/full/geofenceExit.vm | 10 ++++++++++ templates/full/ignitionOff.vm | 10 ++++++++++ templates/full/ignitionOn.vm | 10 ++++++++++ templates/full/maintenance.vm | 10 ++++++++++ templates/full/test.vm | 7 +++++++ templates/full/textMessage.vm | 9 +++++++++ templates/full/unknown.vm | 7 +++++++ 18 files changed, 181 insertions(+) create mode 100644 templates/full/alarm.vm create mode 100644 templates/full/commandResult.vm create mode 100644 templates/full/deviceFuelDrop.vm create mode 100644 templates/full/deviceMoving.vm create mode 100644 templates/full/deviceOffline.vm create mode 100644 templates/full/deviceOnline.vm create mode 100644 templates/full/deviceOverspeed.vm create mode 100644 templates/full/deviceStopped.vm create mode 100644 templates/full/deviceUnknown.vm create mode 100644 templates/full/driverChanged.vm create mode 100644 templates/full/geofenceEnter.vm create mode 100644 templates/full/geofenceExit.vm create mode 100644 templates/full/ignitionOff.vm create mode 100644 templates/full/ignitionOn.vm create mode 100644 templates/full/maintenance.vm create mode 100644 templates/full/test.vm create mode 100644 templates/full/textMessage.vm create mode 100644 templates/full/unknown.vm (limited to 'templates/full') 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!") + + + +Device: $device.name
+Alarm: $position.getString("alarm")
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+ + 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") + + + +Device: $device.name
+Result: $position.getString("result")
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Link: $webUrl?eventId=$event.id + + 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") + + + +Device: $device.name
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+ + 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") + + + +Device: $device.name
+Moving
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+ + 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") + + + +Device: $device.name
+Offline
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Link: $webUrl?eventId=$event.id + + 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") + + + +Device: $device.name
+Online
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Link: $webUrl?eventId=$event.id + + 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 + + + +Device: $device.name
+Exceeds the speed: $speedString#{if}($geofence) in $geofence.name#{else}#{end}
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+ + 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") + + + +Device: $device.name
+Stopped
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+ + 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") + + + +Device: $device.name
+Status is unknown
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Link: $webUrl?eventId=$event.id + + 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") + + + +Device: $device.name
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+Driver: #{if}($driver)$driver.name#{else}$event.getString("driverUniqueId")#{end} + + 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") + + + +Device: $device.name
+Has entered geofence: $geofence.name
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+ + 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") + + + +Device: $device.name
+Has exited geofence: $geofence.name
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+ + 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") + + + +Device: $device.name
+Ignition OFF
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+ + 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") + + + +Device: $device.name
+Ignition ON
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+ + 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") + + + +Device: $device.name
+Maintenance is required: $maintenance.name
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
+ + 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") + + + +Test message + + 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") + + + +Device: $device.name
+Message: $event.getString("message")
+Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
+ + 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") + + + +Unknown type + + -- cgit v1.2.3