Fix multiple clients causing all consoles to refresh
This commit is contained in:
parent
202dd52e2b
commit
0c6e6f39fe
2 changed files with 15 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue