aboutsummaryrefslogtreecommitdiff
path: root/web/app/model
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-09-12 17:39:43 +0500
committerAbyss777 <abyss@fox5.ru>2017-09-13 13:51:35 +0500
commita5d36c62facad98c409b9fcd4f8b92c3d47601ab (patch)
tree368a2ed169c1457a1cc2dd69a811f2dccc59ce04 /web/app/model
parent31a6fed66b4f077d2b6443fdd34229befe8777c3 (diff)
downloadtrackermap-web-a5d36c62facad98c409b9fcd4f8b92c3d47601ab.tar.gz
trackermap-web-a5d36c62facad98c409b9fcd4f8b92c3d47601ab.tar.bz2
trackermap-web-a5d36c62facad98c409b9fcd4f8b92c3d47601ab.zip
Implement Saved Commands
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'
}, {