1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-10-27 04:12:28 +01:00

Fix multiple clients causing all consoles to refresh

This commit is contained in:
Dane Everitt 2017-03-17 19:05:54 -04:00
parent 202dd52e2b
commit 0c6e6f39fe
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
2 changed files with 15 additions and 4 deletions

View File

@ -23,6 +23,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
* `[pre.4]` — Fixes non-admin users being unable to create personal API keys.
* Fixes bug where daemon was unable to register that certain games had fully booted and were ready to play on.
* Fixes bug causing MySQL user accounts to be corrupted when resetting a password via the panel.
* `[pre.4]` — Multiple clients refreshing the console no longer clears the console for all parties involved... sorry about that.
### Added
* Ability to assign multiple allocations at once when creating a new server.

View File

@ -24,6 +24,7 @@ var Console = (function () {
var terminalQueue;
var terminal;
var recievedInitialLog = false;
var cpuChart;
var cpuData;
@ -159,11 +160,12 @@ var Console = (function () {
function addSocketListeners() {
// Update Listings on Initial Status
Socket.on('initial status', function (data) {
updateServerPowerControls(data.status);
if (! recievedInitialLog) {
updateServerPowerControls(data.status);
terminal.clear();
if (data.status === 1 || data.status === 2) {
Socket.emit('send server log');
if (data.status === 1 || data.status === 2) {
Socket.emit('send server log');
}
}
});
@ -172,6 +174,14 @@ var Console = (function () {
updateServerPowerControls(data.status);
});
Socket.on('server log', function (data) {
if (! recievedInitialLog) {
terminal.clear();
terminalQueue.push(data);
recievedInitialLog = true;
}
});
Socket.on('console', function (data) {
terminalQueue.push(data.line);
});