diff options
author | Matt Kohls <mattkohls13@gmail.com> | 2021-04-23 23:42:42 -0400 |
---|---|---|
committer | Matt Kohls <mattkohls13@gmail.com> | 2021-04-23 23:42:42 -0400 |
commit | 437c1179b545927197637c26bb2d87d20401e5f2 (patch) | |
tree | 590e57b5dd6f0d707d8e95a7a5242bd1e892053f /templates/show_entries.html | |
parent | 352c56375b4ec2af8f0b593b450069271bcd65e2 (diff) | |
download | Sensor-Server-437c1179b545927197637c26bb2d87d20401e5f2.tar.gz Sensor-Server-437c1179b545927197637c26bb2d87d20401e5f2.tar.bz2 Sensor-Server-437c1179b545927197637c26bb2d87d20401e5f2.zip |
Many changes, mostly to make landing page more readable
Oh and a file to read a sensor attached via i2c on a Raspberry Pi and
add that to the db
Diffstat (limited to 'templates/show_entries.html')
-rw-r--r-- | templates/show_entries.html | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/templates/show_entries.html b/templates/show_entries.html index 572f360..86451df 100644 --- a/templates/show_entries.html +++ b/templates/show_entries.html @@ -1,19 +1,44 @@ {% extends "layout.html" %} {% block body %} + <aside> + <b>{% if devId == 1 %}Bedroom + {% else %}Mainfloor + {% endif %}Currently:</b> + <ul class=current> + <li>{{ current.temperature }}°F</li> + <li>{{ current.humidity }}% humidity</li> + </ul> + </aside> <figure> - <embed type="image/svg+xml" src="/tgraph.svg" /> + <embed type="image/png" src="/htgraph.png?deviceId={{ devId }}" /> </figure> <figure> - <embed type="image/svg+xml" src="/hgraph.svg" /> + <embed type="image/png" src="/pgraph.png?deviceId={{ devId }}" /> </figure> + {% if devId == 2 %} <figure> - <embed type="image/svg+xml" src="/pgraph.svg" /> + <embed type="image/png" src="/bgraph.png?deviceId={{ devId }}" /> </figure> - <ul class=weather> - {% for entry in weather %} - <li><h2>{{ entry.date }}</h2>Temp: {{ entry.temperature }}, Humidity: {{ entry.humidity }}, Pressure: {{ entry.pressure }} - {% else %} - <li><em>No entries here so far</em> + {% endif %} + + <hr> + <h2>Readings from the past 24 hours</h2> + <p> + <table class=log> + <tr> + <th>Timestamp</th> + <th>Temperature (C)</th> + <th>Humidity (%)</th> + <th>Pressure (hPa)</th> + </tr> + {% for entry in log %} + <tr> + <td>{{ entry.date }}</td> + <td>{{ entry.temperature }}</td> + <td>{{ entry.humidity }}</td> + <td>{{ entry.pressure }}</td> + </tr> {% endfor %} - </ul> + </table> + </p> {% endblock %} |