Fix the terminal to stop glitching out and not displaying unless window is resized.

This commit is contained in:
Dane Everitt 2017-04-14 01:21:38 -04:00
parent 6fb44f7d7b
commit a2b451b990
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 478 additions and 603 deletions

View file

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