diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-09-14 22:59:54 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-14 22:59:54 +1200 |
commit | ca960df40e15d7bfb88d2e0e41a269d4b069058c (patch) | |
tree | 0b41508a3f856700c353e5a5082c6ea829f13d43 /web/app/view/permissions | |
parent | 4193ac77fd9f0da264284a6f73601963995554c8 (diff) | |
parent | be47d612285d484e2d0a2aa43174fb8e36acd816 (diff) | |
download | trackermap-web-ca960df40e15d7bfb88d2e0e41a269d4b069058c.tar.gz trackermap-web-ca960df40e15d7bfb88d2e0e41a269d4b069058c.tar.bz2 trackermap-web-ca960df40e15d7bfb88d2e0e41a269d4b069058c.zip |
Merge pull request #585 from Abyss777/saved_commands
Implement Saved Commands
Diffstat (limited to 'web/app/view/permissions')
-rw-r--r-- | web/app/view/permissions/Calendars.js (renamed from web/app/view/permissions/UserCalendars.js) | 4 | ||||
-rw-r--r-- | web/app/view/permissions/ComputedAttributes.js (renamed from web/app/view/permissions/DeviceAttributes.js) | 4 | ||||
-rw-r--r-- | web/app/view/permissions/DeviceDrivers.js | 44 | ||||
-rw-r--r-- | web/app/view/permissions/DeviceGeofences.js | 37 | ||||
-rw-r--r-- | web/app/view/permissions/Devices.js (renamed from web/app/view/permissions/UserDevices.js) | 4 | ||||
-rw-r--r-- | web/app/view/permissions/Drivers.js (renamed from web/app/view/permissions/UserDrivers.js) | 4 | ||||
-rw-r--r-- | web/app/view/permissions/Geofences.js (renamed from web/app/view/permissions/UserGeofences.js) | 4 | ||||
-rw-r--r-- | web/app/view/permissions/GroupAttributes.js | 49 | ||||
-rw-r--r-- | web/app/view/permissions/GroupDrivers.js | 44 | ||||
-rw-r--r-- | web/app/view/permissions/GroupGeofences.js | 37 | ||||
-rw-r--r-- | web/app/view/permissions/Groups.js (renamed from web/app/view/permissions/UserGroups.js) | 4 | ||||
-rw-r--r-- | web/app/view/permissions/SavedCommands.js (renamed from web/app/view/permissions/UserAttributes.js) | 21 | ||||
-rw-r--r-- | web/app/view/permissions/Users.js (renamed from web/app/view/permissions/UserUsers.js) | 4 |
13 files changed, 27 insertions, 233 deletions
diff --git a/web/app/view/permissions/UserCalendars.js b/web/app/view/permissions/Calendars.js index 54ecfc22..ff2796bb 100644 --- a/web/app/view/permissions/UserCalendars.js +++ b/web/app/view/permissions/Calendars.js @@ -16,9 +16,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -Ext.define('Traccar.view.permissions.UserCalendars', { +Ext.define('Traccar.view.permissions.Calendars', { extend: 'Traccar.view.permissions.Base', - xtype: 'userCalendarsView', + xtype: 'linkCalendarsView', requires: [ 'Ext.grid.filters.Filters' diff --git a/web/app/view/permissions/DeviceAttributes.js b/web/app/view/permissions/ComputedAttributes.js index c7755f09..800717ce 100644 --- a/web/app/view/permissions/DeviceAttributes.js +++ b/web/app/view/permissions/ComputedAttributes.js @@ -16,9 +16,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -Ext.define('Traccar.view.permissions.DeviceAttributes', { +Ext.define('Traccar.view.permissions.ComputedAttributes', { extend: 'Traccar.view.permissions.Base', - xtype: 'deviceAttributesView', + xtype: 'linkComputedAttributesView', requires: [ 'Ext.grid.filters.Filters' diff --git a/web/app/view/permissions/DeviceDrivers.js b/web/app/view/permissions/DeviceDrivers.js deleted file mode 100644 index d3aa20b6..00000000 --- a/web/app/view/permissions/DeviceDrivers.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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.view.permissions.DeviceDrivers', { - extend: 'Traccar.view.permissions.Base', - xtype: 'deviceDriversView', - - requires: [ - 'Ext.grid.filters.Filters' - ], - - plugins: 'gridfilters', - - columns: { - items: [{ - text: Strings.sharedName, - dataIndex: 'name', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - filter: 'string' - }, { - text: Strings.deviceIdentifier, - dataIndex: 'uniqueId', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - filter: 'string' - }] - } -}); diff --git a/web/app/view/permissions/DeviceGeofences.js b/web/app/view/permissions/DeviceGeofences.js deleted file mode 100644 index c16bceda..00000000 --- a/web/app/view/permissions/DeviceGeofences.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2016 - 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.view.permissions.DeviceGeofences', { - extend: 'Traccar.view.permissions.Base', - xtype: 'deviceGeofencesView', - - requires: [ - 'Ext.grid.filters.Filters' - ], - - plugins: 'gridfilters', - - columns: { - items: [{ - text: Strings.sharedName, - dataIndex: 'name', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - filter: 'string' - }] - } -}); diff --git a/web/app/view/permissions/UserDevices.js b/web/app/view/permissions/Devices.js index a9bb65b7..4cadafe4 100644 --- a/web/app/view/permissions/UserDevices.js +++ b/web/app/view/permissions/Devices.js @@ -15,9 +15,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -Ext.define('Traccar.view.permissions.UserDevices', { +Ext.define('Traccar.view.permissions.Devices', { extend: 'Traccar.view.permissions.Base', - xtype: 'userDevicesView', + xtype: 'linkDevicesView', requires: [ 'Ext.grid.filters.Filters', diff --git a/web/app/view/permissions/UserDrivers.js b/web/app/view/permissions/Drivers.js index 8f88ddd8..f0ea2890 100644 --- a/web/app/view/permissions/UserDrivers.js +++ b/web/app/view/permissions/Drivers.js @@ -16,9 +16,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -Ext.define('Traccar.view.permissions.UserDrivers', { +Ext.define('Traccar.view.permissions.Drivers', { extend: 'Traccar.view.permissions.Base', - xtype: 'userDriversView', + xtype: 'linkDriversView', requires: [ 'Ext.grid.filters.Filters' diff --git a/web/app/view/permissions/UserGeofences.js b/web/app/view/permissions/Geofences.js index 436a2a6a..84135d3b 100644 --- a/web/app/view/permissions/UserGeofences.js +++ b/web/app/view/permissions/Geofences.js @@ -15,9 +15,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -Ext.define('Traccar.view.permissions.UserGeofences', { +Ext.define('Traccar.view.permissions.Geofences', { extend: 'Traccar.view.permissions.Base', - xtype: 'userGeofencesView', + xtype: 'linkGeofencesView', requires: [ 'Ext.grid.filters.Filters' diff --git a/web/app/view/permissions/GroupAttributes.js b/web/app/view/permissions/GroupAttributes.js deleted file mode 100644 index 4db8b244..00000000 --- a/web/app/view/permissions/GroupAttributes.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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.view.permissions.GroupAttributes', { - extend: 'Traccar.view.permissions.Base', - xtype: 'groupAttributesView', - - requires: [ - 'Ext.grid.filters.Filters' - ], - - columns: { - items: [{ - text: Strings.sharedDescription, - dataIndex: 'description', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - filter: 'string' - }, { - text: Strings.sharedAttribute, - dataIndex: 'attribute', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - filter: { - type: 'list', - labelField: 'name', - store: 'PositionAttributes' - }, - renderer: function (value) { - return Ext.getStore('PositionAttributes').getAttributeName(value); - } - }] - } -}); diff --git a/web/app/view/permissions/GroupDrivers.js b/web/app/view/permissions/GroupDrivers.js deleted file mode 100644 index 61aa10ad..00000000 --- a/web/app/view/permissions/GroupDrivers.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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.view.permissions.GroupDrivers', { - extend: 'Traccar.view.permissions.Base', - xtype: 'groupDriversView', - - requires: [ - 'Ext.grid.filters.Filters' - ], - - plugins: 'gridfilters', - - columns: { - items: [{ - text: Strings.sharedName, - dataIndex: 'name', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - filter: 'string' - }, { - text: Strings.deviceIdentifier, - dataIndex: 'uniqueId', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - filter: 'string' - }] - } -}); diff --git a/web/app/view/permissions/GroupGeofences.js b/web/app/view/permissions/GroupGeofences.js deleted file mode 100644 index f365e356..00000000 --- a/web/app/view/permissions/GroupGeofences.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2016 - 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.view.permissions.GroupGeofences', { - extend: 'Traccar.view.permissions.Base', - xtype: 'groupGeofencesView', - - requires: [ - 'Ext.grid.filters.Filters' - ], - - plugins: 'gridfilters', - - columns: { - items: [{ - text: Strings.sharedName, - dataIndex: 'name', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - filter: 'string' - }] - } -}); diff --git a/web/app/view/permissions/UserGroups.js b/web/app/view/permissions/Groups.js index bc24201c..d3cad98e 100644 --- a/web/app/view/permissions/UserGroups.js +++ b/web/app/view/permissions/Groups.js @@ -15,9 +15,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -Ext.define('Traccar.view.permissions.UserGroups', { +Ext.define('Traccar.view.permissions.Groups', { extend: 'Traccar.view.permissions.Base', - xtype: 'userGroupsView', + xtype: 'linkGroupsView', requires: [ 'Ext.grid.filters.Filters', diff --git a/web/app/view/permissions/UserAttributes.js b/web/app/view/permissions/SavedCommands.js index a0a385ee..106fad52 100644 --- a/web/app/view/permissions/UserAttributes.js +++ b/web/app/view/permissions/SavedCommands.js @@ -16,9 +16,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -Ext.define('Traccar.view.permissions.UserAttributes', { +Ext.define('Traccar.view.permissions.SavedCommands', { extend: 'Traccar.view.permissions.Base', - xtype: 'userAttributesView', + xtype: 'linkSavedCommandsView', requires: [ 'Ext.grid.filters.Filters' @@ -34,18 +34,23 @@ Ext.define('Traccar.view.permissions.UserAttributes', { minWidth: Traccar.Style.columnWidthNormal, filter: 'string' }, { - text: Strings.sharedAttribute, - dataIndex: 'attribute', + text: Strings.sharedType, + dataIndex: 'type', flex: 1, minWidth: Traccar.Style.columnWidthNormal, filter: { type: 'list', + idField: 'type', labelField: 'name', - store: 'PositionAttributes' + store: 'AllCommandTypes' }, - renderer: function (value) { - return Ext.getStore('PositionAttributes').getAttributeName(value); - } + renderer: Traccar.AttributeFormatter.getFormatter('commandType') + }, { + text: Strings.notificationSms, + dataIndex: 'textChannel', + flex: 1, + minWidth: Traccar.Style.columnWidthNormal, + filter: 'boolean' }] } }); diff --git a/web/app/view/permissions/UserUsers.js b/web/app/view/permissions/Users.js index c5980c2f..66cf5d62 100644 --- a/web/app/view/permissions/UserUsers.js +++ b/web/app/view/permissions/Users.js @@ -16,9 +16,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -Ext.define('Traccar.view.permissions.UserUsers', { +Ext.define('Traccar.view.permissions.Users', { extend: 'Traccar.view.permissions.Base', - xtype: 'userUsersView', + xtype: 'linkUsersView', columns: { items: [{ |