From 56a03dca259fe448dd6623dfc15b4f1bf0d0580a Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Thu, 25 Apr 2024 20:23:23 -0600 Subject: Add templates to script --- etbsa/resources/images/icon/car.svg | 74 ------------------- etbsa/resources/images/icon/pickup.svg | 97 ------------------------ etbsa/resources/images/icon/tractor.svg | 62 ---------------- etbsa/resources/images/icon/truck.svg | 114 ----------------------------- etbsa/templates/export/devices.xlsx | Bin 0 -> 9300 bytes etbsa/templates/export/route.xlsx | Bin 0 -> 23491 bytes etbsa/templates/short/deviceOverspeed.vm | 11 +++ etbsa/templates/short/ignitionOff.vm | 2 + etbsa/templates/short/ignitionOn.vm | 2 + etbsa/templates/short/queuedCommandSent.vm | 2 + rebrand.sh | 9 +++ 11 files changed, 26 insertions(+), 347 deletions(-) delete mode 100644 etbsa/resources/images/icon/car.svg delete mode 100644 etbsa/resources/images/icon/pickup.svg delete mode 100644 etbsa/resources/images/icon/tractor.svg delete mode 100644 etbsa/resources/images/icon/truck.svg create mode 100644 etbsa/templates/export/devices.xlsx create mode 100644 etbsa/templates/export/route.xlsx create mode 100644 etbsa/templates/short/deviceOverspeed.vm create mode 100644 etbsa/templates/short/ignitionOff.vm create mode 100644 etbsa/templates/short/ignitionOn.vm create mode 100644 etbsa/templates/short/queuedCommandSent.vm diff --git a/etbsa/resources/images/icon/car.svg b/etbsa/resources/images/icon/car.svg deleted file mode 100644 index 8b95bf6..0000000 --- a/etbsa/resources/images/icon/car.svg +++ /dev/null @@ -1,74 +0,0 @@ - - diff --git a/etbsa/resources/images/icon/pickup.svg b/etbsa/resources/images/icon/pickup.svg deleted file mode 100644 index f38ec29..0000000 --- a/etbsa/resources/images/icon/pickup.svg +++ /dev/null @@ -1,97 +0,0 @@ - - diff --git a/etbsa/resources/images/icon/tractor.svg b/etbsa/resources/images/icon/tractor.svg deleted file mode 100644 index 42ed763..0000000 --- a/etbsa/resources/images/icon/tractor.svg +++ /dev/null @@ -1,62 +0,0 @@ - - diff --git a/etbsa/resources/images/icon/truck.svg b/etbsa/resources/images/icon/truck.svg deleted file mode 100644 index 481d89a..0000000 --- a/etbsa/resources/images/icon/truck.svg +++ /dev/null @@ -1,114 +0,0 @@ - - diff --git a/etbsa/templates/export/devices.xlsx b/etbsa/templates/export/devices.xlsx new file mode 100644 index 0000000..a4c31c8 Binary files /dev/null and b/etbsa/templates/export/devices.xlsx differ diff --git a/etbsa/templates/export/route.xlsx b/etbsa/templates/export/route.xlsx new file mode 100644 index 0000000..efa0fc5 Binary files /dev/null and b/etbsa/templates/export/route.xlsx differ diff --git a/etbsa/templates/short/deviceOverspeed.vm b/etbsa/templates/short/deviceOverspeed.vm new file mode 100644 index 0000000..b0c5e33 --- /dev/null +++ b/etbsa/templates/short/deviceOverspeed.vm @@ -0,0 +1,11 @@ +#set($subject = "$device.name: excedió el límite de velocidad") +#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 excedió la velocidad $speedString#{if}($geofence) en $geofence.name#{else}#{end} el $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.eventTime, $locale, $timezone) diff --git a/etbsa/templates/short/ignitionOff.vm b/etbsa/templates/short/ignitionOff.vm new file mode 100644 index 0000000..5cd52e0 --- /dev/null +++ b/etbsa/templates/short/ignitionOff.vm @@ -0,0 +1,2 @@ +#set($subject = "$device.name: ignición apagada") +$device.name se apagó el $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.eventTime, $locale, $timezone) diff --git a/etbsa/templates/short/ignitionOn.vm b/etbsa/templates/short/ignitionOn.vm new file mode 100644 index 0000000..86b52fe --- /dev/null +++ b/etbsa/templates/short/ignitionOn.vm @@ -0,0 +1,2 @@ +#set($subject = "$device.name: ignición encendidan") +$device.name se encendió el $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.eventTime, $locale, $timezone) diff --git a/etbsa/templates/short/queuedCommandSent.vm b/etbsa/templates/short/queuedCommandSent.vm new file mode 100644 index 0000000..939f6fd --- /dev/null +++ b/etbsa/templates/short/queuedCommandSent.vm @@ -0,0 +1,2 @@ +#set($subject = "$device.name: comando enviado") +El comando en cola fue enviado a $device.name el $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.eventTime, $locale, $timezone) diff --git a/rebrand.sh b/rebrand.sh index fe49821..7f937bf 100755 --- a/rebrand.sh +++ b/rebrand.sh @@ -21,9 +21,18 @@ function rebrand_resources { fi } +function rebrand_templates { + echo "Rebranding app templates..." + + if [ -d "${branding}/templates" ]; then + cp -rf "${branding}/templates" "${server_path}" + fi +} + function main { rebrand_assets rebrand_resources + rebrand_templates } main -- cgit v1.2.3