{% import "macros/ui.html" as m %}
<div class="stats stats-horizontal shadow w-full mb-4 bg-base-200 overflow-x-auto"
     id="dash-stats"
     hx-get="{{ base_url }}/stats"
     hx-trigger="every 10s"
     hx-swap="outerHTML">
  {{ m::stat(title="Uptime", value=uptime_secs ~ "s", desc="seconds since start") }}
  {{ m::stat(title="Cache entries", value=cache_entries) }}
  {{ m::stat(title="Cache hit rate", value=cache_hit_rate, desc=cache_hits ~ " hits / " ~ cache_misses ~ " misses", accent="success") }}
  {{ m::stat(title="Sessions", value=active_actors, accent="primary") }}
  {{ m::stat(title="Notifications", value=notification_count, accent="warning") }}
</div>
