mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'dev' into bug/backup-reload
This commit is contained in:
commit
e2a4e096a2
@ -11,13 +11,15 @@ release:
|
|||||||
script:
|
script:
|
||||||
- echo "Build Job $JOB_ID"
|
- echo "Build Job $JOB_ID"
|
||||||
- echo "Running release job for tag $CI_COMMIT_TAG"
|
- echo "Running release job for tag $CI_COMMIT_TAG"
|
||||||
release:
|
- |
|
||||||
name: Crafty $CI_COMMIT_TAG
|
full_changelog=$(cat CHANGELOG.md)
|
||||||
tag_name: $CI_COMMIT_TAG
|
trimmed_changelog="${full_changelog%%<br><br>*}"
|
||||||
description: ./CHANGELOG.md
|
echo "$trimmed_changelog"
|
||||||
ref: $CI_COMMIT_TAG
|
- release-cli create
|
||||||
assets:
|
--name "Crafty $CI_COMMIT_TAG"
|
||||||
links:
|
--description "$trimmed_changelog"
|
||||||
- name: Windows Package
|
--tag-name "$CI_COMMIT_TAG"
|
||||||
url: "$CI_PROJECT_URL/-/jobs/$JOB_ID/artifacts/download"
|
--ref "$CI_COMMIT_TAG"
|
||||||
link_type: package
|
--assets-link "{\"url\":\"$CI_PROJECT_URL/-/jobs/$JOB_ID/artifacts/download\",\"name\":\"Windows Package\",\"link_type\":\"package\"}"
|
||||||
|
# Having to use raw release-cli instead of yaml syntax because variables are not expanding
|
||||||
|
# https://gitlab.com/gitlab-org/gitlab/-/issues/237893#note_403465700
|
||||||
|
@ -3,9 +3,13 @@
|
|||||||
### New features
|
### New features
|
||||||
TBD
|
TBD
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
TBD
|
- Fix reaction tasks not firing ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/423))
|
||||||
|
- QOL task delay offset not following over on task edit ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/423))
|
||||||
|
- Fix Fresh Install Detection Logic issues ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/425))
|
||||||
### Tweaks
|
### Tweaks
|
||||||
TBD
|
- Session Handling | Logout on browser close ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/424))
|
||||||
|
- Backups Panel | Only display zips ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/426))
|
||||||
|
- User creation | Fix page browser title ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/427))
|
||||||
### Lang
|
### Lang
|
||||||
TBD
|
TBD
|
||||||
<br><br>
|
<br><br>
|
||||||
|
@ -107,6 +107,12 @@ class HelperUsers:
|
|||||||
usernames.append(user.username)
|
usernames.append(user.username)
|
||||||
return usernames
|
return usernames
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_user_total():
|
||||||
|
count = Users.select().where(Users.username != "system").count()
|
||||||
|
print(count)
|
||||||
|
return count
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_all_user_ids() -> t.List[int]:
|
def get_all_user_ids() -> t.List[int]:
|
||||||
return [
|
return [
|
||||||
|
@ -30,9 +30,8 @@ class DatabaseBuilder:
|
|||||||
|
|
||||||
def is_fresh_install(self):
|
def is_fresh_install(self):
|
||||||
try:
|
try:
|
||||||
user = self.users_helper.get_by_id(1)
|
num_user = self.users_helper.get_user_total()
|
||||||
if user:
|
return num_user <= 0
|
||||||
return False
|
|
||||||
except:
|
except:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -1023,6 +1023,7 @@ class ServerInstance:
|
|||||||
"size": f["size"],
|
"size": f["size"],
|
||||||
}
|
}
|
||||||
for f in files
|
for f in files
|
||||||
|
if f["path"].endswith(".zip")
|
||||||
]
|
]
|
||||||
|
|
||||||
def jar_update(self):
|
def jar_update(self):
|
||||||
|
@ -3,7 +3,7 @@ import time
|
|||||||
import logging
|
import logging
|
||||||
import threading
|
import threading
|
||||||
import asyncio
|
import asyncio
|
||||||
from datetime import datetime
|
import datetime
|
||||||
|
|
||||||
from tzlocal import get_localzone
|
from tzlocal import get_localzone
|
||||||
from tzlocal.utils import ZoneInfoNotFoundError
|
from tzlocal.utils import ZoneInfoNotFoundError
|
||||||
@ -199,7 +199,7 @@ class TasksManager:
|
|||||||
"interval",
|
"interval",
|
||||||
hours=12,
|
hours=12,
|
||||||
id="update_watcher",
|
id="update_watcher",
|
||||||
start_date=datetime.now(),
|
start_date=datetime.datetime.now(),
|
||||||
)
|
)
|
||||||
# self.scheduler.add_job(
|
# self.scheduler.add_job(
|
||||||
# self.scheduler.print_jobs, "interval", seconds=10, id="-1"
|
# self.scheduler.print_jobs, "interval", seconds=10, id="-1"
|
||||||
|
@ -962,6 +962,7 @@ class PanelHandler(BaseHandler):
|
|||||||
page_data["schedule"]["command"] = ""
|
page_data["schedule"]["command"] = ""
|
||||||
page_data["schedule"]["one_time"] = False
|
page_data["schedule"]["one_time"] = False
|
||||||
page_data["schedule"]["cron_string"] = ""
|
page_data["schedule"]["cron_string"] = ""
|
||||||
|
page_data["schedule"]["delay"] = 0
|
||||||
page_data["schedule"]["time"] = ""
|
page_data["schedule"]["time"] = ""
|
||||||
page_data["schedule"]["interval"] = ""
|
page_data["schedule"]["interval"] = ""
|
||||||
# we don't need to check difficulty here.
|
# we don't need to check difficulty here.
|
||||||
@ -1041,6 +1042,7 @@ class PanelHandler(BaseHandler):
|
|||||||
page_data["schedule"]["command"] = schedule.command
|
page_data["schedule"]["command"] = schedule.command
|
||||||
else:
|
else:
|
||||||
page_data["schedule"]["command"] = ""
|
page_data["schedule"]["command"] = ""
|
||||||
|
page_data["schedule"]["delay"] = schedule.delay
|
||||||
page_data["schedule"]["enabled"] = schedule.enabled
|
page_data["schedule"]["enabled"] = schedule.enabled
|
||||||
page_data["schedule"]["one_time"] = schedule.one_time
|
page_data["schedule"]["one_time"] = schedule.one_time
|
||||||
page_data["schedule"]["cron_string"] = schedule.cron_string
|
page_data["schedule"]["cron_string"] = schedule.cron_string
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="/static/assets/vendors/typicons/typicons.css">
|
<link rel="stylesheet" href="/static/assets/vendors/typicons/typicons.css">
|
||||||
<link rel="stylesheet" href="/static/assets/vendors/fontawesome5/css/all.css">
|
<link rel="stylesheet" href="/static/assets/vendors/fontawesome5/css/all.css">
|
||||||
<link rel="stylesheet" type="text/css"
|
<link rel="stylesheet" type="text/css"
|
||||||
href="https://cdn.datatables.net/v/bs4/dt-1.10.22/fh-3.1.7/r-2.2.6/sc-2.0.3/sp-1.2.2/datatables.min.css" />
|
href="https://cdn.datatables.net/v/bs4/dt-1.10.22/fh-3.1.7/r-2.2.6/sc-2.0.3/sp-1.2.2/datatables.min.css" />
|
||||||
<link rel="stylesheet" href="/static/assets/vendors/css/vendor.bundle.base.css">
|
<link rel="stylesheet" href="/static/assets/vendors/css/vendor.bundle.base.css">
|
||||||
<link rel="stylesheet" href="/static/assets/css/crafty.css">
|
<link rel="stylesheet" href="/static/assets/css/crafty.css">
|
||||||
|
|
||||||
@ -72,7 +72,7 @@
|
|||||||
{% include notify.html %}
|
{% include notify.html %}
|
||||||
|
|
||||||
<button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button"
|
<button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button"
|
||||||
data-toggle="offcanvas">
|
data-toggle="offcanvas">
|
||||||
<span class="mdi mdi-menu"></span>
|
<span class="mdi mdi-menu"></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -163,7 +163,7 @@
|
|||||||
<script src="/static/assets/js/shared/hoverable-collapse.js"></script>
|
<script src="/static/assets/js/shared/hoverable-collapse.js"></script>
|
||||||
<script src="/static/assets/js/shared/misc.js"></script>
|
<script src="/static/assets/js/shared/misc.js"></script>
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
src="https://cdn.datatables.net/v/bs4/dt-1.10.22/fh-3.1.7/r-2.2.6/sc-2.0.3/sp-1.2.2/datatables.min.js"></script>
|
src="https://cdn.datatables.net/v/bs4/dt-1.10.22/fh-3.1.7/r-2.2.6/sc-2.0.3/sp-1.2.2/datatables.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootbox.js/5.4.0/bootbox.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootbox.js/5.4.0/bootbox.min.js"></script>
|
||||||
<script type="text/javascript" src="/static/assets/js/motd.js"></script>
|
<script type="text/javascript" src="/static/assets/js/motd.js"></script>
|
||||||
|
|
||||||
@ -191,7 +191,7 @@
|
|||||||
|
|
||||||
$.extend($.fn.dataTable.defaults, {
|
$.extend($.fn.dataTable.defaults, {
|
||||||
// {{ '\nlanguage:' }} {% raw translate('datatables', 'i18n', data['lang']) %}
|
// {{ '\nlanguage:' }} {% raw translate('datatables', 'i18n', data['lang']) %}
|
||||||
})
|
})
|
||||||
|
|
||||||
//used to get cookies from browser - this is part of tornados xsrf protection - it's for extra security
|
//used to get cookies from browser - this is part of tornados xsrf protection - it's for extra security
|
||||||
function getCookie(name) {
|
function getCookie(name) {
|
||||||
@ -516,6 +516,9 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(window).unload(function () {
|
||||||
|
jQuery.get("/public/logout")
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
@ -525,4 +528,4 @@
|
|||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -3,7 +3,9 @@
|
|||||||
{% block meta %}
|
{% block meta %}
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
{% block title %}Crafty Controller - Edit User{% end %}
|
{% block title %}Crafty Controller - {{ translate('userConfig', 'userSettings',
|
||||||
|
data['lang']) }}{% end %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
@ -136,7 +136,8 @@
|
|||||||
<label for="delay">{{ translate('serverScheduleConfig', 'offset' , data['lang']) }} <small
|
<label for="delay">{{ translate('serverScheduleConfig', 'offset' , data['lang']) }} <small
|
||||||
class="text-muted ml-1"> - {{ translate('serverScheduleConfig', 'offset-explain' ,
|
class="text-muted ml-1"> - {{ translate('serverScheduleConfig', 'offset-explain' ,
|
||||||
data['lang']) }}</small> </label>
|
data['lang']) }}</small> </label>
|
||||||
<input type="number" class="form-control" name="delay" id="delay" value="0">
|
<input type="number" class="form-control" name="delay" id="delay"
|
||||||
|
value="{{ data['schedule']['delay']}}">
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<label for="parent">{{ translate('serverScheduleConfig', 'parent' , data['lang']) }} <small
|
<label for="parent">{{ translate('serverScheduleConfig', 'parent' , data['lang']) }} <small
|
||||||
|
Loading…
Reference in New Issue
Block a user