aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/notification/NotificationFormatter.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-03-24 11:28:36 +0500
committerAbyss777 <abyss@fox5.ru>2017-03-24 11:28:36 +0500
commit4597f97cf2020f900f36af2867d1129d9bebd54d (patch)
tree72de6c42c337d7f4efac3c003ef8abbd782a02d0 /src/org/traccar/notification/NotificationFormatter.java
parent8b343b37d623daf74692b62d2ffcfc6e4bce9bd6 (diff)
downloadtrackermap-server-4597f97cf2020f900f36af2867d1129d9bebd54d.tar.gz
trackermap-server-4597f97cf2020f900f36af2867d1129d9bebd54d.tar.bz2
trackermap-server-4597f97cf2020f900f36af2867d1129d9bebd54d.zip
Format speed in notification templates
Diffstat (limited to 'src/org/traccar/notification/NotificationFormatter.java')
-rw-r--r--src/org/traccar/notification/NotificationFormatter.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java
index eae2681c9..0f723a5e1 100644
--- a/src/org/traccar/notification/NotificationFormatter.java
+++ b/src/org/traccar/notification/NotificationFormatter.java
@@ -24,6 +24,7 @@ import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.apache.velocity.tools.generic.DateTool;
+import org.apache.velocity.tools.generic.NumberTool;
import org.traccar.Context;
import org.traccar.helper.Log;
import org.traccar.model.Device;
@@ -51,6 +52,7 @@ public final class NotificationFormatter {
}
velocityContext.put("webUrl", Context.getVelocityEngine().getProperty("web.url"));
velocityContext.put("dateTool", new DateTool());
+ velocityContext.put("numberTool", new NumberTool());
velocityContext.put("timezone", ReportUtils.getTimezone(userId));
velocityContext.put("locale", Locale.getDefault());
return velocityContext;