diff options
| author | salmonik <salmonik@tuta.io> | 2026-07-12 19:38:03 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-07-12 19:38:03 +0200 |
| commit | ae7ef10b67737f08a86743f687bca30a12e9e17a (patch) | |
| tree | 056539ab76b801559dc8d07ee6599220e2bd8e07 /templates/dashboard.html | |
| parent | architecture (diff) | |
| download | minecraft-ui-ae7ef10b67737f08a86743f687bca30a12e9e17a.tar.gz minecraft-ui-ae7ef10b67737f08a86743f687bca30a12e9e17a.zip | |
first stable
Diffstat (limited to 'templates/dashboard.html')
| -rw-r--r-- | templates/dashboard.html | 45 |
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 %} | ||
