Merge branch 'dev' into maintenance/bump-orjson

This commit is contained in:
Zedifus 2023-10-07 17:03:24 +01:00
commit d48a0daa0a
6 changed files with 31 additions and 10 deletions

View File

@ -13,6 +13,8 @@
- Fix public status page not updating #255 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/615))
- Fix service worker vulrn and CQ raised by SonarQ ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/631))
- Fix Backup Restore/Schedules, Backup button function on `remote-comms2` ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/634))
- Add a wait to the call for the directory so we can make sure the wait dialogue has time to show up first ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/637))
- Fix bug where a reaction loop could be created, but would be cut short by an error when the loop occurred ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/636))
### Refactor
- Consolidate remaining frontend functions into API V2, and remove ajax internal API ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/585))
- Replace bleach with nh3 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/628))
@ -24,6 +26,7 @@
- Make files hover cursor pointer ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/627))
- Use `Jar` class naming for jar refresh to make room for steamCMD naming in the future ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/630))
- Improve ui visibility of Build Wizard selection tabs ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/633))
- Add additional logging for server bootstrap & moves unnecessary logging to `debug` for improved log clarity ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/635))
### Lang
TBD
<br><br>

View File

@ -226,7 +226,7 @@ class Stats:
def get_server_players(self, server_id):
server = HelperServers.get_server_data_by_id(server_id)
logger.info(f"Getting players for server {server}")
logger.debug(f"Getting players for server {server['server_name']}")
internal_ip = server["server_ip"]
server_port = server["server_port"]

View File

@ -834,6 +834,7 @@ class ServerInstance:
f"Assuming it was never started."
)
if self.settings["stop_command"]:
logger.info(f"Stop command requested for {self.settings['server_name']}.")
self.send_command(self.settings["stop_command"])
self.write_player_cache()
else:
@ -903,6 +904,9 @@ class ServerInstance:
if not self.check_running():
self.run_threaded_server(user_id)
else:
logger.info(
f"Restart command detected. Sending stop command to {self.server_id}."
)
self.stop_threaded_server()
time.sleep(2)
self.run_threaded_server(user_id)
@ -1679,7 +1683,7 @@ class ServerInstance:
def get_server_players(self):
server = HelperServers.get_server_data_by_id(self.server_id)
logger.info(f"Getting players for server {server}")
logger.debug(f"Getting players for server {server['server_name']}")
internal_ip = server["server_ip"]
server_port = server["server_port"]

View File

@ -330,6 +330,8 @@ class TasksManager:
# Check to see if it's enabled and is not a chain reaction.
if job_data["enabled"] and job_data["interval_type"] != "reaction":
# Lets make sure this can not be mistaken for a reaction
job_data["parent"] = None
new_job = "error"
if job_data["cron_string"] != "":
try:
@ -450,7 +452,10 @@ class TasksManager:
def update_job(self, sch_id, job_data):
# Checks to make sure some doofus didn't actually make the newly
# created task a child of itself.
if str(job_data.get("parent")) == str(sch_id):
if (
str(job_data.get("parent")) == str(sch_id)
or job_data["interval_type"] != "reaction"
):
job_data["parent"] = None
HelpersManagement.update_scheduled_task(sch_id, job_data)
@ -609,7 +614,10 @@ class TasksManager:
):
# event job ID's are strings so we need to look at
# this as the same data type.
if str(schedule.parent) == str(event.job_id):
if (
str(schedule.parent) == str(event.job_id)
and schedule.interval_type == "reaction"
):
if schedule.enabled:
delaytime = datetime.datetime.now() + datetime.timedelta(
seconds=schedule.delay

View File

@ -591,7 +591,9 @@
message: '<p class="text-center mb-0"><i class="fa fa-spin fa-cog"></i> Please wait while we gather your files...</p>',
closeButton: false
});
setTimeout(function(){
getDirView();
}, 2000);
} else {
bootbox.alert("You must input a path before selecting this button");
}
@ -638,7 +640,9 @@
message: '<p class="text-center mb-0"><i class="fa fa-spin fa-cog"></i> Please wait while we gather your files...</p>',
closeButton: false
});
setTimeout(function(){
getDirView();
}, 2000);
} else {
bootbox.alert("You must input a path before selecting this button");
}

View File

@ -826,8 +826,9 @@
message: '<p class="text-center mb-0"><i class="fa fa-spin fa-cog"></i> Please wait while we gather your files...</p>',
closeButton: false
});
console.log("CALLING DIR")
setTimeout(function(){
getDirView();
}, 2000);
} else {
bootbox.alert("You must input a path before selecting this button");
}
@ -843,8 +844,9 @@
message: '<p class="text-center mb-0"><i class="fa fa-spin fa-cog"></i> Please wait while we gather your files...</p>',
closeButton: false
});
console.log("CALLING DIR")
setTimeout(function(){
getDirView();
}, 2000);
});
var upload = false;
var file;