feat: analytics frontend dashboard

- Add Dashboard with summary stats, model/user tables
- Add ChartLine component with multi-model support
- Interactive hover tooltips and model breakdown
- Hourly granularity for 24h, daily for 7d+
This commit is contained in:
Tim Baek committed 2026-02-01 07:04:23 +04:00
1 parent 599cd2eeeb
commit a4ad34841b
9 files changed
+944 -13

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
<script>
import { onMount, getContext } from 'svelte';
import { goto } from '$app/navigation';
import { user } from '$lib/stores';
import Dashboard from './Analytics/Dashboard.svelte';
const i18n = getContext('i18n');
let loaded = false;
onMount(async () => {
if ($user?.role !== 'admin') {
await goto('/');
}
loaded = true;
});
</script>
{#if loaded}
<div class="w-full h-full pb-2 px-[16px]">
<Dashboard />
</div>
{/if}