Minor patch
This commit is contained in:
parent
716221c678
commit
99ab72ec98
@ -124,7 +124,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="server-port" class="col-form-label">Server port:</label>
|
<label for="server-port" class="col-form-label">Server port:</label>
|
||||||
<input type="text" class="form-control" id="server-port" placeholder="8080">
|
<input type="number" class="form-control" id="server-port" placeholder="8080">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" id="server-ssl">
|
<input class="form-check-input" type="checkbox" id="server-ssl">
|
||||||
|
@ -85,7 +85,7 @@ function onWebSocketsMessage(message){
|
|||||||
console.log(message);
|
console.log(message);
|
||||||
|
|
||||||
//Add interval for Players, CPU and RAM info, if not set
|
//Add interval for Players, CPU and RAM info, if not set
|
||||||
if(statusCommandsInterval == -1){
|
if(statusCommandsInterval == -1 && message.status !== 401){
|
||||||
statusCommandsInterval = setInterval(function(){
|
statusCommandsInterval = setInterval(function(){
|
||||||
connectionManager.askForInfo();
|
connectionManager.askForInfo();
|
||||||
}, 2500);
|
}, 2500);
|
||||||
|
@ -15,7 +15,8 @@ public class RamUsageCommand implements WSCommand {
|
|||||||
int max = (int) r.maxMemory() / 1024 / 1024;
|
int max = (int) r.maxMemory() / 1024 / 1024;
|
||||||
int used = max - free;
|
int used = max - free;
|
||||||
|
|
||||||
wsServer.sendToClient(conn, new RamUsage(free + " free, " + used + " used, " + max + " maximum memmory", free, used, max));
|
wsServer.sendToClient(conn,
|
||||||
|
new RamUsage(free + " free, " + used + " used, " + max + " maximum memory", free, used, max));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user