diff --git a/guacamole/src/main/webapp/app/client/clientModule.js b/guacamole/src/main/webapp/app/client/clientModule.js index dec05e580..c27957115 100644 --- a/guacamole/src/main/webapp/app/client/clientModule.js +++ b/guacamole/src/main/webapp/app/client/clientModule.js @@ -23,4 +23,4 @@ /** * The module for code used to connect to a connection or balancing group. */ -angular.module('client', ['auth', 'history']); +angular.module('client', ['auth', 'history', 'rest']); diff --git a/guacamole/src/main/webapp/app/connectionGroup/connectionGroupModule.js b/guacamole/src/main/webapp/app/connectionGroup/connectionGroupModule.js deleted file mode 100644 index eab2c54a4..000000000 --- a/guacamole/src/main/webapp/app/connectionGroup/connectionGroupModule.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 Glyptodon LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * The module for code relating to connection groups. - */ -angular.module('connectionGroup', ['auth', 'util', 'connection']); diff --git a/guacamole/src/main/webapp/app/home/homeModule.js b/guacamole/src/main/webapp/app/home/homeModule.js index 4f7d143a3..f0eb2f0d4 100644 --- a/guacamole/src/main/webapp/app/home/homeModule.js +++ b/guacamole/src/main/webapp/app/home/homeModule.js @@ -20,4 +20,4 @@ * THE SOFTWARE. */ -angular.module('home', ['connection', 'connectionGroup', 'history', 'user', 'permission']); +angular.module('home', ['history', 'rest']); diff --git a/guacamole/src/main/webapp/app/index/indexModule.js b/guacamole/src/main/webapp/app/index/indexModule.js index 2911a14c2..b40d7ffd4 100644 --- a/guacamole/src/main/webapp/app/index/indexModule.js +++ b/guacamole/src/main/webapp/app/index/indexModule.js @@ -24,4 +24,4 @@ * The module for the root of the application. */ angular.module('index', ['ngRoute', 'pascalprecht.translate', - 'auth', 'home', 'manage', 'login', 'client', 'notification']); + 'auth', 'home', 'manage', 'login', 'client', 'notification', 'rest']); diff --git a/guacamole/src/main/webapp/app/manage/manageModule.js b/guacamole/src/main/webapp/app/manage/manageModule.js index 9ea80c415..8dfae77c6 100644 --- a/guacamole/src/main/webapp/app/manage/manageModule.js +++ b/guacamole/src/main/webapp/app/manage/manageModule.js @@ -23,5 +23,5 @@ /** * The module for the administration functionality. */ -angular.module('manage', ['btford.modal', 'protocol', 'connection', 'connectionGroup', 'util']); +angular.module('manage', ['btford.modal', 'rest', 'util']); diff --git a/guacamole/src/main/webapp/app/permission/permissionModule.js b/guacamole/src/main/webapp/app/permission/permissionModule.js deleted file mode 100644 index 524f058f5..000000000 --- a/guacamole/src/main/webapp/app/permission/permissionModule.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 Glyptodon LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * A module for code relating to permissions. - */ -angular.module('permission', ['auth']); diff --git a/guacamole/src/main/webapp/app/protocol/protocolModule.js b/guacamole/src/main/webapp/app/protocol/protocolModule.js deleted file mode 100644 index d6908b49c..000000000 --- a/guacamole/src/main/webapp/app/protocol/protocolModule.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 Glyptodon LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * The module for the protocol functionality. - */ -angular.module('protocol', []); diff --git a/guacamole/src/main/webapp/app/connection/connectionModule.js b/guacamole/src/main/webapp/app/rest/restModule.js similarity index 89% rename from guacamole/src/main/webapp/app/connection/connectionModule.js rename to guacamole/src/main/webapp/app/rest/restModule.js index 7f3b0ab88..d5a3a27d7 100644 --- a/guacamole/src/main/webapp/app/connection/connectionModule.js +++ b/guacamole/src/main/webapp/app/rest/restModule.js @@ -21,6 +21,7 @@ */ /** - * The module for code relating to connections. + * The module for code relating to communication with the REST API of the + * Guacamole web application. */ -angular.module('connection', ['auth']); +angular.module('rest', ['auth']); diff --git a/guacamole/src/main/webapp/app/connectionGroup/service/connectionGroupDAO.js b/guacamole/src/main/webapp/app/rest/services/connectionGroupDAO.js similarity index 98% rename from guacamole/src/main/webapp/app/connectionGroup/service/connectionGroupDAO.js rename to guacamole/src/main/webapp/app/rest/services/connectionGroupDAO.js index c2cceecb6..61cdb7580 100644 --- a/guacamole/src/main/webapp/app/connectionGroup/service/connectionGroupDAO.js +++ b/guacamole/src/main/webapp/app/rest/services/connectionGroupDAO.js @@ -23,7 +23,7 @@ /** * The DAO for connection group operations agains the REST API. */ -angular.module('connectionGroup').factory('connectionGroupDAO', ['$http', 'authenticationService', +angular.module('rest').factory('connectionGroupDAO', ['$http', 'authenticationService', function connectionGrouDAO($http, authenticationService) { /** diff --git a/guacamole/src/main/webapp/app/connectionGroup/service/connectionGroupService.js b/guacamole/src/main/webapp/app/rest/services/connectionGroupService.js similarity index 98% rename from guacamole/src/main/webapp/app/connectionGroup/service/connectionGroupService.js rename to guacamole/src/main/webapp/app/rest/services/connectionGroupService.js index 36f358760..344bba160 100644 --- a/guacamole/src/main/webapp/app/connectionGroup/service/connectionGroupService.js +++ b/guacamole/src/main/webapp/app/rest/services/connectionGroupService.js @@ -23,7 +23,7 @@ /** * A service for performing useful connection group related functionaltiy. */ -angular.module('connectionGroup').factory('connectionGroupService', ['$injector', function connectionGroupService($injector) { +angular.module('rest').factory('connectionGroupService', ['$injector', function connectionGroupService($injector) { var connectionGroupDAO = $injector.get('connectionGroupDAO'); var connectionService = $injector.get('connectionService'); diff --git a/guacamole/src/main/webapp/app/connection/service/connectionService.js b/guacamole/src/main/webapp/app/rest/services/connectionService.js similarity index 98% rename from guacamole/src/main/webapp/app/connection/service/connectionService.js rename to guacamole/src/main/webapp/app/rest/services/connectionService.js index 42a93fb7a..1ca391d6b 100644 --- a/guacamole/src/main/webapp/app/connection/service/connectionService.js +++ b/guacamole/src/main/webapp/app/rest/services/connectionService.js @@ -23,7 +23,7 @@ /** * Service for operating on connections via the REST API. */ -angular.module('connection').factory('connectionService', ['$http', 'authenticationService', +angular.module('rest').factory('connectionService', ['$http', 'authenticationService', function connectionService($http, authenticationService) { var service = {}; diff --git a/guacamole/src/main/webapp/app/permission/services/permissionCheckService.js b/guacamole/src/main/webapp/app/rest/services/permissionCheckService.js similarity index 98% rename from guacamole/src/main/webapp/app/permission/services/permissionCheckService.js rename to guacamole/src/main/webapp/app/rest/services/permissionCheckService.js index 4e3cc6c72..80ee4cd39 100644 --- a/guacamole/src/main/webapp/app/permission/services/permissionCheckService.js +++ b/guacamole/src/main/webapp/app/rest/services/permissionCheckService.js @@ -24,7 +24,7 @@ * A service for checking if a specific permission exists * in a given list of permissions. */ -angular.module('permission').factory('permissionCheckService', [ +angular.module('rest').factory('permissionCheckService', [ function permissionCheckService() { var service = {}; diff --git a/guacamole/src/main/webapp/app/permission/services/permissionDAO.js b/guacamole/src/main/webapp/app/rest/services/permissionDAO.js similarity index 98% rename from guacamole/src/main/webapp/app/permission/services/permissionDAO.js rename to guacamole/src/main/webapp/app/rest/services/permissionDAO.js index b26e66683..fdaaa9c57 100644 --- a/guacamole/src/main/webapp/app/permission/services/permissionDAO.js +++ b/guacamole/src/main/webapp/app/rest/services/permissionDAO.js @@ -23,7 +23,7 @@ /** * The DAO for permission operations agains the REST API. */ -angular.module('permission').factory('permissionDAO', ['$http', 'authenticationService', +angular.module('rest').factory('permissionDAO', ['$http', 'authenticationService', function permissionDAO($http, authenticationService) { var service = {}; diff --git a/guacamole/src/main/webapp/app/protocol/services/protocolDAO.js b/guacamole/src/main/webapp/app/rest/services/protocolDAO.js similarity index 94% rename from guacamole/src/main/webapp/app/protocol/services/protocolDAO.js rename to guacamole/src/main/webapp/app/rest/services/protocolDAO.js index b45fed2f5..c18da7b2e 100644 --- a/guacamole/src/main/webapp/app/protocol/services/protocolDAO.js +++ b/guacamole/src/main/webapp/app/rest/services/protocolDAO.js @@ -23,7 +23,7 @@ /** * The DAO for protocol operations agains the REST API. */ -angular.module('protocol').factory('protocolDAO', ['$http', function protocolDAO($http) { +angular.module('rest').factory('protocolDAO', ['$http', function protocolDAO($http) { var service = {}; diff --git a/guacamole/src/main/webapp/app/user/services/userDAO.js b/guacamole/src/main/webapp/app/rest/services/userDAO.js similarity index 98% rename from guacamole/src/main/webapp/app/user/services/userDAO.js rename to guacamole/src/main/webapp/app/rest/services/userDAO.js index c8ba6f376..2b4b35373 100644 --- a/guacamole/src/main/webapp/app/user/services/userDAO.js +++ b/guacamole/src/main/webapp/app/rest/services/userDAO.js @@ -23,7 +23,7 @@ /** * The DAO for connection operations agains the REST API. */ -angular.module('user').factory('userDAO', ['$http', 'authenticationService', +angular.module('rest').factory('userDAO', ['$http', 'authenticationService', function userDAO($http, authenticationService) { var service = {}; diff --git a/guacamole/src/main/webapp/app/user/services/userService.js b/guacamole/src/main/webapp/app/rest/services/userService.js similarity index 97% rename from guacamole/src/main/webapp/app/user/services/userService.js rename to guacamole/src/main/webapp/app/rest/services/userService.js index ea1cb633e..afe945dc5 100644 --- a/guacamole/src/main/webapp/app/user/services/userService.js +++ b/guacamole/src/main/webapp/app/rest/services/userService.js @@ -23,7 +23,7 @@ /** * A service for performing useful user related functionaltiy. */ -angular.module('user').factory('userService', ['$injector', function userService($injector) { +angular.module('rest').factory('userService', ['$injector', function userService($injector) { var permissionCheckService = $injector.get('permissionCheckService'); diff --git a/guacamole/src/main/webapp/app/connection/types/Connection.js b/guacamole/src/main/webapp/app/rest/types/Connection.js similarity index 97% rename from guacamole/src/main/webapp/app/connection/types/Connection.js rename to guacamole/src/main/webapp/app/rest/types/Connection.js index 59ed68c91..ab5aa8eca 100644 --- a/guacamole/src/main/webapp/app/connection/types/Connection.js +++ b/guacamole/src/main/webapp/app/rest/types/Connection.js @@ -23,7 +23,7 @@ /** * Service which defines the Connection class. */ -angular.module('connection').factory('Connection', [function defineConnection() { +angular.module('rest').factory('Connection', [function defineConnection() { /** * The object returned by REST API calls when representing the data diff --git a/guacamole/src/main/webapp/app/connection/types/ConnectionHistoryEntry.js b/guacamole/src/main/webapp/app/rest/types/ConnectionHistoryEntry.js similarity index 96% rename from guacamole/src/main/webapp/app/connection/types/ConnectionHistoryEntry.js rename to guacamole/src/main/webapp/app/rest/types/ConnectionHistoryEntry.js index 7409e52b9..9f0023323 100644 --- a/guacamole/src/main/webapp/app/connection/types/ConnectionHistoryEntry.js +++ b/guacamole/src/main/webapp/app/rest/types/ConnectionHistoryEntry.js @@ -23,7 +23,7 @@ /** * Service which defines the ConnectionHistoryEntry class. */ -angular.module('connection').factory('ConnectionHistoryEntry', [function defineConnectionHistoryEntry() { +angular.module('rest').factory('ConnectionHistoryEntry', [function defineConnectionHistoryEntry() { /** * The object returned by REST API calls when representing the data diff --git a/guacamole/src/main/webapp/app/user/userModule.js b/guacamole/src/main/webapp/app/user/userModule.js deleted file mode 100644 index abfef1c13..000000000 --- a/guacamole/src/main/webapp/app/user/userModule.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 Glyptodon LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * A module for code relating to users. - */ -angular.module('user', ['auth']);