aboutsummaryrefslogtreecommitdiff
path: root/web/app/AttributeFormatter.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-19 20:22:34 +1300
committerGitHub <noreply@github.com>2016-11-19 20:22:34 +1300
commitd8e0a38c6626b48f27ad9fc92afb6a548bdaa52a (patch)
treef3e6a82a31e053fea2d3c92dddadf4e6aeec35c4 /web/app/AttributeFormatter.js
parent9dc4e2a38b872f4dd0ba51a821fc2052ab9323f7 (diff)
parentd00476f715a617fab3ef4f5cb5c4fff29c533f11 (diff)
downloadtrackermap-web-d8e0a38c6626b48f27ad9fc92afb6a548bdaa52a.tar.gz
trackermap-web-d8e0a38c6626b48f27ad9fc92afb6a548bdaa52a.tar.bz2
trackermap-web-d8e0a38c6626b48f27ad9fc92afb6a548bdaa52a.zip
Merge pull request #324 from Abyss777/devicename_column
Add Device Name column to Route report
Diffstat (limited to 'web/app/AttributeFormatter.js')
-rw-r--r--web/app/AttributeFormatter.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js
index 049532f2..d3c2812f 100644
--- a/web/app/AttributeFormatter.js
+++ b/web/app/AttributeFormatter.js
@@ -47,6 +47,10 @@ Ext.define('Traccar.AttributeFormatter', {
return (hours + ' ' + Strings.sharedHourAbbreviation + ' ' + minutes + ' ' + Strings.sharedMinuteAbbreviation);
},
+ deviceIdFormatter: function (value) {
+ return Ext.getStore('Devices').getById(value).get('name');
+ },
+
defaultFormatter: function (value) {
if (typeof value === 'number') {
return Number(value.toFixed(Traccar.Style.numberPrecision));
@@ -78,6 +82,8 @@ Ext.define('Traccar.AttributeFormatter', {
return this.hoursFormatter;
} else if (key === 'duration') {
return this.durationFormatter;
+ } else if (key === 'deviceId') {
+ return this.deviceIdFormatter;
} else {
return this.defaultFormatter;
}