aboutsummaryrefslogtreecommitdiff
path: root/web/app/AttributeFormatter.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-06-19 11:34:01 +0500
committerAbyss777 <abyss@fox5.ru>2017-06-19 16:09:43 +0500
commitb2b9e4cb213023697566885340d2ff7b5a44db8b (patch)
treeacd73e2c5ccd3eda062b0228873d2239e2d988fd /web/app/AttributeFormatter.js
parentf3ce72afbd49ccde94178158147de7b378128a55 (diff)
downloadtrackermap-web-b2b9e4cb213023697566885340d2ff7b5a44db8b.tar.gz
trackermap-web-b2b9e4cb213023697566885340d2ff7b5a44db8b.tar.bz2
trackermap-web-b2b9e4cb213023697566885340d2ff7b5a44db8b.zip
- Added columns filters to most windows
- Added more columns to UserDevices and UserGroups - Change openlayers version to 4.2.0
Diffstat (limited to 'web/app/AttributeFormatter.js')
-rw-r--r--web/app/AttributeFormatter.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js
index aecbd8a2..f8bce1b1 100644
--- a/web/app/AttributeFormatter.js
+++ b/web/app/AttributeFormatter.js
@@ -62,6 +62,18 @@ Ext.define('Traccar.AttributeFormatter', {
return Ext.getStore('Devices').getById(value).get('name');
},
+ groupIdFormatter: function (value) {
+ var group;
+ if (value !== 0) {
+ if (Ext.getStore('AllGroups').getTotalCount() === 0) {
+ group = Ext.getStore('Groups').getById(value);
+ } else {
+ group = Ext.getStore('AllGroups').getById(value);
+ }
+ return group ? group.get('name') : value;
+ }
+ },
+
lastUpdateFormatter: function (value) {
var seconds, interval;
@@ -113,6 +125,8 @@ Ext.define('Traccar.AttributeFormatter', {
return this.durationFormatter;
} else if (key === 'deviceId') {
return this.deviceIdFormatter;
+ } else if (key === 'groupId') {
+ return this.groupIdFormatter;
} else if (key === 'lastUpdate') {
return this.lastUpdateFormatter;
} else {