aboutsummaryrefslogtreecommitdiffstats
path: root/snag/templates/dashboard/dashboard.html
blob: c061b663d01f0e858e958458b2d3ec38da21428b (plain)
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
{% extends 'layout.html' %}

{% block headline %}{% block title %}Dashboard{% endblock %}{% endblock %}

{% block content %}
<main>
	{% if deviceList|length == 0 %}
Hmmm nothing seems to be logged yet
	{% endif %}
	{% for entry in deviceList %}

 	<h2> {{ entry.name }} | {{ entry.location }} </h2>
	<table>
		<tr>
			{% if entry.location != "status" %}
			<td>
				<figure>
					<embed type="image/png" src="/graph/humidity-temperature.png?deviceId={{ entry.deviceId }}&type={{ entry.location}}" />
				</figure>
			</td>

			<td>
				<figure>
					<embed type="image/png" src="/graph/pressure.png?deviceId={{ entry.deviceId }}&type={{ entry.location}}" />
				</figure>
			</td>
			{% else %}
			<td>
				<figure>
					<embed type="image/png" src="/graph/battery.png?deviceId={{ entry.deviceId }}" />
				</figure>
			</td>
			{% endif %}
		</tr>
	  
	</table>

	{% endfor %}

</main>
{% endblock %}

{% block footer %} Best by: {{ generatedAt }} {% endblock %}