aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-06-23 16:17:25 +0500
committerAbyss777 <abyss@fox5.ru>2016-06-23 16:17:25 +0500
commitbd2e0fdc6fe222316e9e740aa265b6d132d407b6 (patch)
tree0e146fde0b2a7556c380a4b715cb88e42b97d8cb /web/app/controller
parenta445733519b4b38b52b03fbb63a55c7270cb9221 (diff)
downloadtrackermap-server-bd2e0fdc6fe222316e9e740aa265b6d132d407b6.tar.gz
trackermap-server-bd2e0fdc6fe222316e9e740aa265b6d132d407b6.tar.bz2
trackermap-server-bd2e0fdc6fe222316e9e740aa265b6d132d407b6.zip
Added possibility to disable event and geofence subsystems
Diffstat (limited to 'web/app/controller')
-rw-r--r--web/app/controller/Root.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
index 56a076edd..8ae348ca4 100644
--- a/web/app/controller/Root.js
+++ b/web/app/controller/Root.js
@@ -75,6 +75,11 @@ Ext.define('Traccar.controller.Root', {
loadApp: function () {
Ext.getStore('Groups').load();
Ext.getStore('Devices').load();
+ Ext.getStore('Geofences').getProxy().on('exception', function(proxy, response, operation) {
+ if (operation && operation.error.status === 404) {
+ Traccar.app.withoutGeofences = true;
+ }
+ });
Ext.getStore('Geofences').load();
Ext.get('attribution').remove();
if (this.isPhone) {
@@ -148,7 +153,7 @@ Ext.define('Traccar.controller.Root', {
text = typeKey;
}
}
- if (array[i].geofenceId !== 0) {
+ if (array[i].geofenceId !== 0 && !Traccar.app.withoutGeofences) {
geofence = Ext.getStore('Geofences').getById(array[i].geofenceId);
if (typeof geofence != "undefined") {
text += ' \"' + geofence.getData().name + '"';