- 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
101 lines
7.5 KiB
HTML
101 lines
7.5 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="grid min-h-screen w-full lg:grid-cols-[280px_1fr]" data-id="1">
|
|
<div class="hidden border-r lg:block" data-id="2">
|
|
<div class="flex h-full max-h-screen flex-col gap-2" data-id="3">
|
|
<div class="flex h-[60px] items-center border-b px-6" data-id="4"><a
|
|
class="flex items-center gap-2 font-semibold" data-id="5" href="#"><svg
|
|
xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
class="h-6 w-6" data-id="6">
|
|
<path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"></path>
|
|
</svg><span class="leading-normal text-gray-800 text-base text-md font-semi-bold">Function
|
|
Manager</span></a><button
|
|
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground ml-auto h-8 w-8"
|
|
data-id="8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
|
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
|
stroke-linejoin="round" class="h-4 w-4" data-id="9">
|
|
<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"></path>
|
|
<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"></path>
|
|
</svg><span class="sr-only" data-id="10">Toggle notifications</span></button></div>
|
|
<div class="flex-1 overflow-auto py-2" data-id="11">
|
|
<nav class="grid items-start px-4 text-sm font-medium" data-id="12"><a
|
|
class="flex items-center gap-3 rounded-lg px-3 py-2 text-gray-500 transition-all hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-50 cursor-pointer"
|
|
href="{{ url_for('home.index') }}"><svg xmlns="http://www.w3.org/2000/svg" width="24"
|
|
height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" data-id="14">
|
|
<path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
|
|
<polyline points="9 22 9 12 15 12 15 22"></polyline>
|
|
</svg>
|
|
Home
|
|
</a><a
|
|
class="flex items-center gap-3 rounded-lg px-3 py-2 text-gray-500 transition-all hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-50 cursor-pointer"
|
|
data-id="15" hx-get="{{ url_for('dashboard_http_functions') }}" hx-target="#container"
|
|
hx-swap="innerHTML" hx-push-url="true"><svg xmlns="http://www.w3.org/2000/svg" width="24"
|
|
height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" data-id="16">
|
|
<path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"></path>
|
|
</svg>
|
|
HTTP
|
|
</a><a
|
|
class="flex items-center gap-3 rounded-lg px-3 py-2 text-gray-500 transition-all hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-50 cursor-pointer"
|
|
data-id="17" hx-get="{{ url_for('timer.overview') }}" hx-target="#container" hx-swap="innerHTML"
|
|
hx-push-url="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
|
|
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" data-id="18">
|
|
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path>
|
|
<circle cx="9" cy="7" r="4"></circle>
|
|
<path d="M22 21v-2a4 4 0 0 0-3-3.87"></path>
|
|
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
|
|
</svg>
|
|
Timer
|
|
</a><a
|
|
class="flex items-center gap-3 rounded-lg px-3 py-2 text-gray-500 transition-all hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-50 cursor-pointer"
|
|
data-id="19" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
|
|
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" data-id="20">
|
|
<path d="M3 3v18h18"></path>
|
|
<path d="m19 9-5 5-4-4-3 3"></path>
|
|
</svg>
|
|
Analytics
|
|
</a></nav>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="flex flex-col" data-id="28">
|
|
<header class="flex h-14 lg:h-[60px] items-center gap-4 border-b px-6" data-id="29"><a class="lg:hidden"
|
|
data-id="30" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
|
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
class="h-6 w-6" data-id="31">
|
|
<path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"></path>
|
|
</svg><span class="sr-only" data-id="32">Home</span></a>
|
|
<div class="w-full flex-1" data-id="33">
|
|
|
|
</div>
|
|
<a class="inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground rounded-full border border-gray-200 w-8 h-8 dark:border-gray-800 cursor-pointer"
|
|
data-id="40" type="button" id="radix-:r1u:" aria-haspopup="menu" aria-expanded="false"
|
|
data-state="closed" href="{{ url_for('logout') }}">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
|
stroke="currentColor" class="w-6 h-6">
|
|
<path stroke-linecap="round" stroke-linejoin="round"
|
|
d="M17.982 18.725A7.488 7.488 0 0012 15.75a7.488 7.488 0 00-5.982 2.975m11.963 0a9 9 0 10-11.963 0m11.963 0A8.966 8.966 0 0112 21a8.966 8.966 0 01-5.982-2.275M15 9.75a3 3 0 11-6 0 3 3 0 016 0z" />
|
|
</svg>
|
|
|
|
|
|
<span class="sr-only" data-id="42">Toggle user menu</span>
|
|
</a>
|
|
</header>
|
|
<main class="flex flex-1 flex-col gap-4 p-4 md:p-6" data-id="50" id="container">
|
|
{% block page %}
|
|
{{ render_block(app.jinja_env, "dashboard/http_functions/overview.html", "page",
|
|
http_functions=http_functions) }}
|
|
{% endblock %}
|
|
</main>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% endblock %} |