mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
feat(admin-ui): alias labels, active-provider legends, denser tables and readable money
Label configured model aliases with an alias badge wherever a model id shows. List only providers with traffic in the window in provider chart legends. Page long tables, show a scroll shadow on wide ones and drop the duplicate model link. Show costs with thousands separators and magnitude-scaled decimals on cards and chart axes. Use whole-number ticks for count charts and replace all-zero charts with a message. Back off polling after failures. Keep the CSV status region from widening the page on phones. Regenerate admin_assets_gen.go.
This commit is contained in:
@@ -131,7 +131,7 @@ export const useDashboardStore = defineStore('dashboard', {
|
||||
*/
|
||||
startPolling(): void {
|
||||
if (this.poller) return
|
||||
this.poller = createVisibilityPoller({ intervalMs: POLL_MS, tick: () => void this.refresh() })
|
||||
this.poller = createVisibilityPoller({ intervalMs: POLL_MS, tick: () => this.refresh().then(() => this.error !== '') })
|
||||
this.poller.start()
|
||||
},
|
||||
// P11 review fix: a stopPolling action mirroring events.ts's own
|
||||
|
||||
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia'
|
||||
|
||||
import { adminFetch, isAuthRejection, messageOf } from '@/lib/api'
|
||||
import { seriesUrl } from '@/lib/range'
|
||||
import { ratioSeries } from '@/lib/series'
|
||||
import { activeScopes, ratioSeries } from '@/lib/series'
|
||||
import { useDashboardStore } from '@/stores/dashboard'
|
||||
import { useFiltersStore } from '@/stores/filters'
|
||||
import type { AdminPerfResponse, AdminPerfRow, AdminSeriesResponse, HistoryWindow } from '@/types/api'
|
||||
@@ -155,9 +155,11 @@ export const useReliabilityStore = defineStore('reliability', {
|
||||
|
||||
this.buckets = attemptRes.buckets
|
||||
this.windowUsed = window
|
||||
this.errorRate = errorRateSeries(attemptRes, failRes)
|
||||
this.timeouts = timeoutRes.series
|
||||
this.failovers = foverRes.series
|
||||
// A provider with no attempts in the window is idle, not healthy: keep it out of every legend.
|
||||
const active = activeScopes(attemptRes.series)
|
||||
this.errorRate = errorRateSeries(attemptRes, failRes).filter((s) => active.has(s.scope))
|
||||
this.timeouts = timeoutRes.series.filter((s) => active.has(s.scope))
|
||||
this.failovers = foverRes.series.filter((s) => active.has(s.scope))
|
||||
this.rejections = rejRes.series[0]?.points ?? []
|
||||
this.unpriced = r402Res.series[0]?.points ?? []
|
||||
this.lastUpdated = new Date()
|
||||
|
||||
Reference in New Issue
Block a user