Add basic ui that displays live/history cadence data

This commit is contained in:
Peter Stockings
2023-01-22 19:37:19 +11:00
parent 1a7bec42c7
commit aa82db6678
4 changed files with 81 additions and 14 deletions

37
templates/overview.html Normal file
View File

@@ -0,0 +1,37 @@
<h1
class="mb-4 text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl lg:text-6xl dark:text-white">
{{last_cadence}} rpm</h1>
<div class="relative overflow-x-auto">
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400">
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
<tr>
<th scope="col" class="px-6 py-3">
TimeStamp
</th>
<th scope="col" class="px-6 py-3">
RPM
</th>
<th scope="col" class="px-6 py-3">
Device Id
</th>
</tr>
</thead>
<tbody>
{% for c in cadences|reverse %}
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
{{c['logged_at']}}
</th>
<td class="px-6 py-4">
{{c['rpm']}}
</td>
<td class="px-6 py-4">
{{c['device_id']}}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>