diff options
Diffstat (limited to 'web/app/store')
-rw-r--r-- | web/app/store/AlarmTypes.js | 34 | ||||
-rw-r--r-- | web/app/store/AllMaintenances.js | 2 | ||||
-rw-r--r-- | web/app/store/CommonUserAttributes.js | 4 | ||||
-rw-r--r-- | web/app/store/KnownCommands.js | 9 | ||||
-rw-r--r-- | web/app/store/Maintenances.js | 2 | ||||
-rw-r--r-- | web/app/store/MapTypes.js | 3 |
6 files changed, 49 insertions, 5 deletions
diff --git a/web/app/store/AlarmTypes.js b/web/app/store/AlarmTypes.js new file mode 100644 index 0000000..1ee7ffe --- /dev/null +++ b/web/app/store/AlarmTypes.js @@ -0,0 +1,34 @@ +/* + * Copyright 2018 Anton Tananaev (anton@traccar.org) + * Copyright 2018 Andrey Kunitsyn (andrey@traccar.org) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +Ext.define('Traccar.store.AlarmTypes', { + extend: 'Ext.data.Store', + fields: ['key', 'name'], + + data: (function () { + var key, items = []; + for (key in Strings) { + if (Strings.hasOwnProperty(key) && key.lastIndexOf('alarm', 0) === 0) { + items.push({ + key: key.charAt(5).toLowerCase() + key.slice(6), + name: Strings[key] + }); + } + } + return items; + })() +}); diff --git a/web/app/store/AllMaintenances.js b/web/app/store/AllMaintenances.js index 745b5d6..8435ad4 100644 --- a/web/app/store/AllMaintenances.js +++ b/web/app/store/AllMaintenances.js @@ -22,7 +22,7 @@ Ext.define('Traccar.store.AllMaintenances', { proxy: { type: 'rest', - url: 'api/maintenances', + url: 'api/maintenance', extraParams: { all: true } diff --git a/web/app/store/CommonUserAttributes.js b/web/app/store/CommonUserAttributes.js index 0ee9e16..a8e9282 100644 --- a/web/app/store/CommonUserAttributes.js +++ b/web/app/store/CommonUserAttributes.js @@ -63,8 +63,8 @@ Ext.define('Traccar.store.CommonUserAttributes', { name: Strings.attributeUiDisableCalendars, valueType: 'boolean' }, { - key: 'ui.disableMaintenances', - name: Strings.attributeUiDisableMaintenances, + key: 'ui.disableMaintenance', + name: Strings.attributeUiDisableMaintenance, valueType: 'boolean' }, { key: 'ui.hidePositionAttributes', diff --git a/web/app/store/KnownCommands.js b/web/app/store/KnownCommands.js index 8bf2e24..1e82f2b 100644 --- a/web/app/store/KnownCommands.js +++ b/web/app/store/KnownCommands.js @@ -39,7 +39,7 @@ Ext.define('Traccar.store.KnownCommands', { }, { type: 'setTimezone', parameters: [{ - key: 'timezoneName', + key: 'timezone', name: Strings.commandTimezone, valueType: 'string', dataType: 'timezone' @@ -56,6 +56,13 @@ Ext.define('Traccar.store.KnownCommands', { valueType: 'string' }] }, { + type: 'message', + parameters: [{ + key: 'message', + name: Strings.commandMessage, + valueType: 'string' + }] + }, { type: 'sendUssd', parameters: [{ key: 'phone', diff --git a/web/app/store/Maintenances.js b/web/app/store/Maintenances.js index 43d6ba5..a7aa4a0 100644 --- a/web/app/store/Maintenances.js +++ b/web/app/store/Maintenances.js @@ -22,7 +22,7 @@ Ext.define('Traccar.store.Maintenances', { proxy: { type: 'rest', - url: 'api/maintenances', + url: 'api/maintenance', writer: { writeAllFields: true } diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js index 3d32243..88d54bf 100644 --- a/web/app/store/MapTypes.js +++ b/web/app/store/MapTypes.js @@ -49,5 +49,8 @@ Ext.define('Traccar.store.MapTypes', { }, { key: 'custom', name: Strings.mapCustom + }, { + key: 'customArcgis', + name: Strings.mapCustomArcgis }] }); |