dev-data.html 706 Bytes
Newer Older
Vladislav Rykov's avatar
Vladislav Rykov committed
1
2
3
4
5
6
7
8
9
10
{% extends 'layout.html' %}

{% block title %} Device Data: {% endblock %}

{% block content %}

<div class="row">
	<div class="col-md-6 col-md-offset-3">
		<p>Last 5 messages:</p>
		
Vladislav Rykov's avatar
Vladislav Rykov committed
11
12
13
14
15
16
17
		<table class="table">
			<thead>
				<th>Time</th>
				<th>Content</th>
			</thead>
			<tbody>
			{% for d in data %}
Vladislav Rykov's avatar
Vladislav Rykov committed
18
			<tr>
Vladislav Rykov's avatar
Vladislav Rykov committed
19
20
				<th> {{ d[1] }} </th>
				<th> {{ d[2] }} </th>
Vladislav Rykov's avatar
Vladislav Rykov committed
21
22
			</tr>
			{% endfor %}
Vladislav Rykov's avatar
Vladislav Rykov committed
23
			</tbody>
Vladislav Rykov's avatar
Vladislav Rykov committed
24
25
		</table>

Vladislav Rykov's avatar
Vladislav Rykov committed
26
		<p>Total: {{ total }} messages.</p>
Vladislav Rykov's avatar
Vladislav Rykov committed
27
28
29
30
31
32
33
34
35
36
37
38
39

		<a href="/data-csv"><button type="submit" class="btn btn-primary">Download CSV</button></a>
	</div>
</div>

<script type="text/javascrypt">
function conf() {
	return confirm("Are you sure? It will remove all device data.")
}
</script>

{% endblock %}