mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
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.
7 lines
412 B
TypeScript
7 lines
412 B
TypeScript
/** staleNotice returns the text for a "showing old data" banner, or null. Shown only when data is on screen and the latest refresh failed. */
|
|
export function staleNotice(hasData: boolean, error: string, lastUpdated: Date | null): string | null {
|
|
if (!hasData || !error) return null
|
|
const at = lastUpdated ? ` Data from ${lastUpdated.toLocaleTimeString()}.` : ''
|
|
return `Refresh failing: ${error}.${at}`
|
|
}
|