blob: b8b2337fb160c8e83cc328ded94b67f93945c5a3 (
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
48
49
50
|
{% extends "base.html" %}
{% block content %}
<div class="page-header">
<h1>Server Instances</h1>
<a href="/instances/new" class="btn">Create Instance</a>
</div>
{% if instances.is_empty() %}
<div class="card card-muted">
<p>No instances yet. Create one to get started.</p>
</div>
{% else %}
<div class="instance-grid">
{% for inst in instances %}
<div class="card {% if inst.is_active %}card-active{% endif %}">
{% if inst.is_active %}
<div class="active-badge">ACTIVE</div>
{% endif %}
<h3>{{ inst.name }}</h3>
<div class="meta">
<span>{{ inst.version }}</span>
<span class="tag">{{ inst.server_type }}</span>
{% if inst.has_modpack %}
<span class="tag">Modded</span>
{% endif %}
</div>
<div class="actions">
{% if !inst.is_active %}
<form action="/instances/{{ inst.id }}/activate" method="post" style="display:inline">
<button type="submit" class="btn-ok">Activate</button>
</form>
{% else %}
<form action="/instances/deactivate" method="post" style="display:inline">
<button type="submit" class="btn-danger">Deactivate</button>
</form>
{% endif %}
<a href="/instances/{{ inst.id }}/edit" class="btn">Edit</a>
<a href="/instances/{{ inst.id }}/backups" class="btn">Backups</a>
{% if !inst.is_active %}
<form action="/instances/{{ inst.id }}/delete" method="post" style="display:inline"
onsubmit="return confirm('Delete instance {{ inst.name }}? This cannot be undone.')">
<button type="submit" class="btn-danger">Delete</button>
</form>
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% endblock %}
|