aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit/Devices.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-05-31 16:55:00 +0500
committerAbyss777 <abyss@fox5.ru>2017-05-31 16:55:08 +0500
commit35e8f4b4974515733737c5cc1dd439ca47860007 (patch)
tree21f5e7cc17e982e2c5b52682dfac29943e39199d /web/app/view/edit/Devices.js
parent0e598a6232e9cd7188916e06077862d6630a255b (diff)
downloadtrackermap-web-35e8f4b4974515733737c5cc1dd439ca47860007.tar.gz
trackermap-web-35e8f4b4974515733737c5cc1dd439ca47860007.tar.bz2
trackermap-web-35e8f4b4974515733737c5cc1dd439ca47860007.zip
Implement Events panel
Diffstat (limited to 'web/app/view/edit/Devices.js')
-rw-r--r--web/app/view/edit/Devices.js20
1 files changed, 1 insertions, 19 deletions
diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js
index fe3de42c..196df733 100644
--- a/web/app/view/edit/Devices.js
+++ b/web/app/view/edit/Devices.js
@@ -166,25 +166,7 @@ Ext.define('Traccar.view.edit.Devices', {
}, {
text: Strings.deviceLastUpdate,
dataIndex: 'lastUpdate',
- renderer: function (value, metaData, record) {
- var seconds, interval;
-
- if (value) {
- seconds = Math.floor((new Date() - value) / 1000);
- if (seconds < 0) {
- seconds = 0;
- }
- interval = Math.floor(seconds / 86400);
- if (interval > 1) {
- return interval + ' ' + Strings.sharedDays;
- }
- interval = Math.floor(seconds / 3600);
- if (interval > 1) {
- return interval + ' ' + Strings.sharedHours;
- }
- return Math.floor(seconds / 60) + ' ' + Strings.sharedMinutes;
- }
- }
+ renderer: Traccar.AttributeFormatter.getFormatter('lastUpdate')
}]
}
});