mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-04 17:33:21 +08:00
Show a server disconnected message when user is not able to connect to
server.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
$scope.selectedInstance = null;
|
||||
$scope.isAlive = true;
|
||||
$scope.ttl = '--:--:--';
|
||||
$scope.connected = true;
|
||||
|
||||
angular.element($window).bind('resize', function(){
|
||||
if ($scope.selectedInstance) {
|
||||
@@ -123,6 +124,13 @@
|
||||
});
|
||||
});
|
||||
|
||||
socket.on('connect_error', function() {
|
||||
$scope.connected = false;
|
||||
});
|
||||
socket.on('connect', function() {
|
||||
$scope.connected = true;
|
||||
});
|
||||
|
||||
$scope.socket = socket;
|
||||
|
||||
var i = response.data;
|
||||
|
@@ -42,3 +42,7 @@ md-card-content.terminal {
|
||||
margin-bottom: auto;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.disconnected {
|
||||
background-color: #FDF4B6;
|
||||
}
|
||||
|
Reference in New Issue
Block a user