Files
traefik-llmgateway/webui/src/components/SkeletonTable.vue
T
lukaszraczylo fcfb298077 fix(admin-ui): stale-data notice, request timeout and dedupe, hash and format edge cases
Show a persistent notice when a refresh fails while old data is on screen.
Add retry to the Targets and Access Matrix error states.
Give tables names, skeletons a status role and CSV export a live region.
Abort admin requests after 15 seconds and share concurrent identical GETs.
Show a reload prompt when a lazy page chunk fails to load.
Ignore prototype keys in the location hash.
Stop formatContextWindow emitting 1000k, round latency before the 1s cutoff,
and treat NaN as not enough data in the month projection.
Regenerate admin_assets_gen.go.
2026-11-08 01:59:34 +00:00

35 lines
1.2 KiB
Vue

<script setup lang="ts">
import { Skeleton } from '@/components/ui/skeleton'
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'
/**
* SkeletonTable is a placeholder shaped exactly like DataTable.vue's own
* rendered table — the same Table/TableRow/TableHead/TableCell
* primitives, `rows` x `cols` pulsing cells — so a table view swapping
* this in for its first load causes no layout shift once real rows
* arrive. `cols` defaults to 4, the panel's most common table width;
* callers with a narrower or wider table pass their own column count.
*/
withDefaults(defineProps<{ rows?: number; cols?: number }>(), { rows: 5, cols: 4 })
</script>
<template>
<Table role="status" aria-busy="true" aria-label="Loading">
<TableHeader>
<TableRow>
<TableHead v-for="c in cols" :key="c">
<span class="sr-only">Loading</span>
<Skeleton class="h-4 w-16" />
</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow v-for="r in rows" :key="r">
<TableCell v-for="c in cols" :key="c">
<Skeleton class="h-4 w-full max-w-32" />
</TableCell>
</TableRow>
</TableBody>
</Table>
</template>