aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-06-15 09:29:27 +0500
committerAbyss777 <abyss@fox5.ru>2017-06-15 09:29:27 +0500
commit74639a742405b9e60c07f04e00138b9b6159d1c3 (patch)
tree4f437501010b73c9aac7bbe2d4e706798fba2355
parentcdce6e8dd567acf01f2d477b6c1bb0ecba9efd23 (diff)
downloadtrackermap-web-74639a742405b9e60c07f04e00138b9b6159d1c3.tar.gz
trackermap-web-74639a742405b9e60c07f04e00138b9b6159d1c3.tar.bz2
trackermap-web-74639a742405b9e60c07f04e00138b9b6159d1c3.zip
Use 'duration' formatter for 'engineHours'
-rw-r--r--web/app/AttributeFormatter.js7
-rw-r--r--web/app/view/ReportController.js2
2 files changed, 1 insertions, 8 deletions
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js
index 3f7c1276..aecbd8a2 100644
--- a/web/app/AttributeFormatter.js
+++ b/web/app/AttributeFormatter.js
@@ -51,11 +51,6 @@ Ext.define('Traccar.AttributeFormatter', {
return Ext.getStore('DistanceUnits').convertValue(value, Traccar.app.getPreference('distanceUnit'));
},
- hoursFormatter: function (value) {
- var hours = Math.round(value / 3600000);
- return (hours + ' ' + Strings.sharedHourAbbreviation);
- },
-
durationFormatter: function (value) {
var hours, minutes;
hours = Math.floor(value / 3600000);
@@ -114,8 +109,6 @@ Ext.define('Traccar.AttributeFormatter', {
return this.courseFormatter;
} else if (key === 'distance' || key === 'accuracy') {
return this.distanceFormatter;
- } else if (key === 'hours') {
- return this.hoursFormatter;
} else if (key === 'duration') {
return this.durationFormatter;
} else if (key === 'deviceId') {
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
index 36eceb0f..e048c063 100644
--- a/web/app/view/ReportController.js
+++ b/web/app/view/ReportController.js
@@ -482,7 +482,7 @@ Ext.define('Traccar.view.ReportController', {
}, {
text: Strings.reportEngineHours,
dataIndex: 'engineHours',
- renderer: Traccar.AttributeFormatter.getFormatter('hours')
+ renderer: Traccar.AttributeFormatter.getFormatter('duration')
}, {
text: Strings.reportSpentFuel,
dataIndex: 'spentFuel',