due to its incapability to easily render images or graphs. The program now also uses a new class called 'Sensor' instead of a very long for loop to correctly format the data from the json file. Added LICENSE file Added favicon Added Flask HTML
34 lines
857 B
HTML
34 lines
857 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link
|
|
rel="shortcut icon"
|
|
href="{{ url_for('static', filename='favicon.ico') }}"
|
|
/>
|
|
<title>Sensor Data</title>
|
|
<style>
|
|
* {
|
|
font-family: "Caskaydia Cove NF";
|
|
font-size: 18px;
|
|
color: white;
|
|
background: #1c1c1c;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Sensor Readings</h1>
|
|
<h2>{% for sensor in data.items() %}</h2>
|
|
<h2>{{ sensor[1].getId() }}[{{ sensor[1].getType() }}]</h2>
|
|
<ul>
|
|
{% for key,value in sensor[1].getReadingsTimeDate().items() %}
|
|
<li>{{ key }}» {{ value }}{{ sensor[1].getUnit() }}</li>
|
|
{% endfor %}
|
|
<img
|
|
src="{{ url_for('static', filename='plots/' + sensor[1].getId() + '.png') }}"
|
|
alt="Graph"
|
|
/>
|
|
</ul>
|
|
{% endfor %}
|
|
</body>
|
|
</html>
|