aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/ReportController.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/view/ReportController.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/view/ReportController.js')
-rw-r--r--web/app/view/ReportController.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
index a8c5f4eb..775394d0 100644
--- a/web/app/view/ReportController.js
+++ b/web/app/view/ReportController.js
@@ -225,6 +225,10 @@ Ext.define('Traccar.view.ReportController', {
},
routeColumns: [{
+ text: Strings.reportDeviceName,
+ dataIndex: 'deviceId',
+ renderer: Traccar.AttributeFormatter.getFormatter('deviceId')
+ }, {
text: Strings.positionValid,
dataIndex: 'valid',
renderer: Traccar.AttributeFormatter.getFormatter('valid')
@@ -263,9 +267,7 @@ Ext.define('Traccar.view.ReportController', {
}, {
text: Strings.reportDeviceName,
dataIndex: 'deviceId',
- renderer: function (value) {
- return Ext.getStore('Devices').findRecord('id', value).get('name');
- }
+ renderer: Traccar.AttributeFormatter.getFormatter('deviceId')
}, {
text: Strings.sharedType,
dataIndex: 'type',
@@ -286,9 +288,7 @@ Ext.define('Traccar.view.ReportController', {
summaryColumns: [{
text: Strings.reportDeviceName,
dataIndex: 'deviceId',
- renderer: function (value) {
- return Ext.getStore('Devices').findRecord('id', value).get('name');
- }
+ renderer: Traccar.AttributeFormatter.getFormatter('deviceId')
}, {
text: Strings.sharedDistance,
dataIndex: 'distance',
@@ -310,9 +310,7 @@ Ext.define('Traccar.view.ReportController', {
tripsColumns: [{
text: Strings.reportDeviceName,
dataIndex: 'deviceId',
- renderer: function (value) {
- return Ext.getStore('Devices').findRecord('id', value).get('name');
- }
+ renderer: Traccar.AttributeFormatter.getFormatter('deviceId')
}, {
text: Strings.reportStartTime,
dataIndex: 'startTime',