mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-605: Remove unnecessary watch on connection name.
This commit is contained in:
@@ -23,8 +23,8 @@
|
|||||||
/**
|
/**
|
||||||
* The controller for the page used to connect to a connection or balancing group.
|
* The controller for the page used to connect to a connection or balancing group.
|
||||||
*/
|
*/
|
||||||
angular.module('home').controller('clientController', ['$scope', '$routeParams', 'localStorageUtility', '$injector',
|
angular.module('home').controller('clientController', ['$scope', '$routeParams', '$injector',
|
||||||
function clientController($scope, $routeParams, localStorageUtility, $injector) {
|
function clientController($scope, $routeParams, $injector) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In order to open the guacamole menu, we need to hit ctrl-alt-shift. There are
|
* In order to open the guacamole menu, we need to hit ctrl-alt-shift. There are
|
||||||
@@ -97,25 +97,20 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams',
|
|||||||
$scope.id = $routeParams.type + '/' + $routeParams.id;
|
$scope.id = $routeParams.type + '/' + $routeParams.id;
|
||||||
$scope.connectionParameters = $routeParams.params || '';
|
$scope.connectionParameters = $routeParams.params || '';
|
||||||
|
|
||||||
// Keep title in sync with connection state
|
|
||||||
$scope.$watch('connectionName', function updateTitle() {
|
|
||||||
$scope.page.title = $scope.connectionName;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Pull connection name from server
|
// Pull connection name from server
|
||||||
switch ($scope.type) {
|
switch ($scope.type) {
|
||||||
|
|
||||||
// Connection
|
// Connection
|
||||||
case 'c':
|
case 'c':
|
||||||
connectionDAO.getConnection($scope.id).success(function (connection) {
|
connectionDAO.getConnection($scope.id).success(function (connection) {
|
||||||
$scope.connectionName = connection.name;
|
$scope.page.title = connection.name;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Connection group
|
// Connection group
|
||||||
case 'g':
|
case 'g':
|
||||||
connectionGroupDAO.getConnectionGroup($scope.id).success(function (group) {
|
connectionGroupDAO.getConnectionGroup($scope.id).success(function (group) {
|
||||||
$scope.connectionName = group.name;
|
$scope.page.title = group.name;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user