aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-17 15:52:39 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-17 15:52:39 +1300
commitb247a05d4cc34cf587fc0b4299692d401124055a (patch)
tree2865e78e19fae20f4961898c4ad54038d24457e0 /web/app/view
parent5e56a1fbf80033cf5cc30ec7767d3cd92ab41cde (diff)
downloadtraccar-server-b247a05d4cc34cf587fc0b4299692d401124055a.tar.gz
traccar-server-b247a05d4cc34cf587fc0b4299692d401124055a.tar.bz2
traccar-server-b247a05d4cc34cf587fc0b4299692d401124055a.zip
Show last update in the status table
Diffstat (limited to 'web/app/view')
-rw-r--r--web/app/view/Devices.js23
1 files changed, 20 insertions, 3 deletions
diff --git a/web/app/view/Devices.js b/web/app/view/Devices.js
index 9dcd76a55..128cd3be1 100644
--- a/web/app/view/Devices.js
+++ b/web/app/view/Devices.js
@@ -52,10 +52,27 @@ Ext.define('Traccar.view.Devices', {
columns: [{
text: Strings.deviceName,
- dataIndex: 'name', flex: 1
+ dataIndex: 'name',
+ flex: 1
}, {
- text: Strings.deviceIdentifier,
- dataIndex: 'uniqueId', flex: 1
+ text: Strings.deviceLastUpdate,
+ dataIndex: 'lastUpdate',
+ flex: 1,
+ renderer: function (value, metaData, record) {
+ var status = record.get('status');
+ switch (status) {
+ case 'online':
+ metaData.tdCls = 'status-color-online';
+ break;
+ case 'offline':
+ metaData.tdCls = 'status-color-offline';
+ break;
+ default:
+ metaData.tdCls = 'status-color-unknown';
+ break;
+ }
+ return Ext.Date.format(value, Traccar.Style.dateTimeFormat);
+ }
}]
});