aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/view/edit/Devices.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js
index 42291f0b..7c1f9358 100644
--- a/web/app/view/edit/Devices.js
+++ b/web/app/view/edit/Devices.js
@@ -88,6 +88,15 @@ Ext.define('Traccar.view.edit.Devices', {
selectionchange: 'onSelectionChange'
},
+ viewConfig: {
+ getRowClass: function (record) {
+ var status = record.get('status');
+ if (status) {
+ return Ext.getStore('DeviceStatuses').getById(status).get('color');
+ }
+ }
+ },
+
columns: {
defaults: {
flex: 1,
@@ -142,7 +151,6 @@ Ext.define('Traccar.view.edit.Devices', {
if (value) {
status = Ext.getStore('DeviceStatuses').getById(value);
if (status) {
- metaData.tdCls = status.get('color');
return status.get('name');
}
}
@@ -151,12 +159,7 @@ Ext.define('Traccar.view.edit.Devices', {
text: Strings.deviceLastUpdate,
dataIndex: 'lastUpdate',
renderer: function (value, metaData, record) {
- var status, seconds, interval;
-
- status = record.get('status');
- if (status) {
- metaData.tdCls = Ext.getStore('DeviceStatuses').getById(status).get('color');
- }
+ var seconds, interval;
if (value) {
seconds = Math.floor((new Date() - value) / 1000);