aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller/Root.js
diff options
context:
space:
mode:
authortsmgeek <tsmgeek@gmail.com>2017-08-22 00:21:29 +0100
committertsmgeek <tsmgeek@gmail.com>2017-08-22 00:21:29 +0100
commitfdf35488b5b3cd5725c6c2e179b65377d30c6577 (patch)
treeda0b3927f3049475cd67977fe093d198920c1c37 /web/app/controller/Root.js
parentf8b98b236fd676fe8945d942842640ddea5bbac8 (diff)
parente0bb9b92d07176677b3043530660af3bc30774d7 (diff)
downloadtrackermap-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.tar.gz
trackermap-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.tar.bz2
trackermap-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.zip
Merge from upstream, change .eslintrc.json
Diffstat (limited to 'web/app/controller/Root.js')
-rw-r--r--web/app/controller/Root.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
index baba68a1..1c70dd03 100644
--- a/web/app/controller/Root.js
+++ b/web/app/controller/Root.js
@@ -52,6 +52,7 @@ Ext.define('Traccar.controller.Root', {
if (value !== undefined) {
return Traccar.AttributeFormatter.getAttributeConverter(this.attributeKey)(value);
}
+ return null;
},
onLaunch: function () {
@@ -112,6 +113,13 @@ Ext.define('Traccar.controller.Root', {
Ext.getStore('AttributeAliases').load();
Ext.getStore('ComputedAttributes').load();
this.initReportEventTypesStore();
+
+ Ext.getStore('ServerAttributes').loadData(Ext.getStore('CommonDeviceAttributes').getData().items, true);
+ Ext.getStore('ServerAttributes').loadData(Ext.getStore('CommonUserAttributes').getData().items, true);
+ Ext.getStore('UserAttributes').loadData(Ext.getStore('CommonUserAttributes').getData().items, true);
+ Ext.getStore('DeviceAttributes').loadData(Ext.getStore('CommonDeviceAttributes').getData().items, true);
+ Ext.getStore('GroupAttributes').loadData(Ext.getStore('CommonDeviceAttributes').getData().items, true);
+
Ext.getStore('Devices').load({
scope: this,
callback: function () {
@@ -162,7 +170,7 @@ Ext.define('Traccar.controller.Root', {
pathname = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/') + 1);
socket = new WebSocket(protocol + '//' + window.location.host + pathname + 'api/socket');
- socket.onclose = function (event) {
+ socket.onclose = function () {
Traccar.app.showToast(Strings.errorSocket, Strings.errorTitle);
Ext.Ajax.request({
@@ -291,7 +299,10 @@ Ext.define('Traccar.controller.Root', {
if (success) {
for (i = 0; i < records.length; i++) {
value = records[i].get('type');
- store.add({type: value, name: Traccar.app.getEventString(value)});
+ store.add({
+ type: value,
+ name: Traccar.app.getEventString(value)
+ });
}
}
}