diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-25 19:43:16 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-25 19:43:16 +1200 |
commit | e637bd7c022560dcc9c48516dc22a884a5de8122 (patch) | |
tree | c34369d5081238915e3f3660d27d4acedde25467 /web/app/view/report/Report.js | |
parent | 87156d38c250abd9a1cba9b9af289d5ff0acb075 (diff) | |
download | trackermap-server-e637bd7c022560dcc9c48516dc22a884a5de8122.tar.gz trackermap-server-e637bd7c022560dcc9c48516dc22a884a5de8122.tar.bz2 trackermap-server-e637bd7c022560dcc9c48516dc22a884a5de8122.zip |
Convert speed value to units
Diffstat (limited to 'web/app/view/report/Report.js')
-rw-r--r-- | web/app/view/report/Report.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/web/app/view/report/Report.js b/web/app/view/report/Report.js index d52243139..320d336fa 100644 --- a/web/app/view/report/Report.js +++ b/web/app/view/report/Report.js @@ -80,7 +80,16 @@ Ext.define('Traccar.view.report.Report', { { text: strings.position_latitude, dataIndex: 'latitude', flex: 1 }, { text: strings.position_longitude, dataIndex: 'longitude', flex: 1 }, { text: strings.position_altitude, dataIndex: 'altitude', flex: 1 }, - { text: strings.position_speed, dataIndex: 'speed', flex: 1 }, + { + text: strings.position_speed, + dataIndex: 'speed', + flex: 1, + renderer: function(value) { + var speedUnits = Ext.getStore('SpeedUnits'); + var unit = Traccar.getApplication().getUser().get('speedUnit') || Traccar.getApplication().getServer().get('speedUnit') || ''; + return speedUnits.convert(value, unit) + ' ' + speedUnits.getUnitName(unit); + } + }, { text: strings.position_course, dataIndex: 'course', flex: 1 }, { text: strings.position_address, dataIndex: 'address', flex: 1 } ] |