Add home dashboard and Mithril rendering support

- Create new home route with comprehensive dashboard statistics
- Implement Mithril rendering support with new `mithril_loader.html` template
- Add new routes for home and test pages in `app.py`
- Create `lib/mithril.py` with Mithril rendering and error handling utilities
- Update dashboard template to use new home route
- Add detailed dashboard view with timer and HTTP function statistics
This commit is contained in:
Peter Stockings
2025-02-20 23:35:46 +11:00
parent 24a0c0ffef
commit d4c0c0f262
9 changed files with 571 additions and 5 deletions

View File

@@ -36,6 +36,10 @@
hx-get="{{ url_for('timer.edit', function_id=function.id) }}" hx-target="#container"
hx-swap="innerHTML" hx-push-url="true">
<span class="font-medium text-gray-900">{{ function.name }}</span>
<span
class="bg-green-100 text-green-800 text-xs font-medium px-2.5 py-0.5 rounded-full">
{{ function.invocation_count }}
</span>
{% if function.last_run %}
<span class="bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded-full">
Last run: {{ function.last_run.strftime('%Y-%m-%d %H:%M') }}