1
0
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:
Jonathan Leibiusky @xetorthio
2016-11-15 17:48:21 -03:00
parent 7f9cf57f8f
commit 50943ce516
3 changed files with 16 additions and 1 deletions

View File

@@ -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;

View File

@@ -42,3 +42,7 @@ md-card-content.terminal {
margin-bottom: auto;
margin-top: 50px;
}
.disconnected {
background-color: #FDF4B6;
}