mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fixed term buttons not changing on start/stop
This commit is contained in:
parent
c8759ac872
commit
35047e062a
@ -232,12 +232,6 @@ if (webSocket) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (webSocket) {
|
|
||||||
webSocket.on('send_start_reload', function (start_error) {
|
|
||||||
location.reload()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function warn(message) {
|
function warn(message) {
|
||||||
var closeEl = document.createElement('span');
|
var closeEl = document.createElement('span');
|
||||||
|
@ -286,6 +286,13 @@ $( document ).ready(function() {
|
|||||||
mem_percent.textContent = hostStats.mem_percent + '%';
|
mem_percent.textContent = hostStats.mem_percent + '%';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (webSocket) {
|
||||||
|
webSocket.on('send_start_reload', function (start_error) {
|
||||||
|
location.reload()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (webSocket) {
|
if (webSocket) {
|
||||||
webSocket.on('update_button_status', function (updateButton) {
|
webSocket.on('update_button_status', function (updateButton) {
|
||||||
var id = 'controls';
|
var id = 'controls';
|
||||||
|
@ -77,6 +77,16 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
function send_command (server_id, command){
|
function send_command (server_id, command){
|
||||||
|
if (command == 'start_server'){
|
||||||
|
startBtn.setAttribute('disabled', 'disabled');
|
||||||
|
restartBtn.removeAttribute('disabled');
|
||||||
|
stopBtn.removeAttribute('disabled');
|
||||||
|
}
|
||||||
|
if (command == 'stop_server'){
|
||||||
|
startBtn.removeAttribute('disabled');
|
||||||
|
restartBtn.setAttribute('disabled', 'disabled');
|
||||||
|
stopBtn.setAttribute('disabled', 'disabled');
|
||||||
|
}
|
||||||
<!-- this getCookie function is in base.html-->
|
<!-- this getCookie function is in base.html-->
|
||||||
var token = getCookie("_xsrf");
|
var token = getCookie("_xsrf");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user