diff options
Diffstat (limited to 'web/app/model')
-rw-r--r-- | web/app/model/Command.js | 6 | ||||
-rw-r--r-- | web/app/model/KnownCommand.js | 3 | ||||
-rw-r--r-- | web/app/model/Server.js | 3 | ||||
-rw-r--r-- | web/app/model/User.js | 3 |
4 files changed, 13 insertions, 2 deletions
diff --git a/web/app/model/Command.js b/web/app/model/Command.js index 789c3647..f64d2a4b 100644 --- a/web/app/model/Command.js +++ b/web/app/model/Command.js @@ -20,6 +20,12 @@ Ext.define('Traccar.model.Command', { identifier: 'negative', fields: [{ + name: 'id', + type: 'int' + }, { + name: 'description', + type: 'string' + }, { name: 'deviceId', type: 'int' }, { diff --git a/web/app/model/KnownCommand.js b/web/app/model/KnownCommand.js index 08213020..06610e32 100644 --- a/web/app/model/KnownCommand.js +++ b/web/app/model/KnownCommand.js @@ -25,8 +25,7 @@ Ext.define('Traccar.model.KnownCommand', { }, { 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'); + return Traccar.AttributeFormatter.getFormatter('commandType')(rec.get('type')); }, depends: ['type'] }, { 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' }, { |