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:
@@ -2,7 +2,9 @@
|
||||
import { faCheck, faCopy, faTriangleExclamation } from '@fortawesome/free-solid-svg-icons'
|
||||
import { computed, useTemplateRef } from 'vue'
|
||||
|
||||
import AliasBadge from '@/components/AliasBadge.vue'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { useAliasNames } from '@/composables/useAliasNames'
|
||||
import { useCopyFeedback } from '@/composables/useCopyFeedback'
|
||||
import { copyText } from '@/lib/clipboard'
|
||||
import { formatContextWindow, formatModelCostHover } from '@/lib/format'
|
||||
@@ -50,6 +52,7 @@ const props = defineProps<{
|
||||
outputPerMTokUsd?: number
|
||||
}>()
|
||||
|
||||
const { isAlias } = useAliasNames()
|
||||
const labelRef = useTemplateRef<HTMLElement>('label')
|
||||
const { state, set: setCopyFeedback } = useCopyFeedback()
|
||||
const toasts = useToastsStore()
|
||||
@@ -125,6 +128,7 @@ const title = computed(() => {
|
||||
@click="onClick"
|
||||
>
|
||||
<span ref="label" class="min-w-0 truncate select-text">{{ id }}</span>
|
||||
<AliasBadge v-if="isAlias(id)" />
|
||||
<FontAwesomeIcon :icon="icon[state]" class="size-2.5 shrink-0" aria-hidden="true" />
|
||||
</Badge>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user