aboutsummaryrefslogtreecommitdiff
path: root/web/app/AttributeFormatter.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-11-19 07:57:52 +0500
committerAbyss777 <abyss@fox5.ru>2016-11-19 07:57:52 +0500
commitd00476f715a617fab3ef4f5cb5c4fff29c533f11 (patch)
treef4ae976ac6eaeeffd42931ad94fadb3f615b64bf /web/app/AttributeFormatter.js
parent11826f4b3eac08ad4f52d8c3e6af2b8a0156daee (diff)
downloadetbsa-traccar-web-d00476f715a617fab3ef4f5cb5c4fff29c533f11.tar.gz
etbsa-traccar-web-d00476f715a617fab3ef4f5cb5c4fff29c533f11.tar.bz2
etbsa-traccar-web-d00476f715a617fab3ef4f5cb5c4fff29c533f11.zip
Fix name and use getById
Diffstat (limited to 'web/app/AttributeFormatter.js')
-rw-r--r--web/app/AttributeFormatter.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js
index a6f6dd9..d3c2812 100644
--- a/web/app/AttributeFormatter.js
+++ b/web/app/AttributeFormatter.js
@@ -47,8 +47,8 @@ Ext.define('Traccar.AttributeFormatter', {
return (hours + ' ' + Strings.sharedHourAbbreviation + ' ' + minutes + ' ' + Strings.sharedMinuteAbbreviation);
},
- deviceNameFormatter: function (value) {
- return Ext.getStore('Devices').findRecord('id', value).get('name');
+ deviceIdFormatter: function (value) {
+ return Ext.getStore('Devices').getById(value).get('name');
},
defaultFormatter: function (value) {
@@ -82,8 +82,8 @@ Ext.define('Traccar.AttributeFormatter', {
return this.hoursFormatter;
} else if (key === 'duration') {
return this.durationFormatter;
- } else if (key === 'deviceName') {
- return this.deviceNameFormatter;
+ } else if (key === 'deviceId') {
+ return this.deviceIdFormatter;
} else {
return this.defaultFormatter;
}