From f4f77d7003907a9de95beaafd08306fdc2655f42 Mon Sep 17 00:00:00 2001 From: Shinryuken Date: Mon, 6 Nov 2017 21:50:29 +0100 Subject: New templates for event forwarded messages --- templates/forwarder/alarm.vm | 1 + templates/forwarder/commandResult.vm | 1 + templates/forwarder/deviceFuelDrop.vm | 1 + templates/forwarder/deviceMoving.vm | 1 + templates/forwarder/deviceOffline.vm | 1 + templates/forwarder/deviceOnline.vm | 1 + templates/forwarder/deviceOverspeed.vm | 10 ++++++++++ templates/forwarder/deviceStopped.vm | 1 + templates/forwarder/deviceUnknown.vm | 1 + templates/forwarder/driverChanged.vm | 6 ++++++ templates/forwarder/geofenceEnter.vm | 1 + templates/forwarder/geofenceExit.vm | 1 + templates/forwarder/ignitionOff.vm | 1 + templates/forwarder/ignitionOn.vm | 1 + templates/forwarder/maintenance.vm | 1 + templates/forwarder/test.vm | 1 + templates/forwarder/textMessage.vm | 1 + templates/forwarder/unknown.vm | 1 + 18 files changed, 32 insertions(+) create mode 100644 templates/forwarder/alarm.vm create mode 100644 templates/forwarder/commandResult.vm create mode 100644 templates/forwarder/deviceFuelDrop.vm create mode 100644 templates/forwarder/deviceMoving.vm create mode 100644 templates/forwarder/deviceOffline.vm create mode 100644 templates/forwarder/deviceOnline.vm create mode 100644 templates/forwarder/deviceOverspeed.vm create mode 100644 templates/forwarder/deviceStopped.vm create mode 100644 templates/forwarder/deviceUnknown.vm create mode 100644 templates/forwarder/driverChanged.vm create mode 100644 templates/forwarder/geofenceEnter.vm create mode 100644 templates/forwarder/geofenceExit.vm create mode 100644 templates/forwarder/ignitionOff.vm create mode 100644 templates/forwarder/ignitionOn.vm create mode 100644 templates/forwarder/maintenance.vm create mode 100644 templates/forwarder/test.vm create mode 100644 templates/forwarder/textMessage.vm create mode 100644 templates/forwarder/unknown.vm (limited to 'templates') diff --git a/templates/forwarder/alarm.vm b/templates/forwarder/alarm.vm new file mode 100644 index 000000000..389341cf1 --- /dev/null +++ b/templates/forwarder/alarm.vm @@ -0,0 +1 @@ +$device.name alarm: $position.getString("alarm") at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/commandResult.vm b/templates/forwarder/commandResult.vm new file mode 100644 index 000000000..4a327d850 --- /dev/null +++ b/templates/forwarder/commandResult.vm @@ -0,0 +1 @@ +$device.name command result received: $position.getString("result") at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/deviceFuelDrop.vm b/templates/forwarder/deviceFuelDrop.vm new file mode 100644 index 000000000..5e51396d4 --- /dev/null +++ b/templates/forwarder/deviceFuelDrop.vm @@ -0,0 +1 @@ +$device.name fuel drop at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/deviceMoving.vm b/templates/forwarder/deviceMoving.vm new file mode 100644 index 000000000..aaa72ab0d --- /dev/null +++ b/templates/forwarder/deviceMoving.vm @@ -0,0 +1 @@ +$device.name moving at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/deviceOffline.vm b/templates/forwarder/deviceOffline.vm new file mode 100644 index 000000000..8c4a02335 --- /dev/null +++ b/templates/forwarder/deviceOffline.vm @@ -0,0 +1 @@ +$device.name offline at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/deviceOnline.vm b/templates/forwarder/deviceOnline.vm new file mode 100644 index 000000000..62854feb0 --- /dev/null +++ b/templates/forwarder/deviceOnline.vm @@ -0,0 +1 @@ +$device.name online at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/deviceOverspeed.vm b/templates/forwarder/deviceOverspeed.vm new file mode 100644 index 000000000..f0b03c9e7 --- /dev/null +++ b/templates/forwarder/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 at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/deviceStopped.vm b/templates/forwarder/deviceStopped.vm new file mode 100644 index 000000000..c2437b5f6 --- /dev/null +++ b/templates/forwarder/deviceStopped.vm @@ -0,0 +1 @@ +$device.name stopped at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/deviceUnknown.vm b/templates/forwarder/deviceUnknown.vm new file mode 100644 index 000000000..07f39f3a9 --- /dev/null +++ b/templates/forwarder/deviceUnknown.vm @@ -0,0 +1 @@ +$device.name status is unknown at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/driverChanged.vm b/templates/forwarder/driverChanged.vm new file mode 100644 index 000000000..50849df7c --- /dev/null +++ b/templates/forwarder/driverChanged.vm @@ -0,0 +1,6 @@ +#if($driver) +#set($driverName = $driver.name) +#else +#set($driverName = $event.getString("driverUniqueId")) +#end +Driver $driverName has changed in $device.name at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/geofenceEnter.vm b/templates/forwarder/geofenceEnter.vm new file mode 100644 index 000000000..debdbf356 --- /dev/null +++ b/templates/forwarder/geofenceEnter.vm @@ -0,0 +1 @@ +$device.name has entered geofence $geofence.name at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/geofenceExit.vm b/templates/forwarder/geofenceExit.vm new file mode 100644 index 000000000..8553458f7 --- /dev/null +++ b/templates/forwarder/geofenceExit.vm @@ -0,0 +1 @@ +$device.name has exited geofence $geofence.name at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/ignitionOff.vm b/templates/forwarder/ignitionOff.vm new file mode 100644 index 000000000..ddf860413 --- /dev/null +++ b/templates/forwarder/ignitionOff.vm @@ -0,0 +1 @@ +$device.name ignition OFF at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/ignitionOn.vm b/templates/forwarder/ignitionOn.vm new file mode 100644 index 000000000..00b365be9 --- /dev/null +++ b/templates/forwarder/ignitionOn.vm @@ -0,0 +1 @@ +$device.name ignition ON at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/maintenance.vm b/templates/forwarder/maintenance.vm new file mode 100644 index 000000000..554b74400 --- /dev/null +++ b/templates/forwarder/maintenance.vm @@ -0,0 +1 @@ +$device.name maintenance is required at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/test.vm b/templates/forwarder/test.vm new file mode 100644 index 000000000..0311b6203 --- /dev/null +++ b/templates/forwarder/test.vm @@ -0,0 +1 @@ +Traccar test message diff --git a/templates/forwarder/textMessage.vm b/templates/forwarder/textMessage.vm new file mode 100644 index 000000000..dc42f29f1 --- /dev/null +++ b/templates/forwarder/textMessage.vm @@ -0,0 +1 @@ +Text message received from $device.name at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) diff --git a/templates/forwarder/unknown.vm b/templates/forwarder/unknown.vm new file mode 100644 index 000000000..fd20b50cc --- /dev/null +++ b/templates/forwarder/unknown.vm @@ -0,0 +1 @@ +Unknown type -- cgit v1.2.3