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