mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-10-18 05:47:38 +00:00
fix(admin): share the zero-time constant
The zero-time sentinel was module private, so the spec redeclared the literal once a third consumer started depending on it. Export it and import it in the spec. Regenerate the baked admin assets. Claude-Session: https://claude.ai/code/session_01EebV5jyWvYocByNQ3oss1w
This commit is contained in:
+6
-6
File diff suppressed because one or more lines are too long
@@ -1,8 +1,6 @@
|
|||||||
import { describe, expect, it } from 'vitest'
|
import { describe, expect, it } from 'vitest'
|
||||||
|
|
||||||
import { formatCompactCount, formatContextWindow, formatElapsedAgo, formatLatencyMs, formatModelCostHover, formatUntil, refreshDetailLabel, refreshLabel } from './format'
|
import { formatCompactCount, formatContextWindow, formatElapsedAgo, formatLatencyMs, formatModelCostHover, formatUntil, refreshDetailLabel, refreshLabel, ZERO_TIME } from './format'
|
||||||
|
|
||||||
const ZERO_TIME = '0001-01-01T00:00:00Z'
|
|
||||||
|
|
||||||
describe('refreshLabel', () => {
|
describe('refreshLabel', () => {
|
||||||
it('reads "discovery off" when discovery is disabled, regardless of lastRefresh', () => {
|
it('reads "discovery off" when discovery is disabled, regardless of lastRefresh', () => {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { HistoryWindow, LimitsConfig } from '@/types/api'
|
import type { HistoryWindow, LimitsConfig } from '@/types/api'
|
||||||
|
|
||||||
const ZERO_TIME = '0001-01-01T00:00:00Z'
|
/** ZERO_TIME is Go's zero time.Time value in its default JSON (RFC 3339) encoding — the unset-timestamp sentinel every admin API "never happened yet" field marshals as, and every formatter/test below treats as absent. */
|
||||||
|
export const ZERO_TIME = '0001-01-01T00:00:00Z'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* routableModelId joins a provider name and one of its own model ids into
|
* routableModelId joins a provider name and one of its own model ids into
|
||||||
|
|||||||
Reference in New Issue
Block a user