55c3678906
- Add ActivityTable component consolidating column customization, table rendering, pagination, and capture dialog previously duplicated between Activity.svelte and ModelDetail.svelte - Split ModelDetail tabs into ModelActivityTab, ModelLogsTab, and ModelDetailsTab components under components/model/ - Reduce Activity.svelte and ModelDetail.svelte to thin shells - ModelDetail tabs now reuse ActivityTable instead of duplicating column management, formatting, and capture logic
25 lines
553 B
Svelte
25 lines
553 B
Svelte
<script lang="ts">
|
|
import { metrics } from "../../stores/api";
|
|
import ActivityTable from "../ActivityTable.svelte";
|
|
|
|
interface Props {
|
|
modelId: string;
|
|
}
|
|
|
|
let { modelId }: Props = $props();
|
|
|
|
let modelMetrics = $derived(
|
|
[...$metrics].filter((m) => m.model === modelId).sort((a, b) => b.id - a.id)
|
|
);
|
|
</script>
|
|
|
|
<ActivityTable
|
|
metrics={modelMetrics}
|
|
storagePrefix="model-detail"
|
|
showModelColumn={false}
|
|
showPagination={true}
|
|
compact={true}
|
|
title="Recent Activity"
|
|
emptyMessage="No activity recorded for this model"
|
|
/>
|