Files
open-webui/src/lib/components/admin/Analytics.svelte
T
Tim Baek a4ad34841b 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+
2026-02-01 07:04:23 +04:00

25 lines
448 B
Svelte

<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}