GUACAMOLE-567: Warn user when tunnel enters "UNSTABLE" state.

This commit is contained in:
Michael Jumper
2017-12-10 20:28:35 -08:00
parent e6f3665995
commit 1ed22401bb
6 changed files with 76 additions and 1 deletions

View File

@@ -626,6 +626,18 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
};
/**
* Returns whether the current connection has been flagged as unstable due
* to an apparent network disruption.
*
* @returns {Boolean}
* true if the current connection has been flagged as unstable, false
* otherwise.
*/
$scope.isConnectionUnstable = function isConnectionUnstable() {
return $scope.client && $scope.client.clientState.connectionState === ManagedClientState.ConnectionState.UNSTABLE;
};
// Show status dialog when connection status changes
$scope.$watch('client.clientState.connectionState', function clientStateChanged(connectionState) {