blob: 43245266581de337fa388cf8e2694f42e6bd021a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{% extends "base.html" %}
{% block content %}
<h1>Dashboard</h1>
{% if let Some(inst) = active_instance %}
<div class="card {% if container_state == "running" %}card-ok{% else if container_state == "error" || container_state == "not_found" %}card-err{% endif %}">
<h2>Active: {{ inst.name }}</h2>
<div class="instance-meta">
<span>Version: {{ inst.version }}</span>
<span>Type: {{ inst.server_type }}</span>
<span>Max Players: {{ inst.max_players }}</span>
</div>
<div class="status-row">
<div class="status-badge status-{{ container_state }}">
{% if container_state == "running" %}
Running
{% else if container_state == "pulling" %}
Pulling image…
{% else if container_state == "booting" %}
Booting…
{% else if container_state == "starting" %}
Starting…
{% else if container_state == "stopped" %}
Stopped
{% else if container_state == "error" %}
SOMETHING BAD IS HAPPENING, CHECK DOCKER LOGS
{% else %}
{{ container_state }}
{% endif %}
</div>
</div>
<div class="actions">
<a href="/players" class="btn">Player Management</a>
<form action="/instances/deactivate" method="post" style="display:inline">
<button type="submit" class="btn-danger">Stop Server</button>
</form>
</div>
</div>
{% else %}
<div class="card card-muted">
<h2>No active instance</h2>
<p>Choose a server instance to start from the <a href="/instances">Instances</a> page.</p>
</div>
{% endif %}
{% endblock %}
|