summaryrefslogtreecommitdiffstats
path: root/templates/dashboard.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/dashboard.html')
-rw-r--r--templates/dashboard.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/templates/dashboard.html b/templates/dashboard.html
new file mode 100644
index 0000000..571a43e
--- /dev/null
+++ b/templates/dashboard.html
@@ -0,0 +1,45 @@
1{% extends "base.html" %}
2{% block content %}
3<h1>Dashboard</h1>
4
5{% if let Some(inst) = active_instance %}
6 <div class="card {% if container_state == "running" %}card-ok{% else if container_state == "error" || container_state == "not_found" %}card-err{% endif %}">
7 <h2>Active: {{ inst.name }}</h2>
8 <div class="instance-meta">
9 <span>Version: {{ inst.version }}</span>
10 <span>Type: {{ inst.server_type }}</span>
11 <span>Max Players: {{ inst.max_players }}</span>
12 </div>
13
14 <div class="status-row">
15 <div class="status-badge status-{{ container_state }}">
16 {% if container_state == "running" %}
17 Running
18 {% else if container_state == "pulling" %}
19 Pulling image…
20 {% else if container_state == "starting" %}
21 Starting…
22 {% else if container_state == "stopped" %}
23 Stopped
24 {% else if container_state == "error" %}
25 SOMETHING BAD IS HAPPENING, CHECK DOCKER LOGS
26 {% else %}
27 {{ container_state }}
28 {% endif %}
29 </div>
30 </div>
31
32 <div class="actions">
33 <a href="/players" class="btn">Player Management</a>
34 <form action="/instances/deactivate" method="post" style="display:inline">
35 <button type="submit" class="btn-danger">Stop Server</button>
36 </form>
37 </div>
38 </div>
39{% else %}
40 <div class="card card-muted">
41 <h2>No active instance</h2>
42 <p>Choose a server instance to start from the <a href="/instances">Instances</a> page.</p>
43 </div>
44{% endif %}
45{% endblock %}