forked from Alex/Pterodactyl-Panel
Show socketio error messages
This commit is contained in:
parent
e6ab6de3e5
commit
897338bfa7
@ -51,6 +51,7 @@ trait JavascriptInjection
|
|||||||
'uuidShort' => $server->uuidShort,
|
'uuidShort' => $server->uuidShort,
|
||||||
'daemonSecret' => $token,
|
'daemonSecret' => $token,
|
||||||
],
|
],
|
||||||
|
'server_token' => $token,
|
||||||
'node' => [
|
'node' => [
|
||||||
'fqdn' => $server->node->fqdn,
|
'fqdn' => $server->node->fqdn,
|
||||||
'scheme' => $server->node->scheme,
|
'scheme' => $server->node->scheme,
|
||||||
|
@ -57,6 +57,17 @@ var Server = (function () {
|
|||||||
'query': 'token=' + Pterodactyl.server.daemonSecret,
|
'query': 'token=' + Pterodactyl.server.daemonSecret,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Socket.on('error', function (err) {
|
||||||
|
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,
|
||||||
|
}, {
|
||||||
|
type: 'danger',
|
||||||
|
delay: 0,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Socket.io.on('connect_error', function (err) {
|
Socket.io.on('connect_error', function (err) {
|
||||||
if(typeof notifySocketError !== 'object') {
|
if(typeof notifySocketError !== 'object') {
|
||||||
notifySocketError = $.notify({
|
notifySocketError = $.notify({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user