mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 21:51:23 +00:00
GUAC-932: Refactor existing REST service JS into single 'rest' module.
This commit is contained in:
@@ -23,4 +23,4 @@
|
|||||||
/**
|
/**
|
||||||
* The module for code used to connect to a connection or balancing group.
|
* The module for code used to connect to a connection or balancing group.
|
||||||
*/
|
*/
|
||||||
angular.module('client', ['auth', 'history']);
|
angular.module('client', ['auth', 'history', 'rest']);
|
||||||
|
@@ -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']);
|
|
@@ -20,4 +20,4 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
angular.module('home', ['connection', 'connectionGroup', 'history', 'user', 'permission']);
|
angular.module('home', ['history', 'rest']);
|
||||||
|
@@ -24,4 +24,4 @@
|
|||||||
* The module for the root of the application.
|
* The module for the root of the application.
|
||||||
*/
|
*/
|
||||||
angular.module('index', ['ngRoute', 'pascalprecht.translate',
|
angular.module('index', ['ngRoute', 'pascalprecht.translate',
|
||||||
'auth', 'home', 'manage', 'login', 'client', 'notification']);
|
'auth', 'home', 'manage', 'login', 'client', 'notification', 'rest']);
|
||||||
|
@@ -23,5 +23,5 @@
|
|||||||
/**
|
/**
|
||||||
* The module for the administration functionality.
|
* The module for the administration functionality.
|
||||||
*/
|
*/
|
||||||
angular.module('manage', ['btford.modal', 'protocol', 'connection', 'connectionGroup', 'util']);
|
angular.module('manage', ['btford.modal', 'rest', 'util']);
|
||||||
|
|
||||||
|
@@ -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']);
|
|
@@ -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', []);
|
|
@@ -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']);
|
@@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* The DAO for connection group operations agains the REST API.
|
* 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) {
|
function connectionGrouDAO($http, authenticationService) {
|
||||||
|
|
||||||
/**
|
/**
|
@@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* A service for performing useful connection group related functionaltiy.
|
* 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 connectionGroupDAO = $injector.get('connectionGroupDAO');
|
||||||
var connectionService = $injector.get('connectionService');
|
var connectionService = $injector.get('connectionService');
|
@@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* Service for operating on connections via the REST API.
|
* 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) {
|
function connectionService($http, authenticationService) {
|
||||||
|
|
||||||
var service = {};
|
var service = {};
|
@@ -24,7 +24,7 @@
|
|||||||
* A service for checking if a specific permission exists
|
* A service for checking if a specific permission exists
|
||||||
* in a given list of permissions.
|
* in a given list of permissions.
|
||||||
*/
|
*/
|
||||||
angular.module('permission').factory('permissionCheckService', [
|
angular.module('rest').factory('permissionCheckService', [
|
||||||
function permissionCheckService() {
|
function permissionCheckService() {
|
||||||
|
|
||||||
var service = {};
|
var service = {};
|
@@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* The DAO for permission operations agains the REST API.
|
* 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) {
|
function permissionDAO($http, authenticationService) {
|
||||||
|
|
||||||
var service = {};
|
var service = {};
|
@@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* The DAO for protocol operations agains the REST API.
|
* 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 = {};
|
var service = {};
|
||||||
|
|
@@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* The DAO for connection operations agains the REST API.
|
* 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) {
|
function userDAO($http, authenticationService) {
|
||||||
|
|
||||||
var service = {};
|
var service = {};
|
@@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* A service for performing useful user related functionaltiy.
|
* 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');
|
var permissionCheckService = $injector.get('permissionCheckService');
|
||||||
|
|
@@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* Service which defines the Connection class.
|
* 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
|
* The object returned by REST API calls when representing the data
|
@@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* Service which defines the ConnectionHistoryEntry class.
|
* 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
|
* The object returned by REST API calls when representing the data
|
@@ -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']);
|
|
Reference in New Issue
Block a user