mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
Update messages are working, but it's not clean and we should find a better way at some point.
This commit is contained in:
parent
f50e80749c
commit
160e374c7a
@ -146,6 +146,8 @@ class Server:
|
||||
'error': msg
|
||||
})
|
||||
return False
|
||||
websocket_helper.broadcast('send_start_reload', {
|
||||
})
|
||||
self.is_crashed = False
|
||||
|
||||
self.start_time = str(datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S'))
|
||||
|
@ -221,6 +221,7 @@
|
||||
|
||||
if (webSocket) {
|
||||
webSocket.on('send_start_error', function (start_error) {
|
||||
|
||||
var closeEl = document.createElement('span');
|
||||
var strongEL = document.createElement('strong');
|
||||
var msgEl = document.createElement('div');
|
||||
@ -248,7 +249,12 @@ if (webSocket) {
|
||||
parentEl.appendChild(msgEl);
|
||||
|
||||
document.querySelector('.warnings').appendChild(parentEl);
|
||||
});
|
||||
}
|
||||
|
||||
if (webSocket) {
|
||||
webSocket.on('send_start_reload', function (start_error) {
|
||||
location.reload()
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,11 @@ function send_command (server_id, command){
|
||||
success: function(data){
|
||||
console.log("got response:");
|
||||
console.log(data);
|
||||
setTimeout(function(){ location.reload() }, 10000);
|
||||
setTimeout(function(){
|
||||
if (command != 'start_server'){
|
||||
location.reload();
|
||||
}
|
||||
}, 10000);
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -127,7 +127,11 @@
|
||||
success: function(data){
|
||||
console.log("got response:");
|
||||
console.log(data);
|
||||
setTimeout(function(){ location.reload(); }, 10000);
|
||||
setTimeout(function(){
|
||||
if (command != 'start_server'){
|
||||
location.reload();
|
||||
}
|
||||
}, 10000);
|
||||
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user