diff --git a/guacamole/src/main/frontend/src/app/client/controllers/clientController.js b/guacamole/src/main/frontend/src/app/client/controllers/clientController.js index 389170745..c391b3b2f 100644 --- a/guacamole/src/main/frontend/src/app/client/controllers/clientController.js +++ b/guacamole/src/main/frontend/src/app/client/controllers/clientController.js @@ -201,7 +201,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams name : "CLIENT.ACTION_RECONNECT", className : "reconnect button", callback : function reconnectCallback() { - $scope.client = guacClientManager.replaceManagedClient($routeParams.id, $routeParams.params); + $scope.client = guacClientManager.replaceManagedClient($routeParams.id); guacNotification.showStatus(false); } }; @@ -287,7 +287,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams var ids = $routeParams.id.split(/[ +]/); ids.forEach(function addClient(id) { - clients.push(guacClientManager.getManagedClient(id, $routeParams.params)); + clients.push(guacClientManager.getManagedClient(id)); }); return clients; diff --git a/guacamole/src/main/frontend/src/app/client/services/guacClientManager.js b/guacamole/src/main/frontend/src/app/client/services/guacClientManager.js index 4b81e6d19..71918ea67 100644 --- a/guacamole/src/main/frontend/src/app/client/services/guacClientManager.js +++ b/guacamole/src/main/frontend/src/app/client/services/guacClientManager.js @@ -96,22 +96,17 @@ angular.module('client').factory('guacClientManager', ['$injector', * @param {String} id * The ID of the connection whose ManagedClient should be retrieved. * - * @param {String} [connectionParameters] - * Any additional HTTP parameters to pass while connecting. This - * parameter only has an effect if a new connection is established as - * a result of this function call. - * * @returns {ManagedClient} * The ManagedClient associated with the connection having the given * ID. */ - service.replaceManagedClient = function replaceManagedClient(id, connectionParameters) { + service.replaceManagedClient = function replaceManagedClient(id) { // Disconnect any existing client service.removeManagedClient(id); // Set new client - return storedManagedClients()[id] = ManagedClient.getInstance(id, connectionParameters); + return storedManagedClients()[id] = ManagedClient.getInstance(id); }; @@ -123,22 +118,17 @@ angular.module('client').factory('guacClientManager', ['$injector', * @param {String} id * The ID of the connection whose ManagedClient should be retrieved. * - * @param {String} [connectionParameters] - * Any additional HTTP parameters to pass while connecting. This - * parameter only has an effect if a new connection is established as - * a result of this function call. - * * @returns {ManagedClient} * The ManagedClient associated with the connection having the given * ID. */ - service.getManagedClient = function getManagedClient(id, connectionParameters) { + service.getManagedClient = function getManagedClient(id) { var managedClients = storedManagedClients(); // Create new managed client if it doesn't already exist if (!(id in managedClients)) - managedClients[id] = ManagedClient.getInstance(id, connectionParameters); + managedClients[id] = ManagedClient.getInstance(id); // Return existing client return managedClients[id]; diff --git a/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js b/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js index 51c38a3ed..4e59b6ae5 100644 --- a/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js +++ b/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js @@ -46,7 +46,6 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', var connectionService = $injector.get('connectionService'); var preferenceService = $injector.get('preferenceService'); var requestService = $injector.get('requestService'); - var schemaService = $injector.get('schemaService'); var tunnelService = $injector.get('tunnelService'); var guacAudio = $injector.get('guacAudio'); var guacHistory = $injector.get('guacHistory'); @@ -260,14 +259,11 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', * @param {ClientIdentifier} identifier * The identifier representing the connection or group to connect to. * - * @param {String} [connectionParameters] - * Any additional HTTP parameters to pass while connecting. - * * @returns {Promise.} * A promise which resolves with the string of connection parameters to * be passed to the Guacamole client, once the string is ready. */ - var getConnectString = function getConnectString(identifier, connectionParameters) { + var getConnectString = function getConnectString(identifier) { var deferred = $q.defer(); @@ -286,8 +282,7 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', + "&GUAC_WIDTH=" + Math.floor(optimal_width) + "&GUAC_HEIGHT=" + Math.floor(optimal_height) + "&GUAC_DPI=" + Math.floor(optimal_dpi) - + "&GUAC_TIMEZONE=" + encodeURIComponent(preferenceService.preferences.timezone) - + (connectionParameters ? '&' + connectionParameters : ''); + + "&GUAC_TIMEZONE=" + encodeURIComponent(preferenceService.preferences.timezone); // Add audio mimetypes to connect string guacAudio.supported.forEach(function(mimetype) { @@ -355,14 +350,11 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', * a valid ClientIdentifier string, as would be generated by * ClientIdentifier.toString(). * - * @param {String} [connectionParameters] - * Any additional HTTP parameters to pass while connecting. - * * @returns {ManagedClient} * A new ManagedClient instance which is connected to the connection or * connection group having the given ID. */ - ManagedClient.getInstance = function getInstance(id, connectionParameters) { + ManagedClient.getInstance = function getInstance(id) { var tunnel; @@ -628,7 +620,7 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', var clientIdentifier = ClientIdentifier.fromString(id); // Connect the Guacamole client - getConnectString(clientIdentifier, connectionParameters) + getConnectString(clientIdentifier) .then(function connectClient(connectString) { client.connect(connectString); }); diff --git a/guacamole/src/main/frontend/src/app/index/config/indexRouteConfig.js b/guacamole/src/main/frontend/src/app/index/config/indexRouteConfig.js index 5a8c3fb8a..684114514 100644 --- a/guacamole/src/main/frontend/src/app/index/config/indexRouteConfig.js +++ b/guacamole/src/main/frontend/src/app/index/config/indexRouteConfig.js @@ -181,7 +181,7 @@ angular.module('index').config(['$routeProvider', '$locationProvider', }) // Client view - .when('/client/:id/:params?', { + .when('/client/:id', { bodyClassName : 'client', templateUrl : 'app/client/templates/client.html', controller : 'clientController',