mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'dev' into feature/ajax-schedule-enabled
This commit is contained in:
commit
875767e16c
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,6 +20,7 @@ venv.bak/
|
||||
.idea/
|
||||
/servers/
|
||||
/backups/
|
||||
/temp/
|
||||
/docker/servers/
|
||||
/docker/backups/
|
||||
session.lock
|
||||
|
33
CHANGELOG.md
33
CHANGELOG.md
@ -1,5 +1,38 @@
|
||||
# Changelog
|
||||
|
||||
## --- [4.0.6] - 2022/07/06
|
||||
### New features
|
||||
None
|
||||
### Bug fixes
|
||||
- Remove redundant path check on backup restore ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/390))
|
||||
- Fix issue with stats pinging on slow starting servers ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/391))
|
||||
- Fix unhandled exeption when serverjars api returns 'None' ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/392))
|
||||
- Fix ajax issue with unzip on firefox ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/393))
|
||||
- Turn off verbose logging on Docker ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/394))
|
||||
- Refactor tempdir from packaging logs ([Commit](https://gitlab.com/crafty-controller/crafty-4/-/commit/f1d11bfb0d943c737ef2c4ef77bd0bfc9bcf83ba))
|
||||
### Tweaks
|
||||
- Remove autofill on user form ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/395))
|
||||
- Confirm username does not exist on edituser ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/395))
|
||||
- Check for passwords matching on client side ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/395))
|
||||
### Lang
|
||||
- Add string "cloneConfirm" to german translation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/389))
|
||||
<br><br>
|
||||
|
||||
## --- [4.0.5] - 2022/06/24
|
||||
### New features
|
||||
None
|
||||
### Bug fixes
|
||||
- Fix cannot delete backup on page 2 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/382))
|
||||
- Fix server starting up without stats monitoring after backup shutdown. ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/386))
|
||||
- Fix pathing issue when launching with just "java" ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/386))
|
||||
- Fix path issue with update-alternatives ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/387))
|
||||
### Tweaks
|
||||
- Rework server list on status page display for use on small screens ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/383))
|
||||
- Add clone server confirmation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/384))
|
||||
### Lang
|
||||
- German translation review, fixed some spelling issues and added some missing strings ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/385))
|
||||
<br><br>
|
||||
|
||||
## --- [4.0.4-hotfix2] - 2022/06/21
|
||||
### Bug fixes
|
||||
- Fix Traceback on schedule config page ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/381))
|
||||
|
@ -53,7 +53,7 @@ EXPOSE 25500-25600
|
||||
|
||||
# Start Crafty through wrapper
|
||||
ENTRYPOINT ["/crafty/docker_launcher.sh"]
|
||||
CMD ["-v", "-d", "-i"]
|
||||
CMD ["-d", "-i"]
|
||||
|
||||
# Add meta labels
|
||||
ARG BUILD_DATE
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
[](https://github.com/psf/black)
|
||||
[](https://www.python.org)
|
||||
[](https://gitlab.com/crafty-controller/crafty-4/-/releases)
|
||||
[](https://gitlab.com/crafty-controller/crafty-4/-/releases)
|
||||
[](https://gitlab.com/crafty-controller/crafty-4)
|
||||
[](https://gitlab.com/crafty-controller/crafty-4/-/commits/master)
|
||||
|
||||
# Crafty Controller 4.0.4-beta
|
||||
# Crafty Controller 4.0.6-beta
|
||||
> Python based Control Panel for your Minecraft Server
|
||||
|
||||
## What is Crafty Controller?
|
||||
|
@ -100,6 +100,10 @@ class UsersController:
|
||||
def get_all_user_ids() -> t.List[int]:
|
||||
return HelperUsers.get_all_user_ids()
|
||||
|
||||
@staticmethod
|
||||
def get_all_usernames():
|
||||
return HelperUsers.get_all_usernames()
|
||||
|
||||
@staticmethod
|
||||
def get_id_by_name(username):
|
||||
return HelperUsers.get_user_id_by_name(username)
|
||||
|
@ -266,14 +266,24 @@ class Stats:
|
||||
"Unable to read the server icon due to the following error:", exc_info=e
|
||||
)
|
||||
if ping_obj:
|
||||
ping_data = {
|
||||
"online": online_stats.get("online", 0),
|
||||
"max": online_stats.get("max", 0),
|
||||
"players": online_stats.get("players", 0),
|
||||
"server_description": ping_obj.description,
|
||||
"server_version": ping_obj.version,
|
||||
"server_icon": server_icon,
|
||||
}
|
||||
try:
|
||||
ping_data = {
|
||||
"online": online_stats.get("online", 0),
|
||||
"max": online_stats.get("max", 0),
|
||||
"players": online_stats.get("players", 0),
|
||||
"server_description": ping_obj.description,
|
||||
"server_version": ping_obj.version,
|
||||
"server_icon": server_icon,
|
||||
}
|
||||
except:
|
||||
ping_data = {
|
||||
"online": online_stats.get("online", 0),
|
||||
"max": online_stats.get("max", 0),
|
||||
"players": online_stats.get("players", 0),
|
||||
"server_description": "",
|
||||
"server_version": "",
|
||||
"server_icon": server_icon,
|
||||
}
|
||||
else:
|
||||
ping_data = {
|
||||
"online": online_stats.get("online", 0),
|
||||
|
@ -99,6 +99,14 @@ class HelperUsers:
|
||||
query = Users.select().where(Users.username != "system")
|
||||
return query
|
||||
|
||||
@staticmethod
|
||||
def get_all_usernames():
|
||||
usernames = []
|
||||
query = Users.select().where(Users.username != "system")
|
||||
for user in query:
|
||||
usernames.append(user.username)
|
||||
return usernames
|
||||
|
||||
@staticmethod
|
||||
def get_all_user_ids() -> t.List[int]:
|
||||
return [
|
||||
|
@ -101,7 +101,7 @@ class FileHelpers:
|
||||
ziproot = path_to_zip
|
||||
for file in files:
|
||||
try:
|
||||
logger.info(f"backing up: {os.path.join(root, file)}")
|
||||
logger.info(f"packaging: {os.path.join(root, file)}")
|
||||
if os.name == "nt":
|
||||
zip_file.write(
|
||||
os.path.join(root, file),
|
||||
@ -115,7 +115,7 @@ class FileHelpers:
|
||||
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
f"Error backing up: {os.path.join(root, file)}!"
|
||||
f"Error packaging: {os.path.join(root, file)}!"
|
||||
f" - Error was: {e}"
|
||||
)
|
||||
|
||||
|
@ -124,17 +124,24 @@ class Helpers:
|
||||
|
||||
# If we get here we're linux so we will use 'update-alternatives'
|
||||
# (If distro does not have update-alternatives then manual input.)
|
||||
|
||||
# Sometimes u-a will be in /sbin on some distros (which is annoying.)
|
||||
ua_path = "/usr/bin/update-alternatives"
|
||||
if not os.path.exists(ua_path):
|
||||
logger.warning("update-alternatives not found! Trying /sbin")
|
||||
ua_path = "/usr/sbin/update-alternatives"
|
||||
|
||||
try:
|
||||
paths = subprocess.check_output(
|
||||
["/usr/bin/update-alternatives", "--list", "java"], encoding="utf8"
|
||||
[ua_path, "--list", "java"], encoding="utf8"
|
||||
)
|
||||
|
||||
if re.match("^(/[^/ ]*)+/?$", paths):
|
||||
return paths.split("\n")
|
||||
|
||||
except Exception as e:
|
||||
print("Java Detect Error: ", e)
|
||||
logger.error(f"Java Detect Error: {e}")
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def float_to_string(gbs: float):
|
||||
|
@ -4,7 +4,6 @@ from pathlib import Path
|
||||
import shutil
|
||||
import time
|
||||
import logging
|
||||
import tempfile
|
||||
from peewee import DoesNotExist
|
||||
|
||||
# TZLocal is set as a hidden import on win pipeline
|
||||
@ -85,27 +84,38 @@ class Controller:
|
||||
self.users.set_prepare(exec_user["user_id"])
|
||||
logger.info("Checking for previous support logs.")
|
||||
if exec_user["support_logs"] != "":
|
||||
logger.info(
|
||||
f"Found previous support log request at {exec_user['support_logs']}"
|
||||
)
|
||||
if self.helper.validate_traversal(
|
||||
tempfile.gettempdir(), exec_user["support_logs"]
|
||||
):
|
||||
logger.debug("No transversal detected. Going for the delete.")
|
||||
self.del_support_file(exec_user["support_logs"])
|
||||
if os.path.exists(exec_user["support_logs"]):
|
||||
logger.info(
|
||||
f"Found previous support log request at {exec_user['support_logs']}"
|
||||
)
|
||||
if self.helper.validate_traversal(
|
||||
os.path.join(self.project_root, "temp"), exec_user["support_logs"]
|
||||
):
|
||||
logger.debug("No transversal detected. Going for the delete.")
|
||||
self.del_support_file(exec_user["support_logs"])
|
||||
# pausing so on screen notifications can run for user
|
||||
time.sleep(7)
|
||||
self.helper.websocket_helper.broadcast_user(
|
||||
exec_user["user_id"], "notification", "Preparing your support logs"
|
||||
)
|
||||
temp_dir = tempfile.mkdtemp()
|
||||
temp_zip_storage = tempfile.mkdtemp()
|
||||
full_temp = os.path.join(temp_dir, "support_logs")
|
||||
os.mkdir(full_temp)
|
||||
self.helper.ensure_dir_exists(
|
||||
os.path.join(self.project_root, "temp", str(exec_user["user_id"]))
|
||||
)
|
||||
temp_dir = os.path.join(
|
||||
self.project_root, "temp", str(exec_user["user_id"]), "support_logs"
|
||||
)
|
||||
|
||||
self.helper.ensure_dir_exists(
|
||||
os.path.join(self.project_root, "temp", str(exec_user["user_id"]), "zip")
|
||||
)
|
||||
temp_zip_storage = os.path.join(
|
||||
self.project_root, "temp", str(exec_user["user_id"]), "zip"
|
||||
)
|
||||
os.mkdir(temp_dir)
|
||||
temp_zip_storage = os.path.join(temp_zip_storage, "support_logs")
|
||||
crafty_path = os.path.join(full_temp, "crafty")
|
||||
crafty_path = os.path.join(temp_dir, "crafty")
|
||||
os.mkdir(crafty_path)
|
||||
server_path = os.path.join(full_temp, "server")
|
||||
server_path = os.path.join(temp_dir, "server")
|
||||
os.mkdir(server_path)
|
||||
if exec_user["superuser"]:
|
||||
defined_servers = self.servers.list_defined_servers()
|
||||
@ -160,15 +170,14 @@ class Controller:
|
||||
"interval",
|
||||
seconds=1,
|
||||
id="logs_" + str(exec_user["user_id"]),
|
||||
args=[full_temp, temp_zip_storage + ".zip", exec_user],
|
||||
args=[temp_dir, temp_zip_storage + ".zip", exec_user],
|
||||
)
|
||||
FileHelpers.make_archive(temp_zip_storage, temp_dir)
|
||||
|
||||
FileHelpers.make_compressed_archive(temp_zip_storage, temp_dir)
|
||||
if len(self.helper.websocket_helper.clients) > 0:
|
||||
self.helper.websocket_helper.broadcast_user(
|
||||
exec_user["user_id"],
|
||||
"support_status_update",
|
||||
Helpers.calc_percent(full_temp, temp_zip_storage + ".zip"),
|
||||
Helpers.calc_percent(temp_dir, temp_zip_storage + ".zip"),
|
||||
)
|
||||
|
||||
temp_zip_storage += ".zip"
|
||||
@ -783,26 +792,21 @@ class Controller:
|
||||
|
||||
def rename_backup_dir(self, old_server_id, new_server_id, new_uuid):
|
||||
server_data = self.servers.get_server_data_by_id(old_server_id)
|
||||
server_obj = self.servers.get_server_obj(new_server_id)
|
||||
old_bu_path = server_data["backup_path"]
|
||||
ServerPermsController.backup_role_swap(old_server_id, new_server_id)
|
||||
if not Helpers.is_os_windows():
|
||||
backup_path = Helpers.validate_traversal(
|
||||
self.helper.backup_path, old_bu_path
|
||||
)
|
||||
if Helpers.is_os_windows():
|
||||
backup_path = Helpers.validate_traversal(
|
||||
Helpers.wtol_path(self.helper.backup_path),
|
||||
Helpers.wtol_path(old_bu_path),
|
||||
)
|
||||
backup_path = Helpers.wtol_path(str(backup_path))
|
||||
backup_path.replace(" ", "^ ")
|
||||
backup_path = Path(backup_path)
|
||||
backup_path = old_bu_path
|
||||
backup_path = Path(backup_path)
|
||||
backup_path_components = list(backup_path.parts)
|
||||
backup_path_components[-1] = new_uuid
|
||||
new_bu_path = pathlib.PurePath(os.path.join(*backup_path_components))
|
||||
if os.path.isdir(new_bu_path):
|
||||
if Helpers.validate_traversal(self.helper.backup_path, new_bu_path):
|
||||
os.rmdir(new_bu_path)
|
||||
server_obj.backup_path = new_bu_path
|
||||
default_backup_dir = os.path.join(self.helper.backup_path, new_uuid)
|
||||
try:
|
||||
os.rmdir(default_backup_dir)
|
||||
except:
|
||||
logger.error("Could not delete default backup dir")
|
||||
self.servers.update_server(server_obj)
|
||||
backup_path.rename(new_bu_path)
|
||||
|
||||
def register_server(
|
||||
|
@ -242,7 +242,7 @@ class ServerInstance:
|
||||
"Replacing with full java path."
|
||||
)
|
||||
# Checks for Oracle Java. Only Oracle Java's helper will cause a re-exec.
|
||||
if "/Oracle/Java/" in str(shutil.which("java")):
|
||||
if "/Oracle/Java/" in str(self.helper.wtol_path(shutil.which("java"))):
|
||||
logger.info(
|
||||
"Oracle Java detected. Changing start command to avoid re-exec."
|
||||
)
|
||||
@ -938,7 +938,7 @@ class ServerInstance:
|
||||
logger.info(
|
||||
"Backup complete. User had shutdown preference. Starting server."
|
||||
)
|
||||
self.start_server(HelperUsers.get_user_id_by_name("system"))
|
||||
self.run_threaded_server(HelperUsers.get_user_id_by_name("system"))
|
||||
time.sleep(3)
|
||||
self.last_backup_failed = False
|
||||
except:
|
||||
@ -958,7 +958,7 @@ class ServerInstance:
|
||||
logger.info(
|
||||
"Backup complete. User had shutdown preference. Starting server."
|
||||
)
|
||||
self.start_server(HelperUsers.get_user_id_by_name("system"))
|
||||
self.run_threaded_server(HelperUsers.get_user_id_by_name("system"))
|
||||
self.last_backup_failed = True
|
||||
|
||||
def backup_status(self, source_path, dest_path):
|
||||
|
@ -15,6 +15,7 @@ from app.classes.models.management import HelpersManagement
|
||||
from app.classes.models.users import HelperUsers
|
||||
from app.classes.controllers.users_controller import UsersController
|
||||
from app.classes.shared.console import Console
|
||||
from app.classes.shared.file_helpers import FileHelpers
|
||||
from app.classes.shared.helpers import Helpers
|
||||
from app.classes.shared.main_controller import Controller
|
||||
from app.classes.web.tornado_handler import Webserver
|
||||
@ -145,6 +146,15 @@ class TasksManager:
|
||||
self.controller.servers.stop_all_servers()
|
||||
except:
|
||||
logger.info("Caught error during shutdown", exc_info=True)
|
||||
try:
|
||||
temp_dir = os.path.join(self.controller.project_root, "temp")
|
||||
FileHelpers.del_dirs(temp_dir)
|
||||
except:
|
||||
logger.info(
|
||||
"Caught error during shutdown - "
|
||||
"unable to delete files from Crafty Temp Dir",
|
||||
exc_info=True,
|
||||
)
|
||||
|
||||
logger.info("***** Crafty Shutting Down *****\n\n")
|
||||
Console.info("***** Crafty Shutting Down *****\n\n")
|
||||
|
@ -1861,6 +1861,13 @@ class PanelHandler(BaseHandler):
|
||||
)
|
||||
user_id = bleach.clean(self.get_argument("id", None))
|
||||
username = bleach.clean(self.get_argument("username", None).lower())
|
||||
if (
|
||||
username != self.controller.users.get_user_by_id(user_id)["username"]
|
||||
and username in self.controller.users.get_all_usernames()
|
||||
):
|
||||
self.redirect(
|
||||
"/panel/error?error=Duplicate User: Useranme already exists."
|
||||
)
|
||||
password0 = bleach.clean(self.get_argument("password0", None))
|
||||
password1 = bleach.clean(self.get_argument("password1", None))
|
||||
email = bleach.clean(self.get_argument("email", "default@example.com"))
|
||||
|
@ -156,6 +156,9 @@ class ServerHandler(BaseHandler):
|
||||
page_data["js_server_types"] = json.dumps(
|
||||
self.controller.server_jars.get_serverjar_data()
|
||||
)
|
||||
if page_data["server_types"] is None:
|
||||
page_data["server_types"] = []
|
||||
page_data["js_server_types"] = []
|
||||
template = "server/wizard.html"
|
||||
|
||||
if page == "bedrock_step1":
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"major": 4,
|
||||
"minor": 0,
|
||||
"sub": 4,
|
||||
"sub": 6,
|
||||
"meta": "beta"
|
||||
}
|
||||
|
@ -60,12 +60,12 @@
|
||||
</div>
|
||||
<div class="wrapper my-auto ml-auto ml-lg-4">
|
||||
<p id="cpu_data" class="mb-0 text-success" data-toggle="tooltip" data-placement="top" data-html="true"
|
||||
title="{% raw translate('dashboard', 'cpuCores', data['lang']) %}: {{ data.get('hosts_data').get('cpu_cores') }} <br /> {% raw translate('dashboard', 'cpuCurFreq', data['lang']) %}: {{ data.get('hosts_data').get('cpu_cur_freq') }} <br /> {% raw translate('dashboard', 'cpuMaxFreq', data['lang']) %}: {{ data.get('hosts_data').get('cpu_max_freq') }}">
|
||||
title="{% raw translate('dashboard', 'cpuCores', data['lang']) %}: {{ data.get('hosts_data').get('cpu_cores') }} <br /> {% raw translate('dashboard', 'cpuCurFreq', data['lang']) %}: {{ data.get('hosts_data').get('cpu_cur_freq') }} <br /> {% raw translate('dashboard', 'cpuMaxFreq', data['lang']) %}: {{ data.get('hosts_data').get('cpu_max_freq') }}">
|
||||
{{ translate('dashboard', 'cpuUsage', data['lang']) }}: <span id="cpu_usage">{{
|
||||
data.get('hosts_data').get('cpu_usage') }}</span>
|
||||
</p>
|
||||
<p id="mem_usage" class="mb-0 text-danger" data-toggle="tooltip" data-placement="top"
|
||||
title="{{ translate('dashboard', 'memUsage', data['lang']) }}: {{ data.get('hosts_data').get('mem_usage') }}">
|
||||
title="{{ translate('dashboard', 'memUsage', data['lang']) }}: {{ data.get('hosts_data').get('mem_usage') }}">
|
||||
{{ translate('dashboard', 'memUsage', data['lang']) }}: <span id="mem_percent">{{
|
||||
data.get('hosts_data').get('mem_percent') }}%</span>
|
||||
</p>
|
||||
@ -116,8 +116,8 @@
|
||||
{% if len(data['servers']) > 0 %}
|
||||
{% if data['user_data']['hints'] %}
|
||||
<span class="too_small" title="{{ translate('dashboard', 'cannotSeeOnMobile', data['lang']) }}" ,
|
||||
data-content="{{ translate('dashboard', 'cannotSeeOnMobile2', data['lang']) }}" ,
|
||||
data-placement="top"></span>
|
||||
data-content="{{ translate('dashboard', 'cannotSeeOnMobile2', data['lang']) }}" ,
|
||||
data-placement="top"></span>
|
||||
{% end %}
|
||||
{% end %}
|
||||
<div><a class="nav-link" href="/server/step1"><i class="fas fa-plus-circle"></i> {{
|
||||
@ -156,7 +156,7 @@
|
||||
<i class="fas fa-server"></i>
|
||||
{% if server['alert'] %}
|
||||
<a style="color: red !important;" draggable="false"
|
||||
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
||||
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
||||
{{ server['server_data']['server_name'] }} <i class="fas fa-exclamation-triangle"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
@ -170,17 +170,17 @@
|
||||
{% if server['user_command_permission'] %}
|
||||
{% if server['stats']['running'] %}
|
||||
<a data-id="{{server['server_data']['server_id']}}" class="stop_button" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'stop' , data['lang']) }}">
|
||||
title="{{ translate('dashboard', 'stop' , data['lang']) }}">
|
||||
<i class="fas fa-stop"></i>
|
||||
</a>
|
||||
|
||||
<a data-id="{{server['server_data']['server_id']}}" class="restart_button" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'restart' , data['lang']) }}">
|
||||
title="{{ translate('dashboard', 'restart' , data['lang']) }}">
|
||||
<i class="fas fa-sync"></i>
|
||||
</a>
|
||||
|
||||
<a data-id="{{server['server_data']['server_id']}}" class="kill_button" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||
<i class="fas fa-skull"></i>
|
||||
</a>
|
||||
|
||||
@ -199,15 +199,15 @@
|
||||
data['lang']) }}</a>
|
||||
{% else %}
|
||||
<a data-id="{{server['server_data']['server_id']}}" class="play_button" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'start' , data['lang']) }}">
|
||||
title="{{ translate('dashboard', 'start' , data['lang']) }}">
|
||||
<i class="fas fa-play"></i>
|
||||
</a>
|
||||
<a data-id="{{server['server_data']['server_id']}}" class="clone_button" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'clone' , data['lang']) }}">
|
||||
title="{{ translate('dashboard', 'clone' , data['lang']) }}">
|
||||
<i class="fas fa-clone"></i>
|
||||
</a>
|
||||
<a data-id="{{server['server_data']['server_id']}}" class="kill_button" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||
<i class="fas fa-skull"></i>
|
||||
</a>
|
||||
{% end %}
|
||||
@ -216,7 +216,7 @@
|
||||
|
||||
<td draggable="false" id="server_cpu_{{server['server_data']['server_id']}}">
|
||||
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
||||
title="{{server['stats']['cpu']}}">
|
||||
title="{{server['stats']['cpu']}}">
|
||||
<div class="progress-bar
|
||||
{% if server['stats']['cpu'] <= 33 %}
|
||||
bg-success
|
||||
@ -226,14 +226,14 @@
|
||||
bg-danger
|
||||
{% end %}
|
||||
" role="progressbar" style="width: {{server['stats']['cpu']}}%" aria-valuenow="0"
|
||||
aria-valuemin="0" aria-valuemax="100"></div>
|
||||
aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{{server['stats']['cpu']}}%
|
||||
</td>
|
||||
|
||||
<td draggable="false" id="server_mem_{{server['server_data']['server_id']}}">
|
||||
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
||||
title="{{server['stats']['mem']}}">
|
||||
title="{{server['stats']['mem']}}">
|
||||
<div class="progress-bar
|
||||
{% if server['stats']['mem_percent'] <= 33 %}
|
||||
bg-success
|
||||
@ -243,7 +243,7 @@
|
||||
bg-danger
|
||||
{% end %}
|
||||
" role="progressbar" style="width: {{server['stats']['mem_percent']}}%" aria-valuenow="0"
|
||||
aria-valuemin="0" aria-valuemax="100"></div>
|
||||
aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{{server['stats']['mem_percent']}}% -
|
||||
|
||||
@ -263,7 +263,7 @@
|
||||
|
||||
{% if server['stats']['desc'] != 'False' %}
|
||||
<div id="desc_id"
|
||||
style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;">{{
|
||||
style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;">{{
|
||||
server['stats']['desc'] }}</div> <br />
|
||||
{% end %}
|
||||
|
||||
@ -287,7 +287,7 @@
|
||||
{% end %}
|
||||
</td>
|
||||
<span class="server-player-totals" id="server_players_{{server['server_data']['server_id']}}"
|
||||
data-players="{{ server['stats']['online']}}" data-max="{{ server['stats']['max'] }}"></span>
|
||||
data-players="{{ server['stats']['online']}}" data-max="{{ server['stats']['max'] }}"></span>
|
||||
</tr>
|
||||
{% end %}
|
||||
</tbody>
|
||||
@ -295,7 +295,7 @@
|
||||
</div>
|
||||
{% end %}
|
||||
{% if len(data['servers']) > 0 %}
|
||||
<!-- Try with Accordion -->
|
||||
<!-- View for Small screen -->
|
||||
<div class="d-sm-none d-block">
|
||||
<div class="accordion" id="accordionServers">
|
||||
{% for server in data['servers'] %}
|
||||
@ -306,27 +306,27 @@
|
||||
<div class="col-10 col-lg-3 mx-0 px-0">
|
||||
{% if server['alert'] %}
|
||||
<a style="color: red !important" class="btn btn-link d-flex justify-content-start" type="button"
|
||||
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
||||
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
||||
<i class="fas fa-server"></i> {{ server['server_data']['server_name'] }} <i
|
||||
class="fas fa-exclamation-triangle"></i>
|
||||
class="fas fa-exclamation-triangle"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="btn btn-link d-flex justify-content-start" type="button"
|
||||
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
||||
href="/panel/server_detail?id={{server['server_data']['server_id']}}">
|
||||
<i class="fas fa-server"></i> {{ server['server_data']['server_name'] }}
|
||||
</a>
|
||||
{% end %}
|
||||
</div>
|
||||
<div class="col-2 col-lg-3 mx-0 px-0">
|
||||
<a class="btn btn-link d-flex justify-content-center" type="button" data-toggle="collapse"
|
||||
data-target="#collapse-{{server['server_data']['server_id']}}" aria-expanded="false"
|
||||
aria-controls="collapse-{{server['server_data']['server_id']}}">
|
||||
data-target="#collapse-{{server['server_data']['server_id']}}" aria-expanded="false"
|
||||
aria-controls="collapse-{{server['server_data']['server_id']}}">
|
||||
<i class="fas fa-chart-bar"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4 col-lg-3 mx-0 px-0">
|
||||
<a id="m_server_running_status_{{server['server_data']['server_id']}}"
|
||||
class="btn btn-link d-flex justify-content-start" type="button">
|
||||
class="btn btn-link d-flex justify-content-start" type="button">
|
||||
{% if server['stats']['running'] %}
|
||||
<span class="text-success"><i class="fas fa-signal"></i> {{ translate('dashboard', 'online',
|
||||
data['lang']) }}</span>
|
||||
@ -348,22 +348,22 @@
|
||||
<div class="row">
|
||||
<div class="col-4 px-0">
|
||||
<a data-id="{{server['server_data']['server_id']}}"
|
||||
class="btn btn-link stop_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'stop' , data['lang']) }}">
|
||||
class="btn btn-link stop_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'stop' , data['lang']) }}">
|
||||
<i class="fas fa-stop"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4 px-0">
|
||||
<a data-id="{{server['server_data']['server_id']}}"
|
||||
class="btn btn-link restart_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'restart' , data['lang']) }}">
|
||||
class="btn btn-link restart_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'restart' , data['lang']) }}">
|
||||
<i class="fas fa-sync"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4 px-0">
|
||||
<a data-id="{{server['server_data']['server_id']}}"
|
||||
class="btn btn-link kill_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||
class="btn btn-link kill_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||
<i class="fas fa-skull"></i>
|
||||
</a>
|
||||
</div>
|
||||
@ -390,7 +390,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12 px-0">
|
||||
<a data-id="{{server['server_data']['server_id']}}" class="btn btn-link"><i
|
||||
class="fa fa-spinner fa-spin"></i>
|
||||
class="fa fa-spinner fa-spin"></i>
|
||||
{{ translate('serverTerm', 'downloading', data['lang']) }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -398,22 +398,22 @@
|
||||
<div class="row">
|
||||
<div class="col-4 px-0">
|
||||
<a data-id="{{server['server_data']['server_id']}}"
|
||||
class="btn play_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'start' , data['lang']) }}">
|
||||
class="btn play_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'start' , data['lang']) }}">
|
||||
<i class="fas fa-play"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4 px-0">
|
||||
<a data-id="{{server['server_data']['server_id']}}"
|
||||
class="btn clone_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'clone' , data['lang']) }}">
|
||||
class="btn clone_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'clone' , data['lang']) }}">
|
||||
<i class="fas fa-clone"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4 px-0">
|
||||
<a data-id="{{server['server_data']['server_id']}}"
|
||||
class="btn kill_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||
class="btn kill_button actions_serveritem" data-toggle="tooltip"
|
||||
title="{{ translate('dashboard', 'kill' , data['lang']) }}">
|
||||
<i class="fas fa-skull"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
@ -426,14 +426,14 @@
|
||||
</div>
|
||||
|
||||
<div id="collapse-{{server['server_data']['server_id']}}" class="collapse"
|
||||
aria-labelledby="heading-{{server['server_data']['server_id']}}" data-parent="#accordionServers">
|
||||
aria-labelledby="heading-{{server['server_data']['server_id']}}" data-parent="#accordionServers">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<h6>{{ translate('dashboard', 'cpuUsage', data['lang']) }}</h6>
|
||||
<div id="m_server_cpu_{{server['server_data']['server_id']}}">
|
||||
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
||||
title="{{server['stats']['cpu']}}">
|
||||
title="{{server['stats']['cpu']}}">
|
||||
<div class="progress-bar
|
||||
{% if server['stats']['cpu'] <= 33 %}
|
||||
bg-success
|
||||
@ -443,7 +443,7 @@
|
||||
bg-danger
|
||||
{% end %}
|
||||
" role="progressbar" style="width: {{server['stats']['cpu']}}%" aria-valuenow="0" aria-valuemin="0"
|
||||
aria-valuemax="100"></div>
|
||||
aria-valuemax="100"></div>
|
||||
</div>
|
||||
{{server['stats']['cpu']}}%
|
||||
</div>
|
||||
@ -452,7 +452,7 @@
|
||||
<h6>{{ translate('dashboard', 'memUsage', data['lang']) }}</h6>
|
||||
<div draggable="false" id="m_server_mem_{{server['server_data']['server_id']}}">
|
||||
<div class="progress mb-1" data-toggle="tooltip" data-placement="top"
|
||||
title="{{server['stats']['mem']}}">
|
||||
title="{{server['stats']['mem']}}">
|
||||
<div class="progress-bar
|
||||
{% if server['stats']['mem_percent'] <= 33 %}
|
||||
bg-success
|
||||
@ -462,7 +462,7 @@
|
||||
bg-danger
|
||||
{% end %}
|
||||
" role="progressbar" style="width: {{server['stats']['mem_percent']}}%" aria-valuenow="0"
|
||||
aria-valuemin="0" aria-valuemax="100"></div>
|
||||
aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{{server['stats']['mem_percent']}}% -
|
||||
|
||||
@ -492,7 +492,7 @@
|
||||
|
||||
{% if server['stats']['desc'] != 'False' %}
|
||||
<div id="desc_id"
|
||||
style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;">
|
||||
style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;">
|
||||
{{ server['stats']['desc'] }}</div> <br />
|
||||
{% end %}
|
||||
|
||||
@ -849,19 +849,41 @@
|
||||
|
||||
$(".clone_button").click(function () {
|
||||
server_id = $(this).attr("data-id");
|
||||
send_command(server_id, 'clone_server');
|
||||
bootbox.dialog({
|
||||
backdrop: true,
|
||||
title: '{% raw translate("dashboard", "sendingCommand", data["lang"]) %}',
|
||||
message: '<div align="center"><i class="fas fa-spin fa-spinner"></i> {% raw translate("dashboard", "bePatientClone", data["lang"]) %} </div>',
|
||||
closeButton: false,
|
||||
bootbox.confirm({
|
||||
message: "{{ translate('dashboard', 'cloneConfirm' , data['lang']) }}",
|
||||
buttons: {
|
||||
confirm: {
|
||||
label: "{{ translate('dashboard', 'clone' , data['lang']) }}",
|
||||
className: 'btn-outline-warning'
|
||||
},
|
||||
cancel: {
|
||||
label: '{% raw translate("panelConfig", "cancel", data["lang"]) %}',
|
||||
className: 'btn-secondary'
|
||||
}
|
||||
},
|
||||
callback: function (result) {
|
||||
if (result) {
|
||||
cloneServer(server_id);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
setTimeout(function () {
|
||||
location.reload();
|
||||
}, 5000)
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function cloneServer(server_id) {
|
||||
send_command(server_id, 'clone_server');
|
||||
bootbox.dialog({
|
||||
backdrop: true,
|
||||
title: '{% raw translate("dashboard", "sendingCommand", data["lang"]) %}',
|
||||
message: '<div align="center"><i class="fas fa-spin fa-spinner"></i> {% raw translate("dashboard", "bePatientClone", data["lang"]) %} </div>',
|
||||
closeButton: false,
|
||||
});
|
||||
setTimeout(function () {
|
||||
location.reload();
|
||||
}, 5000)
|
||||
}
|
||||
</script>
|
||||
<script src="/static/assets/vendors/js/jquery-ui.js"></script>
|
||||
<link rel="stylesheet" href="/static/assets/vendors/css/jquery-ui.css">
|
||||
|
@ -75,29 +75,35 @@
|
||||
<label class="form-label" for="username">{{ translate('userConfig', 'userName', data['lang'])
|
||||
}}<small class="text-muted ml-1"> - {{ translate('userConfig', 'userNameDesc', data['lang'])
|
||||
}}</small> </label>
|
||||
<input type="text" class="form-control" name="username" id="username"
|
||||
value="{{ data['user']['username'] }}" placeholder="User Name">
|
||||
<input type="text" class="form-control" name="username" id="username" autocomplete="off"
|
||||
data-lpignore="true" value="{{ data['user']['username'] }}" placeholder="User Name">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="password0">{{ translate('userConfig', 'password', data['lang'])
|
||||
}}<small class="text-muted ml-1"> - {{ translate('userConfig', 'leaveBlank', data['lang']) }}
|
||||
</small> </label>
|
||||
<input type="password" class="form-control" name="password0" id="password0" value=""
|
||||
placeholder="Password">
|
||||
autocomplete="new-password" data-lpignore="true" placeholder="Password">
|
||||
<span class="passwords-match" ,
|
||||
data-content="{{ translate('panelConfig', 'match', data['lang']) }}" ,
|
||||
data-placement="right"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="password1">{{ translate('userConfig', 'repeat', data['lang']) }}
|
||||
<small class="text-muted ml-1"> - {{ translate('userConfig', 'leaveBlank', data['lang'])
|
||||
}}</small> </label>
|
||||
<input type="password" class="form-control" name="password1" id="password1" value=""
|
||||
placeholder="Repeat Password">
|
||||
autocomplete="new-password" data-lpignore="true" placeholder="Repeat Password">
|
||||
<span class="passwords-match" ,
|
||||
data-content="{{ translate('panelConfig', 'match', data['lang']) }}" ,
|
||||
data-placement="right"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="email">{{ translate('userConfig', 'gravEmail', data['lang'])
|
||||
}}<small class="text-muted ml-1"> - {{ translate('userConfig', 'gravDesc', data['lang'])
|
||||
}}</small> </label>
|
||||
<input type="email" class="form-control" name="email" id="email"
|
||||
value="{{ data['user']['email'] }}" placeholder="Gravatar Email">
|
||||
<input type="email" class="form-control" name="email" id="email" autocomplete="off"
|
||||
data-lpignore="true" value="{{ data['user']['email'] }}" placeholder="Gravatar Email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="language">{{ translate('userConfig', 'userLang', data['lang'])
|
||||
@ -237,7 +243,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-success mr-2"><i class="fas fa-save"></i> {{
|
||||
<button class="btn btn-success mr-2" onclick="submit_user(event);"><i class="fas fa-save"></i> {{
|
||||
translate('panelConfig', 'save', data['lang']) }}</button>
|
||||
<button type="reset" onclick="location.href='/panel/panel_config'" class="btn btn-light"><i
|
||||
class="fas fa-undo-alt"></i> {{ translate('panelConfig', 'cancel', data['lang']) }}</button>
|
||||
@ -290,12 +296,43 @@
|
||||
|
||||
|
||||
</div>
|
||||
<style>
|
||||
.popover-body {
|
||||
color: white !important;
|
||||
outline: 1px solid red !important;
|
||||
;
|
||||
}
|
||||
</style>
|
||||
<!-- content-wrapper ends -->
|
||||
|
||||
{% end %}
|
||||
|
||||
{% block js %}
|
||||
<script>
|
||||
function submit_user(event) {
|
||||
if (!validateForm()) {
|
||||
event.preventDefault();
|
||||
} else {
|
||||
$('#userForm').submit();
|
||||
}
|
||||
}
|
||||
function validateForm() {
|
||||
let password0 = document.getElementById("password0").value
|
||||
let password1 = document.getElementById("password1").value
|
||||
if (password0 != password1) {
|
||||
$('.passwords-match').popover('show');
|
||||
$('.popover-body').click(function () {
|
||||
$('.passwords-match').popover("hide");
|
||||
});
|
||||
document.body.scrollTop = 0;
|
||||
document.documentElement.scrollTop = 0;
|
||||
$("#password0").css("outline", "1px solid red");
|
||||
$("#password1").css("outline", "1px solid red");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
const userId = new URLSearchParams(document.location.search).get('id')
|
||||
|
||||
$(".delete-user").click(function () {
|
||||
|
@ -375,7 +375,7 @@
|
||||
|
||||
$('#backup_table').DataTable({
|
||||
"order": [[1, "desc"]],
|
||||
"paging": true,
|
||||
"paging": false,
|
||||
"lengthChange": false,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
|
@ -691,8 +691,10 @@
|
||||
data: {
|
||||
path: path
|
||||
},
|
||||
success: function (data) {
|
||||
window.location.href = "/panel/server_detail?id=" + serverId + "&subpage=files";
|
||||
},
|
||||
});
|
||||
window.location.href = "/panel/server_detail?id=" + serverId + "&subpage=files"
|
||||
}
|
||||
|
||||
function sendFile(file, path, serverId, left, onProgress) {
|
||||
|
@ -6,76 +6,153 @@
|
||||
{% block title %}Crafty Controller - {{ translate('dashboard', 'dashboard', data['lang']) }}{% end %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content-wrapper col-md login-modal" style="background-color: #222437;">
|
||||
<img src="/static/assets/images/logo_long.png" style='width: 25%; margin-left: 38%;'>
|
||||
<hr />
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr class="rounded">
|
||||
<th>{{ translate('dashboard', 'server', data['lang']) }}</th>
|
||||
<th>{{ translate('dashboard', 'players', data['lang']) }}</th>
|
||||
<th>{{ translate('dashboard', 'motd', data['lang']) }}</th>
|
||||
<th>{{ translate('dashboard', 'version', data['lang']) }}</th>
|
||||
<th>{{ translate('dashboard', 'status', data['lang']) }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if data['running'] != 0 %}
|
||||
<span id="sync" style="margin-left: 5px;"><i class="fas fa-sync fa-spin"></i></span></h4>
|
||||
{% end %}
|
||||
{% for server in data['servers'] %}
|
||||
<tr>
|
||||
<td id="server_name_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<i class="fas fa-server"></i>
|
||||
{{ server['server_data']['server_name'] }}
|
||||
</td>
|
||||
{% if server['stats']['int_ping_results'] != 'False' %}
|
||||
<td id="server_players_{{ server['stats']['server_id']['server_id'] }}">
|
||||
{{ server['stats']['online'] }} / {{ server['stats']['max'] }} {{ translate('dashboard', 'max',
|
||||
data['lang']) }}<br />
|
||||
</td>
|
||||
<td id="server_motd_{{ server['stats']['server_id']['server_id'] }}">
|
||||
{% if server['stats']['desc'] != 'False' %}
|
||||
<img src="/static/assets/images/pack.png" alt="icon" style="-webkit-filter:grayscale(100%); filter:grayscale(100%)"/>
|
||||
<span id="input_motd_{{ server['stats']['server_id']['server_id'] }}" class="input_motd">{{
|
||||
server['stats']['desc'] }}</span> <br />
|
||||
{% end %}
|
||||
</td>
|
||||
<td id="server_version_{{ server['stats']['server_id']['server_id'] }}">
|
||||
{% if server['stats']['version'] != 'False' %}
|
||||
{{ server['stats']['version'] }}
|
||||
{% end %}
|
||||
</td>
|
||||
{% else %}
|
||||
<td id="server_players_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<span class="text-warning"><i class="fas fa-exclamation-triangle"></i></span>
|
||||
</td>
|
||||
<td id="server_motd_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<span class="text-warning">Crafty can't get infos from this Server </span>
|
||||
</td>
|
||||
<td id="server_version_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<span class="text-warning"><i class="fas fa-question"></i></i></span>
|
||||
</td>
|
||||
<!-- View for Large screen -->
|
||||
<div class="row justify-content-center">
|
||||
<div class="content-wrapper col-md login-modal d-none d-sm-block" style="background-color: #222437;">
|
||||
<img src="/static/assets/images/logo_long.png" style='width: 25%; margin-left: 38%;'>
|
||||
<hr />
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr class="rounded">
|
||||
<th>{{ translate('dashboard', 'server', data['lang']) }}</th>
|
||||
<th>{{ translate('dashboard', 'players', data['lang']) }}</th>
|
||||
<th>{{ translate('dashboard', 'motd', data['lang']) }}</th>
|
||||
<th>{{ translate('dashboard', 'version', data['lang']) }}</th>
|
||||
<th>{{ translate('dashboard', 'status', data['lang']) }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if data['running'] != 0 %}
|
||||
<span id="sync" style="margin-left: 5px;"><i class="fas fa-sync fa-spin"></i></span></h4>
|
||||
{% end %}
|
||||
<td id="server_online_status_{{ server['stats']['server_id']['server_id'] }}">
|
||||
{% if server['stats']['running'] %}
|
||||
<span class="text-success"><i class="fas fa-signal"></i> {{ translate('dashboard', 'online', data['lang'])
|
||||
}}</span>
|
||||
{% for server in data['servers'] %}
|
||||
<tr>
|
||||
<td id="server_name_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<i class="fas fa-server"></i>
|
||||
{{ server['server_data']['server_name'] }}
|
||||
</td>
|
||||
{% if server['stats']['int_ping_results'] != 'False' %}
|
||||
<td id="server_players_{{ server['stats']['server_id']['server_id'] }}">
|
||||
{{ server['stats']['online'] }} / {{ server['stats']['max'] }} {{ translate('dashboard', 'max',
|
||||
data['lang']) }}<br />
|
||||
</td>
|
||||
<td id="server_motd_{{ server['stats']['server_id']['server_id'] }}">
|
||||
{% if server['stats']['desc'] != 'False' %}
|
||||
<img src="/static/assets/images/pack.png" alt="icon" style="-webkit-filter:grayscale(100%); filter:grayscale(100%)" />
|
||||
<span id="input_motd_{{ server['stats']['server_id']['server_id'] }}" class="input_motd">{{
|
||||
server['stats']['desc'] }}</span> <br />
|
||||
{% end %}
|
||||
</td>
|
||||
<td id="server_version_{{ server['stats']['server_id']['server_id'] }}">
|
||||
{% if server['stats']['version'] != 'False' %}
|
||||
{{ server['stats']['version'] }}
|
||||
{% end %}
|
||||
</td>
|
||||
{% else %}
|
||||
<span class="text-danger"><i class="fas fa-ban"></i> {{ translate('dashboard', 'offline', data['lang'])
|
||||
}}</span>
|
||||
<td id="server_players_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<span class="text-warning"><i class="fas fa-exclamation-triangle"></i></span>
|
||||
</td>
|
||||
<td id="server_motd_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<span class="text-warning">Crafty can't get infos from this Server </span>
|
||||
</td>
|
||||
<td id="server_version_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<span class="text-warning"><i class="fas fa-question"></i></i></span>
|
||||
</td>
|
||||
{% end %}
|
||||
</td>
|
||||
</tr>
|
||||
{% end %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<td id="server_online_status_{{ server['stats']['server_id']['server_id'] }}">
|
||||
{% if server['stats']['running'] %}
|
||||
<span class="text-success"><i class="fas fa-signal"></i> {{ translate('dashboard', 'online', data['lang'])
|
||||
}}</span>
|
||||
{% else %}
|
||||
<span class="text-danger"><i class="fas fa-ban"></i> {{ translate('dashboard', 'offline', data['lang'])
|
||||
}}</span>
|
||||
{% end %}
|
||||
</td>
|
||||
</tr>
|
||||
{% end %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
<!-- View for Small screen -->
|
||||
<div class="row justify-content-center align-items-sm-center">
|
||||
<div class="content-wrapper login-modal d-sm-none d-block">
|
||||
<img src="/static/assets/images/logo_long.png" style='width: 100%;'>
|
||||
<hr />
|
||||
{% if data['running'] != 0 %}
|
||||
<span id="m_sync" style="margin-left: 5px;"><i class="fas fa-sync fa-spin"></i></span></h4>
|
||||
{% end %}
|
||||
<div class="accordion" id="accordionServers">
|
||||
{% for server in data['servers'] %}
|
||||
<div class="card mb-0">
|
||||
<div class="card-header" id="heading-{{server['server_data']['server_id']}}">
|
||||
<h2 class="mb-0 container overflow-hidden">
|
||||
<div class="row">
|
||||
<div class="col-8 mx-0 px-0">
|
||||
<a id="m_server_name_{{ server['stats']['server_id']['server_id'] }}" class="btn btn-link d-flex justify-content-center" type="button" data-toggle="collapse"
|
||||
data-target="#collapse-{{server['server_data']['server_id']}}" aria-expanded="false"
|
||||
aria-controls="collapse-{{server['server_data']['server_id']}}">
|
||||
<i class="fas fa-server"></i>
|
||||
{{ server['server_data']['server_name'] }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4 mx-0 px-0">
|
||||
<a id="m_server_online_status_{{ server['stats']['server_id']['server_id'] }}" class="btn btn-link d-flex justify-content-center" type="button">
|
||||
{% if server['stats']['running'] %}
|
||||
<div id="m_server_players_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<span class="text-success"><i class="fas fa-signal"></i> {{ server['stats']['online'] }} / {{ server['stats']['max'] }}</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<span class="text-danger"><i class="fas fa-ban"></i> {{ translate('dashboard', 'offline', data['lang']) }}</span>
|
||||
{% end %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div id="collapse-{{server['server_data']['server_id']}}" class="collapse"
|
||||
aria-labelledby="heading-{{server['server_data']['server_id']}}" data-parent="#accordionServers">
|
||||
<div class="card-body">
|
||||
{% if server['stats']['int_ping_results'] != 'False' %}
|
||||
<div id="m_server_motd_{{ server['stats']['server_id']['server_id'] }}" class="media">
|
||||
{% if server['stats']['desc'] != 'False' %}
|
||||
<img src="/static/assets/images/pack.png" class="w-25 mr-3" alt="icon" style="-webkit-filter:grayscale(100%); filter:grayscale(100%);" />
|
||||
{% end %}
|
||||
<div class="media-body">
|
||||
{% if server['stats']['desc'] != 'False' %}
|
||||
<div id="m_server_motd_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<span id="input_motd_{{ server['stats']['server_id']['server_id'] }}" class="input_motd">{{
|
||||
server['stats']['desc'] }}</span> <br />
|
||||
</div>
|
||||
{% end %}
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="m_server_version_{{ server['stats']['server_id']['server_id'] }}">
|
||||
{% if server['stats']['version'] != 'False' %}
|
||||
{{ server['stats']['version'] }}
|
||||
{% end %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div id="m_server_motd_{{ server['stats']['server_id']['server_id'] }}">
|
||||
<span class="text-warning"><i class="fas fa-exclamation-triangle"></i> Crafty can't get infos from this Server </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% end %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% end %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% end %}
|
||||
|
||||
{% block js %}
|
||||
@ -90,17 +167,23 @@
|
||||
}
|
||||
|
||||
function update_one_server_status(server) {
|
||||
/* Normal Screen view */
|
||||
server_players = document.getElementById('server_players_' + server.id);
|
||||
server_motd = document.getElementById('server_motd_' + server.id);
|
||||
server_version = document.getElementById('server_version_' + server.id);
|
||||
server_online_status = document.getElementById('server_online_status_' + server.id);
|
||||
/* Small Screen view */
|
||||
m_server_players = document.getElementById('m_server_players_' + server.id);
|
||||
m_server_motd = document.getElementById('m_server_motd_' + server.id);
|
||||
m_server_version = document.getElementById('m_server_version_' + server.id);
|
||||
m_server_online_status = document.getElementById('m_server_online_status_' + server.id);
|
||||
|
||||
/* TODO Update each element */
|
||||
if (server.int_ping_results) {
|
||||
document.getElementById('sync').innerHTML='';
|
||||
document.getElementById('sync').innerHTML = '';
|
||||
document.getElementById('m_sync').innerHTML = '';
|
||||
/* Update Players */
|
||||
if (server.players)
|
||||
{
|
||||
if (server.players) {
|
||||
server_players.innerHTML = server.online + ` / ` + server.max + ` {{ translate('dashboard', 'max', data['lang']) }}<br />`
|
||||
}
|
||||
|
||||
@ -109,36 +192,44 @@
|
||||
if (server.desc) {
|
||||
if (server.icon) {
|
||||
motd = `<img src="data:image/png;base64,` + server.icon + `" alt="icon" /> `;
|
||||
m_motd = `<img src="data:image/png;base64,` + server.icon + `" alt="icon" /> `;
|
||||
}
|
||||
else {
|
||||
motd = `<img src="/static/assets/images/pack.png" alt="icon" /> `;
|
||||
m_motd = `<img class="w-25 mr-3" src="/static/assets/images/pack.png" alt="icon" /> `;
|
||||
}
|
||||
|
||||
motd = motd + `<span id="input_motd_` + server.id + `" class="input_motd">` + server.desc + `</span> <br />`;
|
||||
m_motd = m_motd + `<div class="media-body"><span id="input_motd_` + server.id + `" class="input_motd">` + server.desc + `</span></div>`;
|
||||
server_motd.innerHTML = motd;
|
||||
m_server_motd.innerHTML = m_motd;
|
||||
}
|
||||
|
||||
/* Version */
|
||||
if (server.version)
|
||||
{
|
||||
server_version.innerHTML = server.version
|
||||
if (server.version) {
|
||||
server_version.innerHTML = server.version;
|
||||
m_server_version.innerHTML = server.version;
|
||||
}
|
||||
}
|
||||
else {
|
||||
server_players.innerHTML = `<span class="text-warning"><i class="fas fa-exclamation-triangle"></i></span>`;
|
||||
server_motd.innerHTML = `<span class="text-warning">Crafty can't get infos from this Server </span>`;
|
||||
server_version.innerHTML = `<span class="text-warning"><i class="fas fa-question"></i></i></span>`
|
||||
server_version.innerHTML = `<span class="text-warning"><i class="fas fa-question"></i></i></span>`;
|
||||
m_server_motd.innerHTML = `<span class="text-warning"><i class="fas fa-exclamation-triangle"></i> Crafty can't get infos from this Server </span>`;
|
||||
}
|
||||
|
||||
/* Update Online Status */
|
||||
var online_status = "";
|
||||
if (server.running) {
|
||||
online_status = `<span class="text-success"><i class="fas fa-signal"></i> {{ translate('dashboard', 'online', data['lang'])}}</span>`;
|
||||
m_online_status = `<span class="text-success"><i class="fas fa-signal"></i>` + server.online + ` / ` + server.max + `</span>`;
|
||||
}
|
||||
else {
|
||||
online_status = `<span class="text-danger"><i class="fas fa-ban"></i> {{ translate('dashboard', 'offline', data['lang'])}}</span>`;
|
||||
m_online_status = `<span class="text-danger"><i class="fas fa-ban"></i> {{ translate('dashboard', 'offline', data['lang'])}}</span>`;
|
||||
}
|
||||
server_online_status.innerHTML = online_status;
|
||||
m_server_online_status.innerHTML = m_online_status;
|
||||
}
|
||||
|
||||
function update_servers_status(data) {
|
||||
@ -150,11 +241,10 @@
|
||||
$(document).ready(function () {
|
||||
console.log("ready!");
|
||||
|
||||
if (webSocket)
|
||||
{
|
||||
if (webSocket) {
|
||||
webSocket.on('update_server_status', update_servers_status);
|
||||
}
|
||||
}());
|
||||
</script>
|
||||
|
||||
{% end %}
|
||||
{% end %}
|
@ -27,13 +27,11 @@
|
||||
<body class="dark-theme">
|
||||
<div class="container-scroller">
|
||||
<div class="container-fluid page-body-wrapper full-page-wrapper">
|
||||
<div class="content-wrapper d-flex align-items-center auth auth-bg-1 theme-one">
|
||||
<div class="row w-100">
|
||||
<div class="mx-auto">
|
||||
<div class="auto-form-wrapper">
|
||||
{% block content %}
|
||||
{% end %}
|
||||
</div>
|
||||
<div class="content-wrapper d-flex align-items-sm-center auth auth-bg-1 theme-one">
|
||||
<div class="mx-auto">
|
||||
<div class="auto-form-wrapper">
|
||||
{% block content %}
|
||||
{% end %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -66,9 +66,10 @@
|
||||
"cannotSeeOnMobile": "Sehen Sie nicht alles auf dem Handy?",
|
||||
"cannotSeeOnMobile2": "Versuchen Sie, die Tabelle seitlich zu verschieben.",
|
||||
"clone": "Klonen",
|
||||
"cloneConfirm": "Sind Sie sich sicher, dass Sie den Server klonen wollen? Diese Aufgabe kann eine Weile dauern.",
|
||||
"cpuCores": "CPU Kerne",
|
||||
"cpuCurFreq": "Momentaner CPU-takt",
|
||||
"cpuMaxFreq": "Maximaler CPU-takt",
|
||||
"cpuCurFreq": "Momentaner CPU-Takt",
|
||||
"cpuMaxFreq": "Maximaler CPU-Takt",
|
||||
"cpuUsage": "CPU-Nutzung",
|
||||
"crashed": "Abgestürzt",
|
||||
"dashboard": "Dashboard",
|
||||
@ -90,7 +91,7 @@
|
||||
"sendingCommand": "Übermittlung Ihres Befehls",
|
||||
"server": "Server",
|
||||
"servers": "Server",
|
||||
"size": "Server-Verzeichniss Größe",
|
||||
"size": "Serververzeichnis Größe",
|
||||
"start": "Starten",
|
||||
"starting": "Verzögerter Start",
|
||||
"status": "Status",
|
||||
@ -101,8 +102,8 @@
|
||||
"datatables": {
|
||||
"i18n": {
|
||||
"aria": {
|
||||
"sortAscending": ": aktivieren, um die Spalte aufsteigend zu sortieren",
|
||||
"sortDescending": ": aktivieren, um die Spalte absteigend zu sortieren"
|
||||
"sortAscending": ": Aktivieren, um die Spalte aufsteigend zu sortieren",
|
||||
"sortDescending": ": Aktivieren, um die Spalte absteigend zu sortieren"
|
||||
},
|
||||
"buttons": {
|
||||
"collection": "Sammlung <span class='ui-button-icon-primary ui-icon ui-icon-triangle-1-s'/>",
|
||||
@ -127,20 +128,20 @@
|
||||
},
|
||||
"decimal": "",
|
||||
"emptyTable": "Keine Daten in der Tabelle verfügbar",
|
||||
"info": "Anzeige von _START_ to _END_ of _TOTAL_ Einträge",
|
||||
"infoEmpty": "Zeigt 0 bis 0 von 0 Einträge",
|
||||
"info": "Zeige _START_ bis _END_ von insges. _TOTAL_ Einträge(n)",
|
||||
"infoEmpty": "Zeige 0 bis 0 von insges. 0 Einträgen",
|
||||
"infoFiltered": "(gefiltert von _MAX_ maximalen Einträgen)",
|
||||
"infoPostFix": "",
|
||||
"lengthMenu": "Zeige _MENU_ Einträge",
|
||||
"loadingRecords": "Laden...",
|
||||
"paginate": {
|
||||
"first": "Erster",
|
||||
"last": "Letzter",
|
||||
"first": "Erste",
|
||||
"last": "Letzte",
|
||||
"next": "Nächste",
|
||||
"previous": "Vorheriger"
|
||||
"previous": "Vorherige"
|
||||
},
|
||||
"processing": "Verarbeiten...",
|
||||
"search": "Suchen:",
|
||||
"search": "Suche:",
|
||||
"select": {
|
||||
"cells": {
|
||||
"0": "Klicken Sie auf eine Zelle, um sie auszuwählen",
|
||||
@ -176,7 +177,8 @@
|
||||
"not-downloaded": "Crafty kann die auszuführende Datei nicht finden. Ist der Download abgeschlossen? Sind die Berechtigungen für Crafty korrekt?",
|
||||
"portReminder": "Wir haben festgestellt, dass dies das erste Mal ist, dass {} ausgeführt wurde. Stellen Sie sicher, dass Sie Port {} durch Ihren Router/Firewall weiterleiten, um den Fernzugriff aus dem Internet zu ermöglichen.",
|
||||
"start-error": "Der Server {} konnte wegen dem Fehlercode: {} nicht gestartet werden",
|
||||
"terribleFailure": "Was für ein furchtbarer Fehler!"
|
||||
"terribleFailure": "Was für ein furchtbarer Fehler!",
|
||||
"fileTooLarge": "Hochladen fehlgeschlagen. Datei ist zu groß. Wenden Sie sich an Ihren Systemadministrator für weitere Unterstütung."
|
||||
},
|
||||
"footer": {
|
||||
"allRightsReserved": "Alle Rechte vorbehalten",
|
||||
@ -194,13 +196,13 @@
|
||||
"backupComplete": "Backup für Server erfolgreich ausgeführt {}",
|
||||
"backupStarted": "Backup für Server gestartet {}",
|
||||
"downloadLogs": "Supportprotokolle herunterladen?",
|
||||
"finishedPreparing": "Wir haben die Bereitstellung der Supportprotokolle abgeschlossen. Bitte klicke Herunterladen um diese Herunterzuladen",
|
||||
"finishedPreparing": "Wir haben die Bereitstellung der Supportprotokolle abgeschlossen. Bitte klicke 'Herunterladen' um diese herunterzuladen",
|
||||
"logout": "Abmelden",
|
||||
"preparingLogs": " Bitte warten, während wir die Protokolle vorbereiten... Wir schicken eine Benachrichtigung, wenn sie fertig sind. Dies kann bei großen Projekten eine Weile dauern.",
|
||||
"supportLogs": "Supportprotokolle"
|
||||
},
|
||||
"panelConfig": {
|
||||
"adminControls": "Administrations Werkzeuge",
|
||||
"adminControls": "Administrations-Werkzeuge",
|
||||
"allowedServers": "Erlaubte Server",
|
||||
"assignedRoles": "Zugewiesene Rollen",
|
||||
"cancel": "Abbrechen",
|
||||
@ -213,31 +215,31 @@
|
||||
"pageTitle": "Panel Konfiguration",
|
||||
"role": "Rolle",
|
||||
"roles": "Rollen",
|
||||
"roleUsers": "Nutzerrollen",
|
||||
"roleUsers": "Rollen-Benutzer",
|
||||
"save": "Speichern",
|
||||
"superConfirm": "Nur fortfahren, wenn dieser Nutzer zugang zu ALLEM haben soll (alle Benutzerkonten, Server, Panel-Konfiguration etc.). Er kann allen Benutzern die Super-Benutzer-Rechte entziehen.",
|
||||
"superConfirm": "Nur fortfahren, wenn dieser Nutzer Zugang zu ALLEM haben soll (alle Benutzerkonten, Server, Panel-Konfiguration etc.). Er kann allen Benutzern die Super-Benutzer-Rechte entziehen.",
|
||||
"superConfirmTitle": "Super-Benutzer Berechtigung erteilen? Sicher, dass diese Aktion ausgeführt werden soll?",
|
||||
"user": "Benutzer",
|
||||
"users": "Benutzer"
|
||||
},
|
||||
"rolesConfig": {
|
||||
"config": "Rollen Konfiguration",
|
||||
"config": "Rollen-Konfiguration",
|
||||
"configDesc": "Hier kann die Konfiguration von Rollen bearbeitet werden",
|
||||
"configUpdate": "Zuletzt aktualisiert: ",
|
||||
"created": "Erstellt: ",
|
||||
"delRole": "Rolle löschen",
|
||||
"doesNotExist": "Sie können nichts löschen, was noch nicht existiert!",
|
||||
"doesNotExist": "Sie können nicht löschen, was noch nicht existiert!",
|
||||
"pageTitle": "Rolle bearbeiten",
|
||||
"pageTitleNew": "Neue Rolle",
|
||||
"permAccess": "Zugriff?",
|
||||
"permName": "Berechtigungs Name",
|
||||
"permName": "Berechtigungs-Name",
|
||||
"permsServer": "Berechtigungen, die diese Rolle für die angegebenen Server hat",
|
||||
"roleConfigArea": "Rollenkonfigurationsbereich",
|
||||
"roleConfigArea": "Rollen-Konfigurationsbereich",
|
||||
"roleDesc": "Wie soll diese Rolle genannt werden?",
|
||||
"roleName": "Name der Rolle: ",
|
||||
"rolePerms": "Rollenberechtigungen",
|
||||
"rolePerms": "Rollen-Berechtigungen",
|
||||
"roleServers": "Erlaubte Server",
|
||||
"roleTitle": "Rollen Einstellungen",
|
||||
"roleTitle": "Rollen-Einstellungen",
|
||||
"roleUserName": "Benutzername",
|
||||
"roleUsers": "Nutzer mit dieser Rolle: ",
|
||||
"serverAccess": "Zugriff?",
|
||||
@ -253,7 +255,7 @@
|
||||
"compress": "Backup komprimieren",
|
||||
"confirm": "Bestätigen",
|
||||
"confirmDelete": "Möchten Sie diese Backup-Datei löschen? Dies kann nicht rückgängig gemacht werden.",
|
||||
"confirmRestore": "Sicher, dass diese Sicherung wiederherstellgestellt werden soll? Alle aktuellen Serverdateien werden in den Zustand der Sicherung versetzt und können nicht wiederhergestellt werden.",
|
||||
"confirmRestore": "Sicher, dass dieses Backup wiederherstellgestellt werden soll? Alle aktuellen Serverdateien werden in den Zustand von diesem Backup versetzt und können nicht wiederhergestellt werden.",
|
||||
"currentBackups": "Aktuelle Backups",
|
||||
"delete": "Löschen",
|
||||
"destroyBackup": "Backup löschen \" + file_to_del + \"?",
|
||||
@ -270,21 +272,22 @@
|
||||
"save": "Speichern",
|
||||
"size": "Größe",
|
||||
"storageLocation": "Speicherort",
|
||||
"storageLocationDesc": "Wo wollen Sie die Backups speichern?"
|
||||
"storageLocationDesc": "Wo wollen Sie die Backups speichern?",
|
||||
"shutdown": "Server für die Dauer des Backups stoppen"
|
||||
},
|
||||
"serverConfig": {
|
||||
"bePatientDelete": "Bitte haben Sie etwas Geduld, während wir Ihren Server aus dem Crafty-Panel entfernen. Dieser Bildschirm wird in wenigen Augenblicken geschlossen.",
|
||||
"bePatientDeleteFiles": "Bitte haben Sie etwas Geduld, während wir Ihren Server aus dem Crafty-Panel entfernen und alle Dateien löschen. Dieser Bildschirm wird in wenigen Augenblicken geschlossen.",
|
||||
"bePatientUpdate": "Bitte haben Sie etwas Geduld, während wir den Server aktualisieren. Die Downloadzeiten können je nach Ihrer Internetgeschwindigkeit variieren.<br /> Dieser Bildschirm wird sich in einem Moment aktualisieren",
|
||||
"cancel": "Abbrechen",
|
||||
"crashTime": "Zeitüberschreitung bei Absturz",
|
||||
"crashTime": "Zeitüberschreitung nach Absturz",
|
||||
"crashTimeDesc": "Wie lange soll Crafty warten, bevor Crafty den Server als abgestürzt betrachtet?",
|
||||
"deleteFilesQuestion": "Serverdateien vom Rechner löschen?",
|
||||
"deleteFilesQuestionMessage": "Möchten Sie, dass Crafty alle Serverdateien auf dem Hostrechner löscht?",
|
||||
"deleteFilesQuestionMessage": "Möchten Sie, dass Crafty alle Serverdateien auf dem Hostrechner löscht? <br><br><strong>Das schließt die Server-Backups ein.</strong>",
|
||||
"deleteServer": "Server löschen",
|
||||
"deleteServerQuestion": "Server löschen?",
|
||||
"deleteServerQuestionMessage": "Sind Sie sicher, dass Sie diesen Server löschen wollen? Danach gibt es kein Zurück mehr...",
|
||||
"exeUpdateURL": "Server Ausführbare Update URL",
|
||||
"exeUpdateURL": "Ausführbare Server Update URL",
|
||||
"exeUpdateURLDesc": "Direkte Download-URL für Updates.",
|
||||
"noDelete": "Nein, zurück",
|
||||
"noDeleteFiles": "Nein, nur aus dem Panel entfernen",
|
||||
@ -293,25 +296,28 @@
|
||||
"save": "Speichern",
|
||||
"sendingDelete": "Lösche den Server",
|
||||
"sendingRequest": "Ihre Anfrage senden...",
|
||||
"serverAutoStart": "Server Automatisch starten",
|
||||
"serverAutoStart": "Server automatisch starten",
|
||||
"serverAutostartDelay": "Server Autostart-Verzögerung",
|
||||
"serverAutostartDelayDesc": "Verzögerung vor dem automatischen Start (falls unten aktiviert)",
|
||||
"serverCrashDetection": "Erkennung von Serverabstürzen",
|
||||
"serverExecutable": "Server Ausführbare Datei",
|
||||
"serverExecutable": "Ausführbare Server Datei",
|
||||
"serverExecutableDesc": "Die ausführbare Datei des Servers",
|
||||
"javaVersion": "Aktuelle Java Version überschreiben",
|
||||
"javaVersionDesc": "Wenn Sie die Java-Version überschreiben möchten: Stellen Sie sicher, dass der 'auszuführende Befehl' in Anführungszeichen geschrieben ist (Ausgenommen die Standard-'java'-Variable)",
|
||||
"javaNoChange": "Nicht überschreiben",
|
||||
"serverExecutionCommand": "Server Ausführungsbefehl",
|
||||
"serverExecutionCommandDesc": "Was wird in einem versteckten Terminal gestartet",
|
||||
"serverExecutionCommandDesc": "Was wird in einer versteckten Konsole gestartet",
|
||||
"serverIP": "Server IP",
|
||||
"serverIPDesc": "Die IP, mit der sich Crafty für Statistiken verbinden soll (versuchen Sie eine echte IP anstelle von 127.0.0.1, wenn Sie Probleme haben)",
|
||||
"serverLogLocation": "Server Log Speicherort",
|
||||
"serverLogLocationDesc": "Absoluter vollständiger Pfad zur Protokolldatei",
|
||||
"serverLogLocationDesc": "Pfad zur Protokolldatei",
|
||||
"serverName": "Server Name",
|
||||
"serverNameDesc": "Wie möchten Sie diesen Server nennen",
|
||||
"serverPath": "Server-Arbeitsverzeichnis",
|
||||
"serverPathDesc": "Absoluter vollständiger Pfad (ohne die ausführbare Datei)",
|
||||
"serverPort": "Server Port",
|
||||
"serverPortDesc": "Der Port, mit dem sich Crafty für Statistiken verbinden soll",
|
||||
"serverStopCommand": "Server Stop Befehl",
|
||||
"serverStopCommand": "Server Stopp Befehl",
|
||||
"serverStopCommandDesc": "Befehl an das Programm, um es zu stoppen",
|
||||
"stopBeforeDeleting": "Bitte stoppen Sie den Server, bevor Sie ihn löschen",
|
||||
"update": "Server Datei aktualisieren",
|
||||
@ -343,7 +349,7 @@
|
||||
"playerControls": "Spieler-Management",
|
||||
"schedule": "Zeitplan",
|
||||
"serverDetails": "Server Details",
|
||||
"terminal": "Terminal"
|
||||
"terminal": "Konsole"
|
||||
},
|
||||
"serverFiles": {
|
||||
"clickUpload": "Klicken Sie hier, um Ihre Dateien auszuwählen",
|
||||
@ -367,12 +373,13 @@
|
||||
"noscript": "Der Dateimanager funktioniert nicht ohne JavaScript",
|
||||
"rename": "Umbenennen",
|
||||
"renameItemQuestion": "Wie soll der neue Name lauten?",
|
||||
"size": "Editorgröße umschalten",
|
||||
"save": "Speichern",
|
||||
"stayHere": "VERLASSEN SIE DIESE SEITE NICHT!",
|
||||
"unsupportedLanguage": "Warnung: Dies ist ein nicht unterstützter Dateityp",
|
||||
"unzip": "Entpacken",
|
||||
"upload": "Hochladen",
|
||||
"uploadTitle": "Dateien hochladen in: ",
|
||||
"uploadTitle": "Dateien hochladen nach: ",
|
||||
"waitUpload": "Bitte warten Sie, während wir Ihre Dateien hochladen... Dies kann eine Weile dauern.",
|
||||
"yesDelete": "Ja, ich verstehe die Konsequenzen"
|
||||
},
|
||||
@ -441,7 +448,7 @@
|
||||
"sendCommand": "Befehl senden",
|
||||
"start": "Start",
|
||||
"starting": "Verzögertes Starten",
|
||||
"stop": "Stop",
|
||||
"stop": "Stopp",
|
||||
"stopScroll": "Automatisches Scrollen stoppen",
|
||||
"updating": "Aktualisierung..."
|
||||
},
|
||||
@ -452,7 +459,7 @@
|
||||
"autoCreate": "Wenn keine ausgewählt werden, wird Crafty eine erstellen!",
|
||||
"bePatient": "Bitte haben Sie etwas Geduld, da wir ' + (importing ? 'import' : 'download')",
|
||||
"buildServer": "Server erstellen!",
|
||||
"clickRoot": "Hier klicken, um das root Verzeichniss auszuwählen",
|
||||
"clickRoot": "Hier klicken, um das Stammverzeichnis auszuwählen",
|
||||
"close": "Schließen",
|
||||
"defaultPort": "25565 (Standard)",
|
||||
"downloading": "Server herunterladen...",
|
||||
@ -466,14 +473,14 @@
|
||||
"myNewServer": "Mein neuer Server",
|
||||
"newServer": "Neuen Server erstellen",
|
||||
"quickSettings": "Schnelleinstellungen",
|
||||
"quickSettingsDescription": "Keine Sorge, Änderungen können später immernoch vorgenommen werden.",
|
||||
"quickSettingsDescription": "Keine Sorge, Änderungen können später immer noch vorgenommen werden.",
|
||||
"resetForm": "Konfiguration zurücksetzen",
|
||||
"save": "Speichern",
|
||||
"selectRole": "Rolle(n) auswählen",
|
||||
"selectRoot": "Archivstammverzeichnis auswählen",
|
||||
"selectType": "Typ auswählen",
|
||||
"selectVersion": "Version auswählen",
|
||||
"selectZipDir": "Das Verzeichnis im Archiv wählen, aus dem die Dateien entpacken werden sollen",
|
||||
"selectZipDir": "Das Verzeichnis im Archiv wählen, aus dem die Dateien entpackt werden sollen",
|
||||
"serverJar": "Server Java Datei",
|
||||
"serverName": "Server Name",
|
||||
"serverPath": "Server Pfad",
|
||||
@ -513,13 +520,13 @@
|
||||
"lastUpdate": "Letzte Aktualisierung: ",
|
||||
"leaveBlank": "Um den Benutzer zu bearbeiten, ohne das Passwort zu ändern, lassen Sie das Feld leer.",
|
||||
"member": "Mitglied?",
|
||||
"notExist": "Sie können nichts löschen, was nicht existiert!",
|
||||
"notExist": "Sie können nicht löschen, was nicht existiert!",
|
||||
"pageTitle": "Benutzer bearbeiten",
|
||||
"pageTitleNew": "Benutzer erstellen",
|
||||
"password": "Passwort",
|
||||
"permName": "Berechtigungsname",
|
||||
"repeat": "Passwort wiederholen",
|
||||
"roleName": "Rollen Name",
|
||||
"roleName": "Rollenname",
|
||||
"super": "Super Benutzer",
|
||||
"userLang": "Sprache des Benutzers",
|
||||
"userName": "Benutzername",
|
||||
|
@ -66,6 +66,7 @@
|
||||
"cannotSeeOnMobile": "Not seeing everything on mobile?",
|
||||
"cannotSeeOnMobile2": "Try scrolling the table sideways.",
|
||||
"clone": "Clone",
|
||||
"cloneConfirm": "Are you sure you would like to clone this server? This process may take a while.",
|
||||
"cpuCores": "CPU Cores",
|
||||
"cpuCurFreq": "CPU Current Clock",
|
||||
"cpuMaxFreq": "CPU Maximum Clock",
|
||||
@ -219,7 +220,8 @@
|
||||
"superConfirm": "Proceed only if you want this user to have access to EVERYTHING (all user accounts, servers, panel settings, etc.). They can even revoke your superuser rights.",
|
||||
"superConfirmTitle": "Enable superuser? Are you sure?",
|
||||
"user": "User",
|
||||
"users": "Users"
|
||||
"users": "Users",
|
||||
"match": "Passwords must match"
|
||||
},
|
||||
"rolesConfig": {
|
||||
"config": "Role Config",
|
||||
|
6
main.py
6
main.py
@ -226,6 +226,12 @@ if __name__ == "__main__":
|
||||
|
||||
Console.info("Crafty has fully started and is now ready for use!")
|
||||
crafty_prompt.prompt = f"Crafty Controller v{helper.get_version_string()} > "
|
||||
try:
|
||||
logger.info("Removing old temp dirs")
|
||||
FileHelpers.del_dirs(os.path.join(controller.project_root, "temp"))
|
||||
except:
|
||||
logger.info("Did not find old temp dir.")
|
||||
os.mkdir(os.path.join(controller.project_root, "temp"))
|
||||
|
||||
if not args.daemon:
|
||||
# Put the prompt under the cursor
|
||||
|
Loading…
Reference in New Issue
Block a user