aboutsummaryrefslogtreecommitdiff
path: root/legacy/web/app/store
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/web/app/store')
-rw-r--r--legacy/web/app/store/AlarmTypes.js34
-rw-r--r--legacy/web/app/store/AllCalendars.js30
-rw-r--r--legacy/web/app/store/AllCommandTypes.js32
-rw-r--r--legacy/web/app/store/AllCommands.js30
-rw-r--r--legacy/web/app/store/AllComputedAttributes.js30
-rw-r--r--legacy/web/app/store/AllDevices.js29
-rw-r--r--legacy/web/app/store/AllDrivers.js30
-rw-r--r--legacy/web/app/store/AllGeofences.js29
-rw-r--r--legacy/web/app/store/AllGroups.js29
-rw-r--r--legacy/web/app/store/AllMaintenances.js30
-rw-r--r--legacy/web/app/store/AllNotificationTypes.js32
-rw-r--r--legacy/web/app/store/AllNotifications.js29
-rw-r--r--legacy/web/app/store/AllNotificators.js32
-rw-r--r--legacy/web/app/store/AllTimezones.js798
-rw-r--r--legacy/web/app/store/AttributeValueTypes.js33
-rw-r--r--legacy/web/app/store/Attributes.js25
-rw-r--r--legacy/web/app/store/Calendars.js30
-rw-r--r--legacy/web/app/store/CommandTypes.js32
-rw-r--r--legacy/web/app/store/Commands.js30
-rw-r--r--legacy/web/app/store/CommonDeviceAttributes.js32
-rw-r--r--legacy/web/app/store/CommonUserAttributes.js90
-rw-r--r--legacy/web/app/store/ComputedAttributes.js30
-rw-r--r--legacy/web/app/store/CoordinateFormats.js56
-rw-r--r--legacy/web/app/store/DeviceAttributes.js52
-rw-r--r--legacy/web/app/store/DeviceCommands.js32
-rw-r--r--legacy/web/app/store/DeviceImages.js37
-rw-r--r--legacy/web/app/store/DeviceStatuses.js35
-rw-r--r--legacy/web/app/store/Devices.js29
-rw-r--r--legacy/web/app/store/DistanceUnits.js53
-rw-r--r--legacy/web/app/store/Drivers.js30
-rw-r--r--legacy/web/app/store/EventPositions.js31
-rw-r--r--legacy/web/app/store/Events.js29
-rw-r--r--legacy/web/app/store/GeofenceAttributes.js38
-rw-r--r--legacy/web/app/store/GeofenceTypes.js32
-rw-r--r--legacy/web/app/store/Geofences.js29
-rw-r--r--legacy/web/app/store/GroupAttributes.js32
-rw-r--r--legacy/web/app/store/Groups.js29
-rw-r--r--legacy/web/app/store/HoursUnits.js43
-rw-r--r--legacy/web/app/store/KnownCommands.js241
-rw-r--r--legacy/web/app/store/Languages.js34
-rw-r--r--legacy/web/app/store/LatestPositions.js21
-rw-r--r--legacy/web/app/store/MaintenanceTypes.js22
-rw-r--r--legacy/web/app/store/Maintenances.js30
-rw-r--r--legacy/web/app/store/MapTypes.js56
-rw-r--r--legacy/web/app/store/Notifications.js29
-rw-r--r--legacy/web/app/store/PositionAttributes.js269
-rw-r--r--legacy/web/app/store/Positions.js29
-rw-r--r--legacy/web/app/store/ReportChartTypes.js33
-rw-r--r--legacy/web/app/store/ReportEventTypes.js26
-rw-r--r--legacy/web/app/store/ReportEvents.js35
-rw-r--r--legacy/web/app/store/ReportPeriods.js45
-rw-r--r--legacy/web/app/store/ReportRoute.js35
-rw-r--r--legacy/web/app/store/ReportStops.js36
-rw-r--r--legacy/web/app/store/ReportSummary.js36
-rw-r--r--legacy/web/app/store/ReportTrips.js36
-rw-r--r--legacy/web/app/store/ReportTypes.js44
-rw-r--r--legacy/web/app/store/ServerAttributes.js23
-rw-r--r--legacy/web/app/store/SpeedUnits.js53
-rw-r--r--legacy/web/app/store/Statistics.js26
-rw-r--r--legacy/web/app/store/TimeUnits.js44
-rw-r--r--legacy/web/app/store/UserAttributes.js70
-rw-r--r--legacy/web/app/store/Users.js29
-rw-r--r--legacy/web/app/store/VisibleDevices.js22
-rw-r--r--legacy/web/app/store/VolumeUnits.js57
64 files changed, 3464 insertions, 0 deletions
diff --git a/legacy/web/app/store/AlarmTypes.js b/legacy/web/app/store/AlarmTypes.js
new file mode 100644
index 00000000..1ee7ffe8
--- /dev/null
+++ b/legacy/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/legacy/web/app/store/AllCalendars.js b/legacy/web/app/store/AllCalendars.js
new file mode 100644
index 00000000..26557287
--- /dev/null
+++ b/legacy/web/app/store/AllCalendars.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 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.AllCalendars', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Calendar',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/calendars',
+ extraParams: {
+ all: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllCommandTypes.js b/legacy/web/app/store/AllCommandTypes.js
new file mode 100644
index 00000000..c35f50d9
--- /dev/null
+++ b/legacy/web/app/store/AllCommandTypes.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2017 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 - 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.AllCommandTypes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownCommand',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/commands/types',
+ listeners: {
+ exception: function (proxy, response) {
+ Traccar.app.showError(response);
+ }
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllCommands.js b/legacy/web/app/store/AllCommands.js
new file mode 100644
index 00000000..7f5e1253
--- /dev/null
+++ b/legacy/web/app/store/AllCommands.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.AllCommands', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Command',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/commands',
+ extraParams: {
+ all: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllComputedAttributes.js b/legacy/web/app/store/AllComputedAttributes.js
new file mode 100644
index 00000000..e63feb14
--- /dev/null
+++ b/legacy/web/app/store/AllComputedAttributes.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.AllComputedAttributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.ComputedAttribute',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/attributes/computed',
+ extraParams: {
+ all: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllDevices.js b/legacy/web/app/store/AllDevices.js
new file mode 100644
index 00000000..338e6be7
--- /dev/null
+++ b/legacy/web/app/store/AllDevices.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.AllDevices', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Device',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/devices',
+ extraParams: {
+ all: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllDrivers.js b/legacy/web/app/store/AllDrivers.js
new file mode 100644
index 00000000..9d723885
--- /dev/null
+++ b/legacy/web/app/store/AllDrivers.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.AllDrivers', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Driver',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/drivers',
+ extraParams: {
+ all: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllGeofences.js b/legacy/web/app/store/AllGeofences.js
new file mode 100644
index 00000000..4042732b
--- /dev/null
+++ b/legacy/web/app/store/AllGeofences.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@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.AllGeofences', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Geofence',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/geofences',
+ extraParams: {
+ all: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllGroups.js b/legacy/web/app/store/AllGroups.js
new file mode 100644
index 00000000..ba02e715
--- /dev/null
+++ b/legacy/web/app/store/AllGroups.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@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.AllGroups', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Group',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/groups',
+ extraParams: {
+ all: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllMaintenances.js b/legacy/web/app/store/AllMaintenances.js
new file mode 100644
index 00000000..8435ad40
--- /dev/null
+++ b/legacy/web/app/store/AllMaintenances.js
@@ -0,0 +1,30 @@
+/*
+ * 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.AllMaintenances', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Maintenance',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/maintenance',
+ extraParams: {
+ all: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllNotificationTypes.js b/legacy/web/app/store/AllNotificationTypes.js
new file mode 100644
index 00000000..63fec1bc
--- /dev/null
+++ b/legacy/web/app/store/AllNotificationTypes.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2017 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 - 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.AllNotificationTypes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownNotification',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/notifications/types',
+ listeners: {
+ exception: function (proxy, response) {
+ Traccar.app.showError(response);
+ }
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllNotifications.js b/legacy/web/app/store/AllNotifications.js
new file mode 100644
index 00000000..a3e59e15
--- /dev/null
+++ b/legacy/web/app/store/AllNotifications.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.AllNotifications', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Notification',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/notifications',
+ extraParams: {
+ all: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllNotificators.js b/legacy/web/app/store/AllNotificators.js
new file mode 100644
index 00000000..d81b02fd
--- /dev/null
+++ b/legacy/web/app/store/AllNotificators.js
@@ -0,0 +1,32 @@
+/*
+ * 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.AllNotificators', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownNotificator',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/notifications/notificators',
+ listeners: {
+ exception: function (proxy, response) {
+ Traccar.app.showError(response);
+ }
+ }
+ }
+});
diff --git a/legacy/web/app/store/AllTimezones.js b/legacy/web/app/store/AllTimezones.js
new file mode 100644
index 00000000..2a7fa371
--- /dev/null
+++ b/legacy/web/app/store/AllTimezones.js
@@ -0,0 +1,798 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.AllTimezones', {
+ extend: 'Ext.data.Store',
+ fields: ['key'],
+
+ sorters: {
+ property: 'key',
+ direction: 'ASC'
+ },
+
+ data: [{
+ key: 'Africa/Abidjan'
+ }, {
+ key: 'Africa/Accra'
+ }, {
+ key: 'Africa/Bissau'
+ }, {
+ key: 'Africa/Casablanca'
+ }, {
+ key: 'Africa/El_Aaiun'
+ }, {
+ key: 'Africa/Monrovia'
+ }, {
+ key: 'America/Danmarkshavn'
+ }, {
+ key: 'Antarctica/Troll'
+ }, {
+ key: 'Atlantic/Canary'
+ }, {
+ key: 'Atlantic/Faroe'
+ }, {
+ key: 'Atlantic/Madeira'
+ }, {
+ key: 'Atlantic/Reykjavik'
+ }, {
+ key: 'GMT'
+ }, {
+ key: 'Etc/GMT'
+ }, {
+ key: 'Etc/UCT'
+ }, {
+ key: 'Etc/UTC'
+ }, {
+ key: 'Europe/Dublin'
+ }, {
+ key: 'Europe/Lisbon'
+ }, {
+ key: 'Europe/London'
+ }, {
+ key: 'WET'
+ }, {
+ key: 'Africa/Algiers'
+ }, {
+ key: 'Africa/Ceuta'
+ }, {
+ key: 'Africa/Lagos'
+ }, {
+ key: 'Africa/Ndjamena'
+ }, {
+ key: 'Africa/Tunis'
+ }, {
+ key: 'Africa/Windhoek'
+ }, {
+ key: 'CET'
+ }, {
+ key: 'Etc/GMT-1'
+ }, {
+ key: 'Europe/Amsterdam'
+ }, {
+ key: 'Europe/Andorra'
+ }, {
+ key: 'Europe/Belgrade'
+ }, {
+ key: 'Europe/Berlin'
+ }, {
+ key: 'Europe/Brussels'
+ }, {
+ key: 'Europe/Budapest'
+ }, {
+ key: 'Europe/Copenhagen'
+ }, {
+ key: 'Europe/Gibraltar'
+ }, {
+ key: 'Europe/Luxembourg'
+ }, {
+ key: 'Europe/Madrid'
+ }, {
+ key: 'Europe/Malta'
+ }, {
+ key: 'Europe/Monaco'
+ }, {
+ key: 'Europe/Oslo'
+ }, {
+ key: 'Europe/Paris'
+ }, {
+ key: 'Europe/Prague'
+ }, {
+ key: 'Europe/Rome'
+ }, {
+ key: 'Europe/Stockholm'
+ }, {
+ key: 'Europe/Tirane'
+ }, {
+ key: 'Europe/Vienna'
+ }, {
+ key: 'Europe/Warsaw'
+ }, {
+ key: 'Europe/Zurich'
+ }, {
+ key: 'MET'
+ }, {
+ key: 'Africa/Cairo'
+ }, {
+ key: 'Africa/Johannesburg'
+ }, {
+ key: 'Africa/Maputo'
+ }, {
+ key: 'Africa/Tripoli'
+ }, {
+ key: 'Asia/Amman'
+ }, {
+ key: 'Asia/Beirut'
+ }, {
+ key: 'Asia/Damascus'
+ }, {
+ key: 'Asia/Gaza'
+ }, {
+ key: 'Asia/Hebron'
+ }, {
+ key: 'Asia/Jerusalem'
+ }, {
+ key: 'Asia/Nicosia'
+ }, {
+ key: 'EET'
+ }, {
+ key: 'Etc/GMT-2'
+ }, {
+ key: 'Europe/Athens'
+ }, {
+ key: 'Europe/Bucharest'
+ }, {
+ key: 'Europe/Chisinau'
+ }, {
+ key: 'Europe/Helsinki'
+ }, {
+ key: 'Europe/Kaliningrad'
+ }, {
+ key: 'Europe/Kiev'
+ }, {
+ key: 'Europe/Riga'
+ }, {
+ key: 'Europe/Sofia'
+ }, {
+ key: 'Europe/Tallinn'
+ }, {
+ key: 'Europe/Uzhgorod'
+ }, {
+ key: 'Europe/Vilnius'
+ }, {
+ key: 'Europe/Zaporozhye'
+ }, {
+ key: 'Africa/Khartoum'
+ }, {
+ key: 'Africa/Nairobi'
+ }, {
+ key: 'Antarctica/Syowa'
+ }, {
+ key: 'Asia/Baghdad'
+ }, {
+ key: 'Asia/Famagusta'
+ }, {
+ key: 'Asia/Qatar'
+ }, {
+ key: 'Asia/Riyadh'
+ }, {
+ key: 'Etc/GMT-3'
+ }, {
+ key: 'Europe/Istanbul'
+ }, {
+ key: 'Europe/Kirov'
+ }, {
+ key: 'Europe/Minsk'
+ }, {
+ key: 'Europe/Moscow'
+ }, {
+ key: 'Europe/Simferopol'
+ }, {
+ key: 'Europe/Volgograd'
+ }, {
+ key: 'Asia/Tehran'
+ }, {
+ key: 'Asia/Baku'
+ }, {
+ key: 'Asia/Dubai'
+ }, {
+ key: 'Asia/Tbilisi'
+ }, {
+ key: 'Asia/Yerevan'
+ }, {
+ key: 'Etc/GMT-4'
+ }, {
+ key: 'Europe/Astrakhan'
+ }, {
+ key: 'Europe/Samara'
+ }, {
+ key: 'Europe/Saratov'
+ }, {
+ key: 'Europe/Ulyanovsk'
+ }, {
+ key: 'Indian/Mahe'
+ }, {
+ key: 'Indian/Mauritius'
+ }, {
+ key: 'Indian/Reunion'
+ }, {
+ key: 'Asia/Kabul'
+ }, {
+ key: 'Antarctica/Mawson'
+ }, {
+ key: 'Asia/Aqtau'
+ }, {
+ key: 'Asia/Aqtobe'
+ }, {
+ key: 'Asia/Ashgabat'
+ }, {
+ key: 'Asia/Atyrau'
+ }, {
+ key: 'Asia/Dushanbe'
+ }, {
+ key: 'Asia/Karachi'
+ }, {
+ key: 'Asia/Oral'
+ }, {
+ key: 'Asia/Samarkand'
+ }, {
+ key: 'Asia/Tashkent'
+ }, {
+ key: 'Asia/Yekaterinburg'
+ }, {
+ key: 'Etc/GMT-5'
+ }, {
+ key: 'Indian/Kerguelen'
+ }, {
+ key: 'Indian/Maldives'
+ }, {
+ key: 'Asia/Colombo'
+ }, {
+ key: 'Asia/Kolkata'
+ }, {
+ key: 'Asia/Kathmandu'
+ }, {
+ key: 'Antarctica/Vostok'
+ }, {
+ key: 'Asia/Almaty'
+ }, {
+ key: 'Asia/Bishkek'
+ }, {
+ key: 'Asia/Dhaka'
+ }, {
+ key: 'Asia/Omsk'
+ }, {
+ key: 'Asia/Qyzylorda'
+ }, {
+ key: 'Asia/Thimphu'
+ }, {
+ key: 'Asia/Urumqi'
+ }, {
+ key: 'Etc/GMT-6'
+ }, {
+ key: 'Indian/Chagos'
+ }, {
+ key: 'Asia/Yangon'
+ }, {
+ key: 'Indian/Cocos'
+ }, {
+ key: 'Antarctica/Davis'
+ }, {
+ key: 'Asia/Bangkok'
+ }, {
+ key: 'Asia/Barnaul'
+ }, {
+ key: 'Asia/Ho_Chi_Minh'
+ }, {
+ key: 'Asia/Hovd'
+ }, {
+ key: 'Asia/Jakarta'
+ }, {
+ key: 'Asia/Krasnoyarsk'
+ }, {
+ key: 'Asia/Novokuznetsk'
+ }, {
+ key: 'Asia/Novosibirsk'
+ }, {
+ key: 'Asia/Pontianak'
+ }, {
+ key: 'Asia/Tomsk'
+ }, {
+ key: 'Etc/GMT-7'
+ }, {
+ key: 'Indian/Christmas'
+ }, {
+ key: 'Asia/Brunei'
+ }, {
+ key: 'Asia/Choibalsan'
+ }, {
+ key: 'Asia/Hong_Kong'
+ }, {
+ key: 'Asia/Irkutsk'
+ }, {
+ key: 'Asia/Kuala_Lumpur'
+ }, {
+ key: 'Asia/Kuching'
+ }, {
+ key: 'Asia/Macau'
+ }, {
+ key: 'Asia/Makassar'
+ }, {
+ key: 'Asia/Manila'
+ }, {
+ key: 'Asia/Shanghai'
+ }, {
+ key: 'Asia/Singapore'
+ }, {
+ key: 'Asia/Taipei'
+ }, {
+ key: 'Asia/Ulaanbaatar'
+ }, {
+ key: 'Australia/Perth'
+ }, {
+ key: 'Etc/GMT-8'
+ }, {
+ key: 'Asia/Pyongyang'
+ }, {
+ key: 'Australia/Eucla'
+ }, {
+ key: 'Asia/Chita'
+ }, {
+ key: 'Asia/Dili'
+ }, {
+ key: 'Asia/Jayapura'
+ }, {
+ key: 'Asia/Khandyga'
+ }, {
+ key: 'Asia/Seoul'
+ }, {
+ key: 'Asia/Tokyo'
+ }, {
+ key: 'Asia/Yakutsk'
+ }, {
+ key: 'Etc/GMT-9'
+ }, {
+ key: 'Pacific/Palau'
+ }, {
+ key: 'Australia/Adelaide'
+ }, {
+ key: 'Australia/Broken_Hill'
+ }, {
+ key: 'Australia/Darwin'
+ }, {
+ key: 'Antarctica/DumontDUrville'
+ }, {
+ key: 'Asia/Ust-Nera'
+ }, {
+ key: 'Asia/Vladivostok'
+ }, {
+ key: 'Australia/Brisbane'
+ }, {
+ key: 'Australia/Currie'
+ }, {
+ key: 'Australia/Hobart'
+ }, {
+ key: 'Australia/Lindeman'
+ }, {
+ key: 'Australia/Melbourne'
+ }, {
+ key: 'Australia/Sydney'
+ }, {
+ key: 'Etc/GMT-10'
+ }, {
+ key: 'Pacific/Chuuk'
+ }, {
+ key: 'Pacific/Guam'
+ }, {
+ key: 'Pacific/Port_Moresby'
+ }, {
+ key: 'Australia/Lord_Howe'
+ }, {
+ key: 'Antarctica/Casey'
+ }, {
+ key: 'Antarctica/Macquarie'
+ }, {
+ key: 'Asia/Magadan'
+ }, {
+ key: 'Asia/Sakhalin'
+ }, {
+ key: 'Asia/Srednekolymsk'
+ }, {
+ key: 'Etc/GMT-11'
+ }, {
+ key: 'Pacific/Bougainville'
+ }, {
+ key: 'Pacific/Efate'
+ }, {
+ key: 'Pacific/Guadalcanal'
+ }, {
+ key: 'Pacific/Kosrae'
+ }, {
+ key: 'Pacific/Norfolk'
+ }, {
+ key: 'Pacific/Noumea'
+ }, {
+ key: 'Pacific/Pohnpei'
+ }, {
+ key: 'Asia/Anadyr'
+ }, {
+ key: 'Asia/Kamchatka'
+ }, {
+ key: 'Etc/GMT-12'
+ }, {
+ key: 'Pacific/Auckland'
+ }, {
+ key: 'Pacific/Fiji'
+ }, {
+ key: 'Pacific/Funafuti'
+ }, {
+ key: 'Pacific/Kwajalein'
+ }, {
+ key: 'Pacific/Majuro'
+ }, {
+ key: 'Pacific/Nauru'
+ }, {
+ key: 'Pacific/Tarawa'
+ }, {
+ key: 'Pacific/Wake'
+ }, {
+ key: 'Pacific/Wallis'
+ }, {
+ key: 'Pacific/Chatham'
+ }, {
+ key: 'Etc/GMT-13'
+ }, {
+ key: 'Pacific/Apia'
+ }, {
+ key: 'Pacific/Enderbury'
+ }, {
+ key: 'Pacific/Fakaofo'
+ }, {
+ key: 'Pacific/Tongatapu'
+ }, {
+ key: 'Etc/GMT-14'
+ }, {
+ key: 'Pacific/Kiritimati'
+ }, {
+ key: 'America/Scoresbysund'
+ }, {
+ key: 'Atlantic/Azores'
+ }, {
+ key: 'Atlantic/Cape_Verde'
+ }, {
+ key: 'Etc/GMT+1'
+ }, {
+ key: 'America/Noronha'
+ }, {
+ key: 'Atlantic/South_Georgia'
+ }, {
+ key: 'Etc/GMT+2'
+ }, {
+ key: 'America/Araguaina'
+ }, {
+ key: 'America/Argentina/Buenos_Aires'
+ }, {
+ key: 'America/Argentina/Catamarca'
+ }, {
+ key: 'America/Argentina/Cordoba'
+ }, {
+ key: 'America/Argentina/Jujuy'
+ }, {
+ key: 'America/Argentina/La_Rioja'
+ }, {
+ key: 'America/Argentina/Mendoza'
+ }, {
+ key: 'America/Argentina/Rio_Gallegos'
+ }, {
+ key: 'America/Argentina/Salta'
+ }, {
+ key: 'America/Argentina/San_Juan'
+ }, {
+ key: 'America/Argentina/San_Luis'
+ }, {
+ key: 'America/Argentina/Tucuman'
+ }, {
+ key: 'America/Argentina/Ushuaia'
+ }, {
+ key: 'America/Bahia'
+ }, {
+ key: 'America/Belem'
+ }, {
+ key: 'America/Cayenne'
+ }, {
+ key: 'America/Fortaleza'
+ }, {
+ key: 'America/Godthab'
+ }, {
+ key: 'America/Maceio'
+ }, {
+ key: 'America/Miquelon'
+ }, {
+ key: 'America/Montevideo'
+ }, {
+ key: 'America/Paramaribo'
+ }, {
+ key: 'America/Recife'
+ }, {
+ key: 'America/Santarem'
+ }, {
+ key: 'America/Sao_Paulo'
+ }, {
+ key: 'Antarctica/Rothera'
+ }, {
+ key: 'Atlantic/Stanley'
+ }, {
+ key: 'Etc/GMT+3'
+ }, {
+ key: 'America/St_Johns'
+ }, {
+ key: 'America/Asuncion'
+ }, {
+ key: 'America/Barbados'
+ }, {
+ key: 'America/Blanc-Sablon'
+ }, {
+ key: 'America/Boa_Vista'
+ }, {
+ key: 'America/Campo_Grande'
+ }, {
+ key: 'America/Caracas'
+ }, {
+ key: 'America/Cuiaba'
+ }, {
+ key: 'America/Curacao'
+ }, {
+ key: 'America/Glace_Bay'
+ }, {
+ key: 'America/Goose_Bay'
+ }, {
+ key: 'America/Grand_Turk'
+ }, {
+ key: 'America/Guyana'
+ }, {
+ key: 'America/Halifax'
+ }, {
+ key: 'America/La_Paz'
+ }, {
+ key: 'America/Manaus'
+ }, {
+ key: 'America/Martinique'
+ }, {
+ key: 'America/Moncton'
+ }, {
+ key: 'America/Port_of_Spain'
+ }, {
+ key: 'America/Porto_Velho'
+ }, {
+ key: 'America/Puerto_Rico'
+ }, {
+ key: 'America/Santiago'
+ }, {
+ key: 'America/Santo_Domingo'
+ }, {
+ key: 'America/Thule'
+ }, {
+ key: 'Antarctica/Palmer'
+ }, {
+ key: 'Atlantic/Bermuda'
+ }, {
+ key: 'Etc/GMT+4'
+ }, {
+ key: 'America/Atikokan'
+ }, {
+ key: 'America/Bogota'
+ }, {
+ key: 'America/Cancun'
+ }, {
+ key: 'America/Detroit'
+ }, {
+ key: 'America/Eirunepe'
+ }, {
+ key: 'America/Guayaquil'
+ }, {
+ key: 'America/Havana'
+ }, {
+ key: 'America/Indiana/Indianapolis'
+ }, {
+ key: 'America/Indiana/Marengo'
+ }, {
+ key: 'America/Indiana/Petersburg'
+ }, {
+ key: 'America/Indiana/Vevay'
+ }, {
+ key: 'America/Indiana/Vincennes'
+ }, {
+ key: 'America/Indiana/Winamac'
+ }, {
+ key: 'America/Iqaluit'
+ }, {
+ key: 'America/Jamaica'
+ }, {
+ key: 'America/Kentucky/Louisville'
+ }, {
+ key: 'America/Kentucky/Monticello'
+ }, {
+ key: 'America/Lima'
+ }, {
+ key: 'America/Nassau'
+ }, {
+ key: 'America/New_York'
+ }, {
+ key: 'America/Nipigon'
+ }, {
+ key: 'America/Panama'
+ }, {
+ key: 'America/Pangnirtung'
+ }, {
+ key: 'America/Port-au-Prince'
+ }, {
+ key: 'America/Rio_Branco'
+ }, {
+ key: 'America/Thunder_Bay'
+ }, {
+ key: 'America/Toronto'
+ }, {
+ key: 'EST'
+ }, {
+ key: 'EST5EDT'
+ }, {
+ key: 'Etc/GMT+5'
+ }, {
+ key: 'America/Bahia_Banderas'
+ }, {
+ key: 'America/Belize'
+ }, {
+ key: 'America/Chicago'
+ }, {
+ key: 'America/Costa_Rica'
+ }, {
+ key: 'America/El_Salvador'
+ }, {
+ key: 'America/Guatemala'
+ }, {
+ key: 'America/Indiana/Knox'
+ }, {
+ key: 'America/Indiana/Tell_City'
+ }, {
+ key: 'America/Managua'
+ }, {
+ key: 'America/Matamoros'
+ }, {
+ key: 'America/Menominee'
+ }, {
+ key: 'America/Merida'
+ }, {
+ key: 'America/Mexico_City'
+ }, {
+ key: 'America/Monterrey'
+ }, {
+ key: 'America/North_Dakota/Beulah'
+ }, {
+ key: 'America/North_Dakota/Center'
+ }, {
+ key: 'America/North_Dakota/New_Salem'
+ }, {
+ key: 'America/Rainy_River'
+ }, {
+ key: 'America/Rankin_Inlet'
+ }, {
+ key: 'America/Regina'
+ }, {
+ key: 'America/Resolute'
+ }, {
+ key: 'America/Swift_Current'
+ }, {
+ key: 'America/Tegucigalpa'
+ }, {
+ key: 'America/Winnipeg'
+ }, {
+ key: 'CST6CDT'
+ }, {
+ key: 'Etc/GMT+6'
+ }, {
+ key: 'Pacific/Easter'
+ }, {
+ key: 'Pacific/Galapagos'
+ }, {
+ key: 'America/Boise'
+ }, {
+ key: 'America/Cambridge_Bay'
+ }, {
+ key: 'America/Chihuahua'
+ }, {
+ key: 'America/Creston'
+ }, {
+ key: 'America/Dawson_Creek'
+ }, {
+ key: 'America/Denver'
+ }, {
+ key: 'America/Edmonton'
+ }, {
+ key: 'America/Fort_Nelson'
+ }, {
+ key: 'America/Hermosillo'
+ }, {
+ key: 'America/Inuvik'
+ }, {
+ key: 'America/Mazatlan'
+ }, {
+ key: 'America/Ojinaga'
+ }, {
+ key: 'America/Phoenix'
+ }, {
+ key: 'America/Yellowknife'
+ }, {
+ key: 'Etc/GMT+7'
+ }, {
+ key: 'MST'
+ }, {
+ key: 'MST7MDT'
+ }, {
+ key: 'America/Dawson'
+ }, {
+ key: 'America/Los_Angeles'
+ }, {
+ key: 'America/Tijuana'
+ }, {
+ key: 'America/Vancouver'
+ }, {
+ key: 'America/Whitehorse'
+ }, {
+ key: 'Etc/GMT+8'
+ }, {
+ key: 'Pacific/Pitcairn'
+ }, {
+ key: 'PST8PDT'
+ }, {
+ key: 'America/Anchorage'
+ }, {
+ key: 'America/Juneau'
+ }, {
+ key: 'America/Metlakatla'
+ }, {
+ key: 'America/Nome'
+ }, {
+ key: 'America/Sitka'
+ }, {
+ key: 'America/Yakutat'
+ }, {
+ key: 'Etc/GMT+9'
+ }, {
+ key: 'Pacific/Gambier'
+ }, {
+ key: 'Pacific/Marquesas'
+ }, {
+ key: 'America/Adak'
+ }, {
+ key: 'Etc/GMT+10'
+ }, {
+ key: 'HST'
+ }, {
+ key: 'Pacific/Honolulu'
+ }, {
+ key: 'Pacific/Rarotonga'
+ }, {
+ key: 'Pacific/Tahiti'
+ }, {
+ key: 'Etc/GMT+11'
+ }, {
+ key: 'Pacific/Niue'
+ }, {
+ key: 'Pacific/Pago_Pago'
+ }, {
+ key: 'Etc/GMT+12'
+ }]
+});
diff --git a/legacy/web/app/store/AttributeValueTypes.js b/legacy/web/app/store/AttributeValueTypes.js
new file mode 100644
index 00000000..b80eba39
--- /dev/null
+++ b/legacy/web/app/store/AttributeValueTypes.js
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.AttributeValueTypes', {
+ extend: 'Ext.data.Store',
+ fields: ['id', 'name'],
+ proxy: 'memory',
+
+ data: [{
+ id: 'string',
+ name: Strings.sharedTypeString
+ }, {
+ id: 'number',
+ name: Strings.sharedTypeNumber
+ }, {
+ id: 'boolean',
+ name: Strings.sharedTypeBoolean
+ }]
+});
diff --git a/legacy/web/app/store/Attributes.js b/legacy/web/app/store/Attributes.js
new file mode 100644
index 00000000..388fa436
--- /dev/null
+++ b/legacy/web/app/store/Attributes.js
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.Attributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Attribute',
+
+ sorters: [{
+ property: 'priority'
+ }]
+});
diff --git a/legacy/web/app/store/Calendars.js b/legacy/web/app/store/Calendars.js
new file mode 100644
index 00000000..fa8e5c66
--- /dev/null
+++ b/legacy/web/app/store/Calendars.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 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.Calendars', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Calendar',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/calendars',
+ writer: {
+ writeAllFields: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/CommandTypes.js b/legacy/web/app/store/CommandTypes.js
new file mode 100644
index 00000000..3b898f2e
--- /dev/null
+++ b/legacy/web/app/store/CommandTypes.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2016 Gabor Somogyi (gabor.g.somogyi@gmail.com)
+ * Copyright 2017 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.CommandTypes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownCommand',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/commands/types',
+ listeners: {
+ 'exception': function (proxy, response) {
+ Traccar.app.showError(response);
+ }
+ }
+ }
+});
diff --git a/legacy/web/app/store/Commands.js b/legacy/web/app/store/Commands.js
new file mode 100644
index 00000000..3e5b7604
--- /dev/null
+++ b/legacy/web/app/store/Commands.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.Commands', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Command',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/commands',
+ writer: {
+ writeAllFields: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/CommonDeviceAttributes.js b/legacy/web/app/store/CommonDeviceAttributes.js
new file mode 100644
index 00000000..e63daa6b
--- /dev/null
+++ b/legacy/web/app/store/CommonDeviceAttributes.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.CommonDeviceAttributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownAttribute',
+
+ data: [{
+ key: 'speedLimit',
+ name: Strings.attributeSpeedLimit,
+ valueType: 'number',
+ dataType: 'speed'
+ }, {
+ key: 'report.ignoreOdometer',
+ name: Strings.attributeReportIgnoreOdometer,
+ valueType: 'boolean'
+ }]
+});
diff --git a/legacy/web/app/store/CommonUserAttributes.js b/legacy/web/app/store/CommonUserAttributes.js
new file mode 100644
index 00000000..0619df22
--- /dev/null
+++ b/legacy/web/app/store/CommonUserAttributes.js
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2017 - 2022 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.CommonUserAttributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownAttribute',
+
+ data: [{
+ key: 'web.liveRouteLength',
+ name: Strings.attributeWebLiveRouteLength,
+ valueType: 'number',
+ allowDecimals: false
+ }, {
+ key: 'web.selectZoom',
+ name: Strings.attributeWebSelectZoom,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: Traccar.Style.mapDefaultZoom,
+ maxValue: Traccar.Style.mapMaxZoom
+ }, {
+ key: 'web.maxZoom',
+ name: Strings.attributeWebMaxZoom,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: Traccar.Style.mapDefaultZoom,
+ maxValue: Traccar.Style.mapMaxZoom
+ }, {
+ key: 'ui.disableEvents',
+ name: Strings.attributeUiDisableEvents,
+ valueType: 'boolean'
+ }, {
+ key: 'ui.disableVehicleFeatures',
+ name: Strings.attributeUiDisableVehicleFeatures,
+ valueType: 'boolean'
+ }, {
+ key: 'ui.disableDrivers',
+ name: Strings.attributeUiDisableDrivers,
+ valueType: 'boolean'
+ }, {
+ key: 'ui.disableComputedAttributes',
+ name: Strings.attributeUiDisableComputedAttributes,
+ valueType: 'boolean'
+ }, {
+ key: 'ui.disableCalendars',
+ name: Strings.attributeUiDisableCalendars,
+ valueType: 'boolean'
+ }, {
+ key: 'ui.disableMaintenance',
+ name: Strings.attributeUiDisableMaintenance,
+ valueType: 'boolean'
+ }, {
+ key: 'ui.hidePositionAttributes',
+ name: Strings.attributeUiHidePositionAttributes,
+ valueType: 'string'
+ }, {
+ key: 'distanceUnit',
+ name: Strings.settingsDistanceUnit,
+ valueType: 'string',
+ dataType: 'distanceUnit'
+ }, {
+ key: 'speedUnit',
+ name: Strings.settingsSpeedUnit,
+ valueType: 'string',
+ dataType: 'speedUnit'
+ }, {
+ key: 'volumeUnit',
+ name: Strings.settingsVolumeUnit,
+ valueType: 'string',
+ dataType: 'volumeUnit'
+ }, {
+ key: 'timezone',
+ name: Strings.sharedTimezone,
+ valueType: 'string',
+ dataType: 'timezone'
+ }]
+});
diff --git a/legacy/web/app/store/ComputedAttributes.js b/legacy/web/app/store/ComputedAttributes.js
new file mode 100644
index 00000000..33d78298
--- /dev/null
+++ b/legacy/web/app/store/ComputedAttributes.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.ComputedAttributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.ComputedAttribute',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/attributes/computed',
+ writer: {
+ writeAllFields: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/CoordinateFormats.js b/legacy/web/app/store/CoordinateFormats.js
new file mode 100644
index 00000000..d5db871a
--- /dev/null
+++ b/legacy/web/app/store/CoordinateFormats.js
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@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.CoordinateFormats', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name'],
+
+ data: [{
+ key: 'dd',
+ name: Strings.sharedDecimalDegrees
+ }, {
+ key: 'ddm',
+ name: Strings.sharedDegreesDecimalMinutes
+ }, {
+ key: 'dms',
+ name: Strings.sharedDegreesMinutesSeconds
+ }],
+
+ formatValue: function (key, value, unit) {
+ var hemisphere, degrees, minutes, seconds;
+ if (key === 'latitude') {
+ hemisphere = value >= 0 ? 'N' : 'S';
+ } else {
+ hemisphere = value >= 0 ? 'E' : 'W';
+ }
+ switch (unit) {
+ case 'ddm':
+ value = Math.abs(value);
+ degrees = Math.floor(value);
+ minutes = (value - degrees) * 60;
+ return degrees + '° ' + minutes.toFixed(Traccar.Style.coordinatePrecision) + '\' ' + hemisphere;
+ case 'dms':
+ value = Math.abs(value);
+ degrees = Math.floor(value);
+ minutes = Math.floor((value - degrees) * 60);
+ seconds = Math.round((value - degrees - minutes / 60) * 3600);
+ return degrees + '° ' + minutes + '\' ' + seconds + '" ' + hemisphere;
+ default:
+ return value.toFixed(Traccar.Style.coordinatePrecision) + '°';
+ }
+ }
+});
diff --git a/legacy/web/app/store/DeviceAttributes.js b/legacy/web/app/store/DeviceAttributes.js
new file mode 100644
index 00000000..45ae6e3d
--- /dev/null
+++ b/legacy/web/app/store/DeviceAttributes.js
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.DeviceAttributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownAttribute',
+
+ data: [{
+ key: 'web.reportColor',
+ name: Strings.attributeWebReportColor,
+ valueType: 'color'
+ }, {
+ key: 'devicePassword',
+ name: Strings.attributeDevicePassword,
+ valueType: 'string'
+ }, {
+ key: 'processing.copyAttributes',
+ name: Strings.attributeProcessingCopyAttributes,
+ valueType: 'string'
+ }, {
+ key: 'decoder.timezone',
+ name: Strings.sharedTimezone,
+ valueType: 'string',
+ dataType: 'timezone'
+ }, {
+ key: 'deviceInactivityStart',
+ name: Strings.attributeDeviceInactivityStart,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: 1
+ }, {
+ key: 'deviceInactivityPeriod',
+ name: Strings.attributeDeviceInactivityPeriod,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: 1
+ }]
+});
diff --git a/legacy/web/app/store/DeviceCommands.js b/legacy/web/app/store/DeviceCommands.js
new file mode 100644
index 00000000..7233b3ba
--- /dev/null
+++ b/legacy/web/app/store/DeviceCommands.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.DeviceCommands', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Command',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/commands/send',
+ listeners: {
+ 'exception': function (proxy, response) {
+ Traccar.app.showError(response);
+ }
+ }
+ }
+});
diff --git a/legacy/web/app/store/DeviceImages.js b/legacy/web/app/store/DeviceImages.js
new file mode 100644
index 00000000..6f8e8cfd
--- /dev/null
+++ b/legacy/web/app/store/DeviceImages.js
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 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.DeviceImages', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name', 'svg', 'fillId', 'rotateId', 'scaleId'],
+
+ data: (function () {
+ var i, key, data = [];
+ for (i = 0; i < window.Images.length; i++) {
+ key = window.Images[i];
+ data.push({
+ key: key,
+ name: Strings['category' + key.charAt(0).toUpperCase() + key.slice(1)],
+ svg: document.getElementById(key + 'Svg').contentDocument,
+ fillId: key === 'arrow' ? 'arrow' : 'background',
+ rotateId: key === 'arrow' ? 'arrow' : 'background',
+ scaleId: key === 'arrow' ? 'arrow' : 'layer1'
+ });
+ }
+ return data;
+ })()
+});
diff --git a/legacy/web/app/store/DeviceStatuses.js b/legacy/web/app/store/DeviceStatuses.js
new file mode 100644
index 00000000..eafba241
--- /dev/null
+++ b/legacy/web/app/store/DeviceStatuses.js
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.DeviceStatuses', {
+ extend: 'Ext.data.Store',
+ fields: ['id', 'name', 'color'],
+
+ data: [{
+ id: 'online',
+ name: Strings.deviceStatusOnline,
+ color: 'view-color-green'
+ }, {
+ id: 'offline',
+ name: Strings.deviceStatusOffline,
+ color: 'view-color-red'
+ }, {
+ id: 'unknown',
+ name: Strings.deviceStatusUnknown,
+ color: 'view-color-yellow'
+ }]
+});
diff --git a/legacy/web/app/store/Devices.js b/legacy/web/app/store/Devices.js
new file mode 100644
index 00000000..e69c93fa
--- /dev/null
+++ b/legacy/web/app/store/Devices.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.Devices', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Device',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/devices',
+ writer: {
+ writeAllFields: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/DistanceUnits.js b/legacy/web/app/store/DistanceUnits.js
new file mode 100644
index 00000000..e64ce234
--- /dev/null
+++ b/legacy/web/app/store/DistanceUnits.js
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2015 - 2016 Anton Tananaev (anton@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.DistanceUnits', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name', 'factor'],
+
+ data: [{
+ key: 'km',
+ name: Strings.sharedKm,
+ factor: 0.001
+ }, {
+ key: 'mi',
+ name: Strings.sharedMi,
+ factor: 0.000621371
+ }, {
+ key: 'nmi',
+ name: Strings.sharedNmi,
+ factor: 0.000539957
+ }],
+
+ convertValue: function (value, unit, back) {
+ var model;
+ if (!unit) {
+ unit = 'km';
+ }
+ model = this.findRecord('key', unit);
+ return back ? value / model.get('factor') : value * model.get('factor');
+ },
+
+ formatValue: function (value, unit, convert) {
+ var model;
+ if (!unit) {
+ unit = 'km';
+ }
+ model = this.findRecord('key', unit);
+ return (convert ? this.convertValue(value, unit) : value).toFixed(2) + ' ' + model.get('name');
+ }
+});
diff --git a/legacy/web/app/store/Drivers.js b/legacy/web/app/store/Drivers.js
new file mode 100644
index 00000000..fd4ca203
--- /dev/null
+++ b/legacy/web/app/store/Drivers.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.Drivers', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Driver',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/drivers',
+ writer: {
+ writeAllFields: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/EventPositions.js b/legacy/web/app/store/EventPositions.js
new file mode 100644
index 00000000..d984e4b8
--- /dev/null
+++ b/legacy/web/app/store/EventPositions.js
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.EventPositions', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Position',
+
+ trackRemoved: false,
+
+ proxy: {
+ type: 'rest',
+ url: 'api/positions',
+ headers: {
+ 'Accept': 'application/json'
+ }
+ }
+});
diff --git a/legacy/web/app/store/Events.js b/legacy/web/app/store/Events.js
new file mode 100644
index 00000000..cfa0d568
--- /dev/null
+++ b/legacy/web/app/store/Events.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.Events', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Event',
+
+ trackRemoved: false,
+
+ proxy: {
+ type: 'rest',
+ url: 'api/events'
+ }
+});
diff --git a/legacy/web/app/store/GeofenceAttributes.js b/legacy/web/app/store/GeofenceAttributes.js
new file mode 100644
index 00000000..b1d48c19
--- /dev/null
+++ b/legacy/web/app/store/GeofenceAttributes.js
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2017 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 - 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.GeofenceAttributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownAttribute',
+ proxy: 'memory',
+
+ data: [{
+ key: 'color',
+ name: Strings.attributeColor,
+ valueType: 'color'
+ }, {
+ key: 'speedLimit',
+ name: Strings.attributeSpeedLimit,
+ valueType: 'number',
+ dataType: 'speed'
+ }, {
+ key: 'polylineDistance',
+ name: Strings.attributePolylineDistance,
+ valueType: 'number',
+ dataType: 'distance'
+ }]
+});
diff --git a/legacy/web/app/store/GeofenceTypes.js b/legacy/web/app/store/GeofenceTypes.js
new file mode 100644
index 00000000..45b79897
--- /dev/null
+++ b/legacy/web/app/store/GeofenceTypes.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@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.GeofenceTypes', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name'],
+
+ data: [{
+ key: 'Polygon',
+ name: Strings.mapShapePolygon
+ }, {
+ key: 'Circle',
+ name: Strings.mapShapeCircle
+ }, {
+ key: 'LineString',
+ name: Strings.mapShapePolyline
+ }]
+});
diff --git a/legacy/web/app/store/Geofences.js b/legacy/web/app/store/Geofences.js
new file mode 100644
index 00000000..5a7172be
--- /dev/null
+++ b/legacy/web/app/store/Geofences.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@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.Geofences', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Geofence',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/geofences',
+ writer: {
+ writeAllFields: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/GroupAttributes.js b/legacy/web/app/store/GroupAttributes.js
new file mode 100644
index 00000000..589e4ec2
--- /dev/null
+++ b/legacy/web/app/store/GroupAttributes.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.GroupAttributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownAttribute',
+
+ data: [{
+ key: 'processing.copyAttributes',
+ name: Strings.attributeProcessingCopyAttributes,
+ valueType: 'string'
+ }, {
+ key: 'decoder.timezone',
+ name: Strings.sharedTimezone,
+ valueType: 'string',
+ dataType: 'timezone'
+ }]
+});
diff --git a/legacy/web/app/store/Groups.js b/legacy/web/app/store/Groups.js
new file mode 100644
index 00000000..5f8fa60a
--- /dev/null
+++ b/legacy/web/app/store/Groups.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@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.Groups', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Group',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/groups',
+ writer: {
+ writeAllFields: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/HoursUnits.js b/legacy/web/app/store/HoursUnits.js
new file mode 100644
index 00000000..02f62c65
--- /dev/null
+++ b/legacy/web/app/store/HoursUnits.js
@@ -0,0 +1,43 @@
+/*
+ * 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.HoursUnits', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name', 'fullName'],
+
+ data: [{
+ key: 'h',
+ name: Strings.sharedHourAbbreviation,
+ fullName: Strings.sharedHour
+ }],
+
+ convertValue: function (value, unit, back) {
+ return back ? value * 3600000 : value / 3600000;
+ },
+
+ formatValue: function (value, unit, convert) {
+ var hours, minutes;
+ if (convert) {
+ hours = Math.floor(value / 3600000);
+ minutes = Math.floor(value % 3600000 / 60000);
+ } else {
+ hours = Math.floor(value);
+ minutes = Math.floor(value % 1 * 60);
+ }
+ return hours + ' ' + Strings.sharedHourAbbreviation + ' ' + minutes + ' ' + Strings.sharedMinuteAbbreviation;
+ }
+});
diff --git a/legacy/web/app/store/KnownCommands.js b/legacy/web/app/store/KnownCommands.js
new file mode 100644
index 00000000..a6089c48
--- /dev/null
+++ b/legacy/web/app/store/KnownCommands.js
@@ -0,0 +1,241 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.KnownCommands', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownCommand',
+
+ data: [{
+ type: 'custom',
+ parameters: [{
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'positionPeriodic',
+ parameters: [{
+ key: 'frequency',
+ name: Strings.commandFrequency,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: 0,
+ dataType: 'frequency'
+ }]
+ }, {
+ type: 'setTimezone',
+ parameters: [{
+ key: 'timezone',
+ name: Strings.commandTimezone,
+ valueType: 'string',
+ dataType: 'timezone'
+ }]
+ }, {
+ type: 'sendSms',
+ parameters: [{
+ key: 'phone',
+ name: Strings.commandPhone,
+ valueType: 'string'
+ }, {
+ key: 'message',
+ name: Strings.commandMessage,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'message',
+ parameters: [{
+ key: 'message',
+ name: Strings.commandMessage,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'sendUssd',
+ parameters: [{
+ key: 'phone',
+ name: Strings.commandPhone,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'sosNumber',
+ parameters: [{
+ key: 'index',
+ name: Strings.commandIndex,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: 0
+ }, {
+ key: 'phone',
+ name: Strings.commandPhone,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'silenceTime',
+ parameters: [{
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'setPhonebook',
+ parameters: [{
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'voiceMessage',
+ parameters: [{
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'outputControl',
+ parameters: [{
+ key: 'index',
+ name: Strings.commandIndex,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: 0
+ }, {
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'voiceMonitoring',
+ parameters: [{
+ key: 'enable',
+ name: Strings.commandEnable,
+ valueType: 'boolean'
+ }]
+ }, {
+ type: 'setAgps',
+ parameters: [{
+ key: 'enable',
+ name: Strings.commandEnable,
+ valueType: 'boolean'
+ }]
+ }, {
+ type: 'setIndicator',
+ parameters: [{
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'configuration',
+ parameters: [{
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'setConnection',
+ parameters: [{
+ key: 'server',
+ name: Strings.commandServer,
+ valueType: 'string'
+ }, {
+ key: 'port',
+ name: Strings.commandPort,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: 1,
+ maxValue: 65535
+ }]
+ }, {
+ type: 'setOdometer',
+ parameters: [{
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'modePowerSaving',
+ parameters: [{
+ key: 'enable',
+ name: Strings.commandEnable,
+ valueType: 'boolean'
+ }]
+ }, {
+ type: 'modeDeepSleep',
+ parameters: [{
+ key: 'enable',
+ name: Strings.commandEnable,
+ valueType: 'boolean'
+ }]
+ }, {
+ type: 'alarmGeofence',
+ parameters: [{
+ key: 'radius',
+ name: Strings.commandRadius,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: 0
+ }]
+ }, {
+ type: 'alarmBattery',
+ parameters: [{
+ key: 'enable',
+ name: Strings.commandEnable,
+ valueType: 'boolean'
+ }]
+ }, {
+ type: 'alarmSos',
+ parameters: [{
+ key: 'enable',
+ name: Strings.commandEnable,
+ valueType: 'boolean'
+ }]
+ }, {
+ type: 'alarmRemove',
+ parameters: [{
+ key: 'enable',
+ name: Strings.commandEnable,
+ valueType: 'boolean'
+ }]
+ }, {
+ type: 'alarmClock',
+ parameters: [{
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'alarmSpeed',
+ parameters: [{
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }, {
+ type: 'alarmFall',
+ parameters: [{
+ key: 'enable',
+ name: Strings.commandEnable,
+ valueType: 'boolean'
+ }]
+ }, {
+ type: 'alarmVibration',
+ parameters: [{
+ key: 'data',
+ name: Strings.commandData,
+ valueType: 'string'
+ }]
+ }]
+});
diff --git a/legacy/web/app/store/Languages.js b/legacy/web/app/store/Languages.js
new file mode 100644
index 00000000..32d648e0
--- /dev/null
+++ b/legacy/web/app/store/Languages.js
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.Languages', {
+ extend: 'Ext.data.Store',
+ fields: ['code', 'name'],
+
+ data: (function () {
+ var code, data = [];
+ for (code in Locale.languages) {
+ if (Locale.languages.hasOwnProperty(code)) {
+ data.push({
+ code: code,
+ name: Locale.languages[code].name
+ });
+ }
+ }
+ return data;
+ })()
+});
diff --git a/legacy/web/app/store/LatestPositions.js b/legacy/web/app/store/LatestPositions.js
new file mode 100644
index 00000000..f7cf5406
--- /dev/null
+++ b/legacy/web/app/store/LatestPositions.js
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.LatestPositions', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Position'
+});
diff --git a/legacy/web/app/store/MaintenanceTypes.js b/legacy/web/app/store/MaintenanceTypes.js
new file mode 100644
index 00000000..468b67ea
--- /dev/null
+++ b/legacy/web/app/store/MaintenanceTypes.js
@@ -0,0 +1,22 @@
+/*
+ * 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.MaintenanceTypes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownAttribute'
+});
diff --git a/legacy/web/app/store/Maintenances.js b/legacy/web/app/store/Maintenances.js
new file mode 100644
index 00000000..a7aa4a07
--- /dev/null
+++ b/legacy/web/app/store/Maintenances.js
@@ -0,0 +1,30 @@
+/*
+ * 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.Maintenances', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Maintenance',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/maintenance',
+ writer: {
+ writeAllFields: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/MapTypes.js b/legacy/web/app/store/MapTypes.js
new file mode 100644
index 00000000..f517045d
--- /dev/null
+++ b/legacy/web/app/store/MapTypes.js
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.MapTypes', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name'],
+
+ data: [{
+ key: 'locationIqStreets',
+ name: Strings.mapLocationIqStreets
+ }, {
+ key: 'osm',
+ name: Strings.mapOsm
+ }, {
+ key: 'carto',
+ name: Strings.mapCarto
+ }, {
+ key: 'autoNavi',
+ name: Strings.mapAutoNavi
+ }, {
+ key: 'bingRoad',
+ name: Strings.mapBingRoad
+ }, {
+ key: 'bingAerial',
+ name: Strings.mapBingAerial
+ }, {
+ key: 'bingHybrid',
+ name: Strings.mapBingHybrid
+ }, {
+ key: 'yandexMap',
+ name: Strings.mapYandexMap
+ }, {
+ key: 'yandexSat',
+ name: Strings.mapYandexSat
+ }, {
+ key: 'custom',
+ name: Strings.mapCustom
+ }, {
+ key: 'customArcgis',
+ name: Strings.mapCustomArcgis
+ }]
+});
diff --git a/legacy/web/app/store/Notifications.js b/legacy/web/app/store/Notifications.js
new file mode 100644
index 00000000..b30505fd
--- /dev/null
+++ b/legacy/web/app/store/Notifications.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.Notifications', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Notification',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/notifications',
+ writer: {
+ writeAllFields: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/PositionAttributes.js b/legacy/web/app/store/PositionAttributes.js
new file mode 100644
index 00000000..5b1206b7
--- /dev/null
+++ b/legacy/web/app/store/PositionAttributes.js
@@ -0,0 +1,269 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.PositionAttributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownAttribute',
+ proxy: 'memory',
+
+ data: [{
+ key: 'raw',
+ name: Strings.positionRaw,
+ valueType: 'string'
+ }, {
+ key: 'index',
+ name: Strings.positionIndex,
+ valueType: 'number'
+ }, {
+ key: 'hdop',
+ name: Strings.positionHdop,
+ valueType: 'number'
+ }, {
+ key: 'vdop',
+ name: Strings.positionVdop,
+ valueType: 'number'
+ }, {
+ key: 'pdop',
+ name: Strings.positionPdop,
+ valueType: 'number'
+ }, {
+ key: 'sat',
+ name: Strings.positionSat,
+ valueType: 'number'
+ }, {
+ key: 'satVisible',
+ name: Strings.positionSatVisible,
+ valueType: 'number'
+ }, {
+ key: 'rssi',
+ name: Strings.positionRssi,
+ valueType: 'number'
+ }, {
+ key: 'gps',
+ name: Strings.positionGps,
+ valueType: 'number'
+ }, {
+ key: 'roaming',
+ name: Strings.positionRoaming,
+ valueType: 'boolean'
+ }, {
+ key: 'event',
+ name: Strings.positionEvent,
+ valueType: 'string'
+ }, {
+ key: 'alarm',
+ name: Strings.positionAlarm,
+ valueType: 'string'
+ }, {
+ key: 'status',
+ name: Strings.positionStatus,
+ valueType: 'string'
+ }, {
+ key: 'odometer',
+ name: Strings.positionOdometer,
+ valueType: 'number',
+ dataType: 'distance'
+ }, {
+ key: 'serviceOdometer',
+ name: Strings.positionServiceOdometer,
+ valueType: 'number',
+ dataType: 'distance'
+ }, {
+ key: 'tripOdometer',
+ name: Strings.positionTripOdometer,
+ valueType: 'number',
+ dataType: 'distance'
+ }, {
+ key: 'hours',
+ name: Strings.positionHours,
+ valueType: 'number',
+ dataType: 'hours'
+ }, {
+ key: 'steps',
+ name: Strings.positionSteps,
+ valueType: 'number'
+ }, {
+ key: 'input',
+ name: Strings.positionInput,
+ valueType: 'string'
+ }, {
+ key: 'output',
+ name: Strings.positionOutput,
+ valueType: 'string'
+ }, {
+ key: 'power',
+ name: Strings.positionPower,
+ valueType: 'number',
+ dataType: 'voltage'
+ }, {
+ key: 'battery',
+ name: Strings.positionBattery,
+ valueType: 'number',
+ dataType: 'voltage'
+ }, {
+ key: 'batteryLevel',
+ name: Strings.positionBatteryLevel,
+ valueType: 'number',
+ dataType: 'percentage'
+ }, {
+ key: 'fuel',
+ name: Strings.positionFuel,
+ valueType: 'number',
+ dataType: 'volume'
+ }, {
+ key: 'fuelConsumption',
+ name: Strings.positionFuelConsumption,
+ valueType: 'number',
+ dataType: 'consumption'
+ }, {
+ key: 'versionFw',
+ name: Strings.positionVersionFw,
+ valueType: 'string'
+ }, {
+ key: 'versionHw',
+ name: Strings.positionVersionHw,
+ valueType: 'string'
+ }, {
+ key: 'type',
+ name: Strings.sharedType,
+ valueType: 'string'
+ }, {
+ key: 'ignition',
+ name: Strings.positionIgnition,
+ valueType: 'boolean'
+ }, {
+ key: 'flags',
+ name: Strings.positionFlags,
+ valueType: 'string'
+ }, {
+ key: 'charge',
+ name: Strings.positionCharge,
+ valueType: 'boolean'
+ }, {
+ key: 'ip',
+ name: Strings.positionIp,
+ valueType: 'string'
+ }, {
+ key: 'archive',
+ name: Strings.positionArchive,
+ valueType: 'boolean'
+ }, {
+ key: 'distance',
+ name: Strings.positionDistance,
+ valueType: 'number',
+ dataType: 'distance'
+ }, {
+ key: 'totalDistance',
+ name: Strings.deviceTotalDistance,
+ valueType: 'number',
+ dataType: 'distance'
+ }, {
+ key: 'rpm',
+ name: Strings.positionRpm,
+ valueType: 'number'
+ }, {
+ key: 'vin',
+ name: Strings.positionVin,
+ valueType: 'string'
+ }, {
+ key: 'approximate',
+ name: Strings.positionApproximate,
+ valueType: 'boolean'
+ }, {
+ key: 'throttle',
+ name: Strings.positionThrottle,
+ valueType: 'number'
+ }, {
+ key: 'motion',
+ name: Strings.positionMotion,
+ valueType: 'boolean'
+ }, {
+ key: 'armed',
+ name: Strings.positionArmed,
+ valueType: 'number'
+ }, {
+ key: 'geofence',
+ name: Strings.sharedGeofence,
+ valueType: 'string'
+ }, {
+ key: 'acceleration',
+ name: Strings.positionAcceleration,
+ valueType: 'number'
+ }, {
+ key: 'deviceTemp',
+ name: Strings.positionDeviceTemp,
+ valueType: 'number',
+ dataType: 'temperature'
+ }, {
+ key: 'operator',
+ name: Strings.positionOperator,
+ valueType: 'string'
+ }, {
+ key: 'command',
+ name: Strings.deviceCommand,
+ valueType: 'string'
+ }, {
+ key: 'blocked',
+ name: Strings.positionBlocked,
+ valueType: 'boolean'
+ }, {
+ key: 'dtcs',
+ name: Strings.positionDtcs,
+ valueType: 'string'
+ }, {
+ key: 'obdSpeed',
+ name: Strings.positionObdSpeed,
+ valueType: 'number',
+ dataType: 'speed'
+ }, {
+ key: 'obdOdometer',
+ name: Strings.positionObdOdometer,
+ valueType: 'number',
+ dataType: 'distance'
+ }, {
+ key: 'result',
+ name: Strings.eventCommandResult,
+ valueType: 'string'
+ }, {
+ key: 'driverUniqueId',
+ name: Strings.positionDriverUniqueId,
+ valueType: 'string',
+ dataType: 'driverUniqueId'
+ }],
+
+ getAttributeName: function (key, capitalize) {
+ var model = this.getById(key);
+ if (model) {
+ return model.get('name');
+ } else if (capitalize) {
+ return key.replace(/^./, function (match) {
+ return match.toUpperCase();
+ });
+ } else {
+ return key;
+ }
+ },
+
+ getAttributeDataType: function (key) {
+ var model = this.getById(key);
+ if (model && model.get('dataType')) {
+ return model.get('dataType');
+ } else {
+ return null;
+ }
+ }
+});
diff --git a/legacy/web/app/store/Positions.js b/legacy/web/app/store/Positions.js
new file mode 100644
index 00000000..388a3320
--- /dev/null
+++ b/legacy/web/app/store/Positions.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.Positions', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Position',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/positions',
+ headers: {
+ 'Accept': 'application/json'
+ }
+ }
+});
diff --git a/legacy/web/app/store/ReportChartTypes.js b/legacy/web/app/store/ReportChartTypes.js
new file mode 100644
index 00000000..f53d3197
--- /dev/null
+++ b/legacy/web/app/store/ReportChartTypes.js
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 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.ReportChartTypes', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name'],
+
+ data: [{
+ key: 'speed',
+ name: Strings.positionSpeed
+ }, {
+ key: 'accuracy',
+ name: Strings.positionAccuracy
+ }, {
+ key: 'altitude',
+ name: Strings.positionAltitude
+ }]
+});
diff --git a/legacy/web/app/store/ReportEventTypes.js b/legacy/web/app/store/ReportEventTypes.js
new file mode 100644
index 00000000..001f159b
--- /dev/null
+++ b/legacy/web/app/store/ReportEventTypes.js
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 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.ReportEventTypes', {
+ extend: 'Ext.data.Store',
+ fields: ['type', 'name'],
+
+ statics: {
+ allEvents: 'allEvents'
+ }
+});
diff --git a/legacy/web/app/store/ReportEvents.js b/legacy/web/app/store/ReportEvents.js
new file mode 100644
index 00000000..061aaa42
--- /dev/null
+++ b/legacy/web/app/store/ReportEvents.js
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@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.ReportEvents', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Event',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/reports/events',
+ timeout: Traccar.Style.reportTimeout,
+ headers: {
+ 'Accept': 'application/json'
+ },
+ listeners: {
+ exception: function (proxy, exception) {
+ Traccar.app.showError(exception);
+ }
+ }
+ }
+});
diff --git a/legacy/web/app/store/ReportPeriods.js b/legacy/web/app/store/ReportPeriods.js
new file mode 100644
index 00000000..542fdce9
--- /dev/null
+++ b/legacy/web/app/store/ReportPeriods.js
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.ReportPeriods', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name'],
+
+ data: [{
+ key: 'custom',
+ name: Strings.reportCustom
+ }, {
+ key: 'today',
+ name: Strings.reportToday
+ }, {
+ key: 'yesterday',
+ name: Strings.reportYesterday
+ }, {
+ key: 'thisWeek',
+ name: Strings.reportThisWeek
+ }, {
+ key: 'previousWeek',
+ name: Strings.reportPreviousWeek
+ }, {
+ key: 'thisMonth',
+ name: Strings.reportThisMonth
+ }, {
+ key: 'previousMonth',
+ name: Strings.reportPreviousMonth
+ }]
+});
diff --git a/legacy/web/app/store/ReportRoute.js b/legacy/web/app/store/ReportRoute.js
new file mode 100644
index 00000000..7babe163
--- /dev/null
+++ b/legacy/web/app/store/ReportRoute.js
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@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.ReportRoute', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Position',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/reports/route',
+ timeout: Traccar.Style.reportTimeout,
+ headers: {
+ 'Accept': 'application/json'
+ },
+ listeners: {
+ exception: function (proxy, exception) {
+ Traccar.app.showError(exception);
+ }
+ }
+ }
+});
diff --git a/legacy/web/app/store/ReportStops.js b/legacy/web/app/store/ReportStops.js
new file mode 100644
index 00000000..75c9fc18
--- /dev/null
+++ b/legacy/web/app/store/ReportStops.js
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.ReportStops', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.ReportStop',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/reports/stops',
+ timeout: Traccar.Style.reportTimeout,
+ headers: {
+ 'Accept': 'application/json'
+ },
+ listeners: {
+ exception: function (proxy, exception) {
+ Traccar.app.showError(exception);
+ }
+ }
+ }
+});
diff --git a/legacy/web/app/store/ReportSummary.js b/legacy/web/app/store/ReportSummary.js
new file mode 100644
index 00000000..f328da2d
--- /dev/null
+++ b/legacy/web/app/store/ReportSummary.js
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 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.ReportSummary', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.ReportSummary',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/reports/summary',
+ timeout: Traccar.Style.reportTimeout,
+ headers: {
+ 'Accept': 'application/json'
+ },
+ listeners: {
+ exception: function (proxy, exception) {
+ Traccar.app.showError(exception);
+ }
+ }
+ }
+});
diff --git a/legacy/web/app/store/ReportTrips.js b/legacy/web/app/store/ReportTrips.js
new file mode 100644
index 00000000..057cc7c0
--- /dev/null
+++ b/legacy/web/app/store/ReportTrips.js
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 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.ReportTrips', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.ReportTrip',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/reports/trips',
+ timeout: Traccar.Style.reportTimeout,
+ headers: {
+ 'Accept': 'application/json'
+ },
+ listeners: {
+ exception: function (proxy, exception) {
+ Traccar.app.showError(exception);
+ }
+ }
+ }
+});
diff --git a/legacy/web/app/store/ReportTypes.js b/legacy/web/app/store/ReportTypes.js
new file mode 100644
index 00000000..ceaba9d2
--- /dev/null
+++ b/legacy/web/app/store/ReportTypes.js
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@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.ReportTypes', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name'],
+
+ data: [{
+ key: 'route',
+ name: Strings.reportRoute
+ }, {
+ key: 'events',
+ name: Strings.reportEvents
+ }, {
+ key: 'trips',
+ name: Strings.reportTrips
+ }, {
+ key: 'stops',
+ name: Strings.reportStops
+ }, {
+ key: 'summary',
+ name: Strings.reportSummary
+ }, {
+ key: 'daily',
+ name: Strings.reportDaily
+ }, {
+ key: 'chart',
+ name: Strings.reportChart
+ }]
+});
diff --git a/legacy/web/app/store/ServerAttributes.js b/legacy/web/app/store/ServerAttributes.js
new file mode 100644
index 00000000..204f885b
--- /dev/null
+++ b/legacy/web/app/store/ServerAttributes.js
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.ServerAttributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownAttribute',
+
+ data: []
+});
diff --git a/legacy/web/app/store/SpeedUnits.js b/legacy/web/app/store/SpeedUnits.js
new file mode 100644
index 00000000..a36be928
--- /dev/null
+++ b/legacy/web/app/store/SpeedUnits.js
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2015 - 2016 Anton Tananaev (anton@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.SpeedUnits', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name', 'factor'],
+
+ data: [{
+ key: 'kn',
+ name: Strings.sharedKn,
+ factor: 1
+ }, {
+ key: 'kmh',
+ name: Strings.sharedKmh,
+ factor: 1.852
+ }, {
+ key: 'mph',
+ name: Strings.sharedMph,
+ factor: 1.15078
+ }],
+
+ convertValue: function (value, unit, back) {
+ var model;
+ if (!unit) {
+ unit = 'kn';
+ }
+ model = this.findRecord('key', unit);
+ return back ? value / model.get('factor') : value * model.get('factor');
+ },
+
+ formatValue: function (value, unit, convert) {
+ var model;
+ if (!unit) {
+ unit = 'kn';
+ }
+ model = this.findRecord('key', unit);
+ return (convert ? this.convertValue(value, unit) : value).toFixed(1) + ' ' + model.get('name');
+ }
+});
diff --git a/legacy/web/app/store/Statistics.js b/legacy/web/app/store/Statistics.js
new file mode 100644
index 00000000..1d44c6e3
--- /dev/null
+++ b/legacy/web/app/store/Statistics.js
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@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.Statistics', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.Statistics',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/statistics'
+ }
+});
diff --git a/legacy/web/app/store/TimeUnits.js b/legacy/web/app/store/TimeUnits.js
new file mode 100644
index 00000000..0d16c4bb
--- /dev/null
+++ b/legacy/web/app/store/TimeUnits.js
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2015 - 2017 Anton Tananaev (anton@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.TimeUnits', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name', 'factor'],
+
+ data: [{
+ key: 's',
+ name: Strings.sharedSecondAbbreviation,
+ factor: 1
+ }, {
+ key: 'm',
+ name: Strings.sharedMinuteAbbreviation,
+ factor: 60
+ }, {
+ key: 'h',
+ name: Strings.sharedHourAbbreviation,
+ factor: 3600
+ }],
+
+ convertValue: function (value, unit, back) {
+ var model;
+ if (!unit) {
+ unit = 'kn';
+ }
+ model = this.findRecord('key', unit);
+ return back ? value * model.get('factor') : value / model.get('factor');
+ }
+});
diff --git a/legacy/web/app/store/UserAttributes.js b/legacy/web/app/store/UserAttributes.js
new file mode 100644
index 00000000..dfe69421
--- /dev/null
+++ b/legacy/web/app/store/UserAttributes.js
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.UserAttributes', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.KnownAttribute',
+
+ data: [{
+ key: 'mail.smtp.host',
+ name: Strings.attributeMailSmtpHost,
+ valueType: 'string'
+ }, {
+ key: 'mail.smtp.port',
+ name: Strings.attributeMailSmtpPort,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: 1,
+ maxValue: 65535
+ }, {
+ key: 'mail.smtp.starttls.enable',
+ name: Strings.attributeMailSmtpStarttlsEnable,
+ valueType: 'boolean'
+ }, {
+ key: 'mail.smtp.starttls.required',
+ name: Strings.attributeMailSmtpStarttlsRequired,
+ valueType: 'boolean'
+ }, {
+ key: 'mail.smtp.ssl.enable',
+ name: Strings.attributeMailSmtpSslEnable,
+ valueType: 'boolean'
+ }, {
+ key: 'mail.smtp.ssl.trust',
+ name: Strings.attributeMailSmtpSslTrust,
+ valueType: 'string'
+ }, {
+ key: 'mail.smtp.ssl.protocols',
+ name: Strings.attributeMailSmtpSslProtocols,
+ valueType: 'string'
+ }, {
+ key: 'mail.smtp.from',
+ name: Strings.attributeMailSmtpFrom,
+ valueType: 'string'
+ }, {
+ key: 'mail.smtp.auth',
+ name: Strings.attributeMailSmtpAuth,
+ valueType: 'boolean'
+ }, {
+ key: 'mail.smtp.username',
+ name: Strings.attributeMailSmtpUsername,
+ valueType: 'string'
+ }, {
+ key: 'mail.smtp.password',
+ name: Strings.attributeMailSmtpPassword,
+ valueType: 'string'
+ }]
+});
diff --git a/legacy/web/app/store/Users.js b/legacy/web/app/store/Users.js
new file mode 100644
index 00000000..0279afea
--- /dev/null
+++ b/legacy/web/app/store/Users.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2015 Anton Tananaev (anton@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.Users', {
+ extend: 'Ext.data.Store',
+ model: 'Traccar.model.User',
+
+ proxy: {
+ type: 'rest',
+ url: 'api/users',
+ writer: {
+ writeAllFields: true
+ }
+ }
+});
diff --git a/legacy/web/app/store/VisibleDevices.js b/legacy/web/app/store/VisibleDevices.js
new file mode 100644
index 00000000..db1ca7da
--- /dev/null
+++ b/legacy/web/app/store/VisibleDevices.js
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.VisibleDevices', {
+ extend: 'Ext.data.ChainedStore',
+ source: 'Devices'
+});
diff --git a/legacy/web/app/store/VolumeUnits.js b/legacy/web/app/store/VolumeUnits.js
new file mode 100644
index 00000000..2bdf6684
--- /dev/null
+++ b/legacy/web/app/store/VolumeUnits.js
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 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.VolumeUnits', {
+ extend: 'Ext.data.Store',
+ fields: ['key', 'name', 'fullName', 'factor'],
+
+ data: [{
+ key: 'ltr',
+ name: Strings.sharedLiterAbbreviation,
+ fullName: Strings.sharedLiter,
+ factor: 1
+ }, {
+ key: 'impGal',
+ name: Strings.sharedGallonAbbreviation,
+ fullName: Strings.sharedImpGallon,
+ factor: 4.546
+ }, {
+ key: 'usGal',
+ name: Strings.sharedGallonAbbreviation,
+ fullName: Strings.sharedUsGallon,
+ factor: 3.785
+ }],
+
+ convertValue: function (value, unit, back) {
+ var model;
+ if (!unit) {
+ unit = 'ltr';
+ }
+ model = this.findRecord('key', unit);
+ return back ? value * model.get('factor') : value / model.get('factor');
+ },
+
+ formatValue: function (value, unit, convert) {
+ var model;
+ if (!unit) {
+ unit = 'ltr';
+ }
+ model = this.findRecord('key', unit);
+ return (convert ? this.convertValue(value, unit) : value).toFixed(1) + ' ' + model.get('name');
+ }
+});