app.html
HTML document, Unicode text, UTF-8 text
1
{% extends "default.html" %}
2
{% block title %}{{ app.name }} | Echo Tracker{% endblock %}
3
{% block content %}
4
<main>
5
<h1>{{ app.name }}</h1>
6
<h2 class="subtitle">
7
{% if is_ok(all_results) %}
8
Operational
9
{% elif is_partial(all_results) %}
10
Unstable
11
{% else %}
12
Down
13
{% endif %}
14
</h2>
15
<p>Owner: {{ app.owner_name }}</p>
16
{% if session.get("username") == app.owner_name %}
17
<a class="button" style="width:100%; margin: 1em 0;" tabindex="0" href="/app/{{ app.id }}/edit">
18
<iconify-icon icon="mdi:pencil"></iconify-icon>
19
Manage endpoints
20
</a>
21
{% endif %}
22
<form style="margin-bottom: 1em;" class="horizontal-form">
23
<label class="extend">
24
Interval duration (minutes)
25
<input type="number" name="bar_duration" step="1" value="{{ bar_duration }}">
26
</label>
27
<label class="extend">
28
Time period (minutes)
29
<input type="number" name="time_period" step="1" value="{{ time_period }}">
30
</label>
31
<button type="submit">Change</button>
32
</form>
33
<div id="endpoint-list">
34
{% for endpoint in app.endpoints %}
35
<div class="endpoint-card">
36
<div class="endpoint-header">
37
<h2>{{ endpoint.name }}</h2>
38
<div class="action-buttons">
39
{% if not endpoint.buggy %}
40
<a href="/app/{{ app.id }}/report/{{ endpoint.id }}" class="button">
41
<iconify-icon icon="mdi:bug"></iconify-icon>
42
Report malfunction
43
</a>
44
{% elif app.owner_name == session.get("username") %}
45
<a href="/app/{{ app.id }}/fix/{{ endpoint.id }}" class="button">
46
<iconify-icon icon="mdi:tools"></iconify-icon>
47
Mark as fixed
48
</a>
49
{% endif %}
50
<a href="{{ endpoint.address }}" class="button">
51
<iconify-icon icon="mdi:send"></iconify-icon>
52
Access
53
</a>
54
</div>
55
</div>
56
{% if endpoint.buggy %}
57
<p class="endpoint-info endpoint-info-down">
58
Malfunctioning
59
</p>
60
{% elif is_ok(slices[endpoint.id][-1][0]) %}
61
Operational
62
{% elif is_partial(slices[endpoint.id][-1][0]) %}
63
Unstable
64
{% else %}
65
Down
66
{% endif %}
67
<p>{{ endpoint.comment }}</p>
68
<div class="app-uptime">
69
{% for slice in slices[endpoint.id] %}
70
{% if not slice[0] %}
71
<div class="uptime-bar
72
{% elif is_ok(slice[0]) %}
73
<div class="uptime-bar uptime-bar-ok
74
{% else %}
75
<div class="uptime-bar uptime-bar-down
76
{% endif %}
77
{% if bugs(slice[0]) %}
78
uptime-bar-buggy
79
{% endif %}
80
" title="{{ slice[1][0].strftime('%Y-%m-%d %H:%M:%S') }} – {{ slice[1][1].strftime('%Y-%m-%d %H:%M:%S') }}"></div>
81
{% endfor %}
82
</div>
83
</div>
84
{% endfor %}
85
</div>
86
</main>
87
{% endblock %}