aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view')
-rw-r--r--web/app/view/report/Report.js2
-rw-r--r--web/app/view/state/StateController.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/web/app/view/report/Report.js b/web/app/view/report/Report.js
index 8b86b9cc7..8a1dae9c4 100644
--- a/web/app/view/report/Report.js
+++ b/web/app/view/report/Report.js
@@ -91,7 +91,7 @@ Ext.define('Traccar.view.report.Report', {
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);
+ return speedUnits.formatValue(value, unit);
}
},
{ text: strings.positionAddress, dataIndex: 'address', flex: 1 }
diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js
index 36978c3d0..bc125e529 100644
--- a/web/app/view/state/StateController.js
+++ b/web/app/view/state/StateController.js
@@ -95,7 +95,7 @@ Ext.define('Traccar.view.state.StateController', {
if (key === 'speed') {
var speedUnits = Ext.getStore('SpeedUnits');
unit = Traccar.getApplication().getUser().get('speedUnit') || Traccar.getApplication().getServer().get('speedUnit') || '';
- value = speedUnits.convert(value, unit) + ' ' + speedUnits.getUnitName(unit);
+ value = speedUnits.formatValue(value, unit);
} else if (value instanceof Date) {
value = Ext.Date.format(value, styles.dateTimeFormat);
}
@@ -121,7 +121,7 @@ Ext.define('Traccar.view.state.StateController', {
if (key === 'distance' || key === 'odometer') {
var distanceUnits = Ext.getStore('DistanceUnits');
unit = Traccar.getApplication().getUser().get('distanceUnit') || Traccar.getApplication().getServer().get('distanceUnit') || '';
- value = distanceUnits.convert(value, unit) + ' ' + distanceUnits.getUnitName(unit);
+ value = distanceUnits.formatValue(value, unit);
}
store.add(Ext.create('Traccar.model.Attribute', {