aboutsummaryrefslogtreecommitdiff
path: root/web/app/model
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/model')
-rw-r--r--web/app/model/Command.js14
-rw-r--r--web/app/model/Server.js3
-rw-r--r--web/app/model/User.js3
3 files changed, 20 insertions, 0 deletions
diff --git a/web/app/model/Command.js b/web/app/model/Command.js
index 789c3647..aa3dad14 100644
--- a/web/app/model/Command.js
+++ b/web/app/model/Command.js
@@ -20,12 +20,26 @@ Ext.define('Traccar.model.Command', {
identifier: 'negative',
fields: [{
+ name: 'id',
+ type: 'int'
+ }, {
+ name: 'description',
+ type: 'string'
+ }, {
name: 'deviceId',
type: 'int'
}, {
name: 'type',
type: 'string'
}, {
+ name: 'name',
+ convert: function (v, rec) {
+ var name = Strings['command' + rec.get('type').charAt(0).toUpperCase() + rec.get('type').slice(1)];
+ return name ? name : rec.get('type');
+ },
+ depends: ['type'],
+ persist: false
+ }, {
name: 'textChannel',
type: 'boolean'
}, {
diff --git a/web/app/model/Server.js b/web/app/model/Server.js
index b8a88756..da1618bf 100644
--- a/web/app/model/Server.js
+++ b/web/app/model/Server.js
@@ -32,6 +32,9 @@ Ext.define('Traccar.model.Server', {
name: 'deviceReadonly',
type: 'boolean'
}, {
+ name: 'limitCommands',
+ type: 'boolean'
+ }, {
name: 'map',
type: 'string'
}, {
diff --git a/web/app/model/User.js b/web/app/model/User.js
index c47a8d16..e8771b9b 100644
--- a/web/app/model/User.js
+++ b/web/app/model/User.js
@@ -75,6 +75,9 @@ Ext.define('Traccar.model.User', {
name: 'deviceReadonly',
type: 'boolean'
}, {
+ name: 'limitCommands',
+ type: 'boolean'
+ }, {
name: 'token',
type: 'string'
}, {