mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'dev' into refactor/in-file
This commit is contained in:
commit
aa0824630a
@ -4,8 +4,11 @@
|
||||
TBD
|
||||
### Bug fixes
|
||||
- Include tzdata in Docker image ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/604))
|
||||
- Fix text/formatting issue on server config page ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/602))
|
||||
- Bump required version of PyYAML to 6.0.1 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/609))
|
||||
- Fix enable/disable schedule toggles on schedule list ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/606))
|
||||
### Tweaks
|
||||
TBD
|
||||
- Add public status link to login ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/608))
|
||||
### Lang
|
||||
TBD
|
||||
<br><br>
|
||||
|
@ -92,20 +92,21 @@ class ApiServersServerTasksIndexHandler(BaseApiHandler):
|
||||
data["start_time"] = "00:00"
|
||||
|
||||
# validate cron string
|
||||
if data["cron_string"] != "" and not croniter.is_valid(data["cron_string"]):
|
||||
return self.finish_json(
|
||||
405,
|
||||
{
|
||||
"status": "error",
|
||||
"error": self.helper.translation.translate(
|
||||
"error",
|
||||
"cronFormat",
|
||||
self.controller.users.get_user_lang_by_id(
|
||||
auth_data[4]["user_id"]
|
||||
if "cron_string" in data:
|
||||
if data["cron_string"] != "" and not croniter.is_valid(data["cron_string"]):
|
||||
return self.finish_json(
|
||||
405,
|
||||
{
|
||||
"status": "error",
|
||||
"error": self.helper.translation.translate(
|
||||
"error",
|
||||
"cronFormat",
|
||||
self.controller.users.get_user_lang_by_id(
|
||||
auth_data[4]["user_id"]
|
||||
),
|
||||
),
|
||||
),
|
||||
},
|
||||
)
|
||||
},
|
||||
)
|
||||
if "parent" not in data:
|
||||
data["parent"] = None
|
||||
task_id = self.tasks_manager.schedule_job(data)
|
||||
|
@ -136,20 +136,21 @@ class ApiServersServerTasksTaskIndexHandler(BaseApiHandler):
|
||||
data["parent"] = None
|
||||
|
||||
data["server_id"] = server_id
|
||||
if data["cron_string"] != "" and not croniter.is_valid(data["cron_string"]):
|
||||
return self.finish_json(
|
||||
405,
|
||||
{
|
||||
"status": "error",
|
||||
"error": self.helper.translation.translate(
|
||||
"error",
|
||||
"cronFormat",
|
||||
self.controller.users.get_user_lang_by_id(
|
||||
auth_data[4]["user_id"]
|
||||
if "cron_string" in data:
|
||||
if data["cron_string"] != "" and not croniter.is_valid(data["cron_string"]):
|
||||
return self.finish_json(
|
||||
405,
|
||||
{
|
||||
"status": "error",
|
||||
"error": self.helper.translation.translate(
|
||||
"error",
|
||||
"cronFormat",
|
||||
self.controller.users.get_user_lang_by_id(
|
||||
auth_data[4]["user_id"]
|
||||
),
|
||||
),
|
||||
),
|
||||
},
|
||||
)
|
||||
},
|
||||
)
|
||||
self.tasks_manager.update_job(task_id, data)
|
||||
|
||||
self.controller.management.add_to_audit_log(
|
||||
|
@ -166,48 +166,6 @@
|
||||
<input type="number" class="form-control" name="logs_delete_after" id="logs_delete_after" value="{{ data['server_stats']['server_id']['logs_delete_after'] }}" step="1" max="365" min="0" required>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="form-check-flat">
|
||||
<label for="auto_start" class="form-check-label ml-4 mb-4">
|
||||
{% if data['server_stats']['server_id']['auto_start'] %}
|
||||
<input type="checkbox" class="form-check-input" id="auto_start" name="auto_start" checked=""
|
||||
data-toggle="toggle" value="1"> {{ translate('serverConfig', 'serverAutoStart',
|
||||
data['lang']) }}
|
||||
{% else %}
|
||||
<input type="checkbox" class="form-check-input" id="auto_start" name="auto_start" value="1"
|
||||
data-toggle="toggle"> {{
|
||||
translate('serverConfig', 'serverAutoStart', data['lang']) }}
|
||||
{% end %}
|
||||
</label>
|
||||
|
||||
<label for="crash_detection" class="form-check-label ml-4 mb-4">
|
||||
{% if data['server_stats']['server_id']['crash_detection'] %}
|
||||
<input type="checkbox" class="form-check-input" id="crash_detection" name="crash_detection"
|
||||
data-toggle="toggle" checked="" value="1"> {{ translate('serverConfig',
|
||||
'serverCrashDetection', data['lang']) }}
|
||||
{% else %}
|
||||
<input type="checkbox" class="form-check-input" id="crash_detection" name="crash_detection"
|
||||
data-toggle="toggle" value="1"> {{ translate('serverConfig', 'serverCrashDetection',
|
||||
data['lang']) }}
|
||||
{% end %}
|
||||
</label>
|
||||
|
||||
{% if data['super_user'] %}
|
||||
<label for="show_status" class="form-check-label ml-4 mb-4">
|
||||
{% if data['server_stats']['server_id']['show_status'] %}
|
||||
<input type="checkbox" class="form-check-input" id="show_status" name="show_status"
|
||||
data-toggle="toggle" checked="" value="1"> {{ translate('serverConfig', 'showStatus',
|
||||
data['lang']) }}
|
||||
{% else %}
|
||||
<input type="checkbox" class="form-check-input" id="show_status" name="show_status"
|
||||
data-toggle="toggle" value="1"> {{ translate('serverConfig', 'showStatus',
|
||||
data['lang']) }}
|
||||
{% end %}
|
||||
</label>
|
||||
{% end %}
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
{% if data['server_stats']['server_id']['auto_start'] %}
|
||||
@ -237,7 +195,7 @@
|
||||
<input type="checkbox" class="custom-control-input" id="show_status" name="show_status" checked="" value="1">
|
||||
<label class="custom-control-label" for="show_status"> {{ translate('serverConfig', 'showStatus', data['lang']) }}</label>
|
||||
{% else %}
|
||||
<input type="checkbox" class="custom-control-input" id="show_status" name="show_status" value="1"> {{ translate('serverConfig', 'showStatus', data['lang']) }}
|
||||
<input type="checkbox" class="custom-control-input" id="show_status" name="show_status" value="1">
|
||||
<label class="custom-control-label" for="show_status"> {{ translate('serverConfig', 'showStatus', data['lang']) }}</label>
|
||||
{% end %}
|
||||
{% end %}
|
||||
|
@ -120,6 +120,11 @@
|
||||
<span class="text-small font-weight-semibold"><a href="https://craftycontrol.com/">Crafty Control
|
||||
{{data['version'] }}</a> </span>
|
||||
</div>
|
||||
|
||||
<div class="text-block text-center my-3">
|
||||
<a href="/status" class="text-small forgot-password">{{ translate('login', 'viewStatus',
|
||||
data['lang']) }}</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
@ -203,7 +203,8 @@
|
||||
"forgotPassword": "Forgot Password",
|
||||
"login": "Log In",
|
||||
"password": "Password",
|
||||
"username": "Username"
|
||||
"username": "Username",
|
||||
"viewStatus": "View Public Status Page"
|
||||
},
|
||||
"notify": {
|
||||
"activityLog": "Activity Logs",
|
||||
|
@ -12,7 +12,7 @@ pexpect==4.8
|
||||
psutil==5.9
|
||||
pyOpenSSL==23.2.0
|
||||
pyjwt==2.4.0
|
||||
PyYAML==5.4
|
||||
PyYAML==6.0.1
|
||||
requests==2.31
|
||||
termcolor==1.1
|
||||
tornado==6.3.2
|
||||
|
Loading…
Reference in New Issue
Block a user