mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-981: Fix handling of errors. Fix handling of auto-reconnect.
This commit is contained in:
@@ -381,11 +381,12 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
|||||||
// Show status dialog when connection status changes
|
// Show status dialog when connection status changes
|
||||||
$scope.$watch('client.clientState.connectionState', function clientStateChanged(connectionState) {
|
$scope.$watch('client.clientState.connectionState', function clientStateChanged(connectionState) {
|
||||||
|
|
||||||
// Hide status if no known state
|
// Hide any existing status
|
||||||
if (!connectionState) {
|
$scope.showStatus(false);
|
||||||
$scope.showStatus(false);
|
|
||||||
|
// Do not display status if status not known
|
||||||
|
if (!connectionState)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// Get any associated status code
|
// Get any associated status code
|
||||||
var status = $scope.client.clientState.statusCode;
|
var status = $scope.client.clientState.statusCode;
|
||||||
|
@@ -66,8 +66,8 @@ angular.module('notification').directive('guacNotification', [function guacNotif
|
|||||||
$scope.timeRemaining--;
|
$scope.timeRemaining--;
|
||||||
|
|
||||||
// Call countdown callback when time remaining expires
|
// Call countdown callback when time remaining expires
|
||||||
if ($scope.timeRemaining === 0)
|
if ($scope.timeRemaining === 0 && countdown.callback)
|
||||||
countdown.performAction();
|
countdown.callback();
|
||||||
|
|
||||||
}, 1000, $scope.timeRemaining);
|
}, 1000, $scope.timeRemaining);
|
||||||
|
|
||||||
|
@@ -69,16 +69,6 @@ angular.module('notification').factory('NotificationAction', [function defineNot
|
|||||||
*/
|
*/
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
|
|
||||||
/**
|
|
||||||
* Calls the callback associated with this NotificationAction, if any.
|
|
||||||
* If no callback is associated with this NotificationAction, this
|
|
||||||
* function has no effect.
|
|
||||||
*/
|
|
||||||
this.performAction = function performAction() {
|
|
||||||
if (action.callback)
|
|
||||||
action.callback();
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return NotificationAction;
|
return NotificationAction;
|
||||||
|
@@ -72,16 +72,6 @@ angular.module('notification').factory('NotificationCountdown', [function define
|
|||||||
*/
|
*/
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
|
|
||||||
/**
|
|
||||||
* Calls the callback associated with this NotificationCountdown, if any.
|
|
||||||
* If no callback is associated with this NotificationCountdown, this
|
|
||||||
* function has no effect.
|
|
||||||
*/
|
|
||||||
this.performAction = function performAction() {
|
|
||||||
if (countdown.callback)
|
|
||||||
countdown.callback();
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return NotificationCountdown;
|
return NotificationCountdown;
|
||||||
|
Reference in New Issue
Block a user