Docker SDK drives login/char/worldserver containers via docker.sock (mounted read-only into webadmin); live logs stream over SSE with nginx buffering disabled so lines arrive in real time. Broadcast/kick go through a new admin_queue DB table that the world server polls every ~2s in its existing WorldProcess tick loop, avoiding a second IPC channel to the game server.
113 lines
3.7 KiB
HTML
113 lines
3.7 KiB
HTML
<!doctype html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>{% block title %}ROSS Admin{% endblock %}</title>
|
|
<style>
|
|
:root {
|
|
color-scheme: dark;
|
|
--bg: #14161c;
|
|
--panel: #1d2029;
|
|
--border: #2c3040;
|
|
--text: #e4e6ec;
|
|
--muted: #9098ab;
|
|
--accent: #5b8cff;
|
|
--danger: #e0556f;
|
|
--ok: #4fbf7a;
|
|
}
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
margin: 0;
|
|
font-family: -apple-system, Segoe UI, Roboto, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 14px 24px;
|
|
background: var(--panel);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
header a { color: var(--text); text-decoration: none; font-weight: 600; }
|
|
nav a { color: var(--muted); text-decoration: none; margin-right: 18px; font-size: 14px; }
|
|
nav a:hover { color: var(--text); }
|
|
main { max-width: 960px; margin: 0 auto; padding: 24px; }
|
|
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
|
|
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
|
|
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
|
|
tr:hover td { background: #ffffff08; }
|
|
a.btn, button {
|
|
display: inline-block;
|
|
background: var(--accent);
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 14px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
}
|
|
a.btn.secondary, button.secondary { background: #33384a; }
|
|
a.btn.small { padding: 4px 10px; font-size: 12px; }
|
|
input, select {
|
|
background: #10121a;
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 8px 10px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
width: 100%;
|
|
}
|
|
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
|
|
form.inline { display: inline; }
|
|
.flash { background: #3a2f1a; border: 1px solid #6b4f1f; color: #ffd889; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
|
|
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
|
|
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
|
|
.searchbar { display: flex; gap: 10px; margin-bottom: 10px; }
|
|
.searchbar input { flex: 1; }
|
|
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
|
|
.badge.ok { background: #163a26; color: var(--ok); }
|
|
.badge.off { background: #3a1620; color: var(--danger); }
|
|
.row-actions a { margin-right: 8px; }
|
|
.logbox {
|
|
background: #0a0b10;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
height: 360px;
|
|
overflow-y: auto;
|
|
font-family: "SF Mono", Consolas, Menlo, monospace;
|
|
font-size: 12px;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
.service-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
|
|
.service-tabs button.tab { background: #33384a; }
|
|
.service-tabs button.tab.active { background: var(--accent); }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<a href="{{ url_for('dashboard') }}">ROSS Admin</a>
|
|
{% if session.get('username') %}
|
|
<nav>
|
|
<a href="{{ url_for('accounts') }}">Accounts</a>
|
|
<a href="{{ url_for('characters') }}">Charaktere</a>
|
|
<a href="{{ url_for('server_control') }}">Server</a>
|
|
<a href="{{ url_for('logout') }}">Logout ({{ session['username'] }})</a>
|
|
</nav>
|
|
{% endif %}
|
|
</header>
|
|
<main>
|
|
{% with messages = get_flashed_messages() %}
|
|
{% if messages %}
|
|
{% for m in messages %}<div class="flash">{{ m }}</div>{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
</body>
|
|
</html>
|