Fix multiple clients causing all consoles to refresh
This commit is contained in:
parent
202dd52e2b
commit
0c6e6f39fe
|
@ -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.
|
* `[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 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.
|
* 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
|
### Added
|
||||||
* Ability to assign multiple allocations at once when creating a new server.
|
* Ability to assign multiple allocations at once when creating a new server.
|
||||||
|
|
|
@ -24,6 +24,7 @@ var Console = (function () {
|
||||||
|
|
||||||
var terminalQueue;
|
var terminalQueue;
|
||||||
var terminal;
|
var terminal;
|
||||||
|
var recievedInitialLog = false;
|
||||||
|
|
||||||
var cpuChart;
|
var cpuChart;
|
||||||
var cpuData;
|
var cpuData;
|
||||||
|
@ -159,12 +160,13 @@ var Console = (function () {
|
||||||
function addSocketListeners() {
|
function addSocketListeners() {
|
||||||
// Update Listings on Initial Status
|
// Update Listings on Initial Status
|
||||||
Socket.on('initial status', function (data) {
|
Socket.on('initial status', function (data) {
|
||||||
|
if (! recievedInitialLog) {
|
||||||
updateServerPowerControls(data.status);
|
updateServerPowerControls(data.status);
|
||||||
|
|
||||||
terminal.clear();
|
|
||||||
if (data.status === 1 || data.status === 2) {
|
if (data.status === 1 || data.status === 2) {
|
||||||
Socket.emit('send server log');
|
Socket.emit('send server log');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update Listings on Status
|
// Update Listings on Status
|
||||||
|
@ -172,6 +174,14 @@ var Console = (function () {
|
||||||
updateServerPowerControls(data.status);
|
updateServerPowerControls(data.status);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Socket.on('server log', function (data) {
|
||||||
|
if (! recievedInitialLog) {
|
||||||
|
terminal.clear();
|
||||||
|
terminalQueue.push(data);
|
||||||
|
recievedInitialLog = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Socket.on('console', function (data) {
|
Socket.on('console', function (data) {
|
||||||
terminalQueue.push(data.line);
|
terminalQueue.push(data.line);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue