Fix the terminal to stop glitching out and not displaying unless window is resized.
This commit is contained in:
parent
6fb44f7d7b
commit
a2b451b990
11 changed files with 478 additions and 603 deletions
|
@ -50,11 +50,13 @@ var Server = (function () {
|
|||
|
||||
var notifySocketError = false;
|
||||
|
||||
console.log('Starting connection');
|
||||
window.Socket = io(Pterodactyl.node.scheme + '://' + Pterodactyl.node.fqdn + ':' + Pterodactyl.node.daemonListen + '/ws/' + Pterodactyl.server.uuid, {
|
||||
'query': 'token=' + Pterodactyl.server.daemonSecret,
|
||||
});
|
||||
|
||||
Socket.io.on('connect_error', function (err) {
|
||||
console.log('connect_error');
|
||||
if(typeof notifySocketError !== 'object') {
|
||||
notifySocketError = $.notify({
|
||||
message: 'There was an error attempting to establish a WebSocket connection to the Daemon. This panel will not work as expected.<br /><br />' + err,
|
||||
|
@ -67,6 +69,7 @@ var Server = (function () {
|
|||
|
||||
// Connected to Socket Successfully
|
||||
Socket.on('connect', function () {
|
||||
console.log('connect');
|
||||
if (notifySocketError !== false) {
|
||||
notifySocketError.close();
|
||||
notifySocketError = false;
|
||||
|
@ -74,6 +77,7 @@ var Server = (function () {
|
|||
});
|
||||
|
||||
Socket.on('initial status', function (data) {
|
||||
console.log('initial status');
|
||||
setStatusIcon(data.status);
|
||||
});
|
||||
|
||||
|
|
Reference in a new issue