Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
5c856460
Commit
5c856460
authored
Mar 01, 2026
by
Gemini Wen
Browse files
fix(dashboard): sort recent usage tooltip labels by token consumption
parent
dd8df483
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/src/views/admin/DashboardView.vue
View file @
5c856460
...
@@ -366,6 +366,11 @@ const lineOptions = computed(() => ({
...
@@ -366,6 +366,11 @@ const lineOptions = computed(() => ({
}
}
},
},
tooltip
:
{
tooltip
:
{
itemSort
:
(
a
:
any
,
b
:
any
)
=>
{
const
aValue
=
typeof
a
?.
raw
===
'
number
'
?
a
.
raw
:
Number
(
a
?.
parsed
?.
y
??
0
)
const
bValue
=
typeof
b
?.
raw
===
'
number
'
?
b
.
raw
:
Number
(
b
?.
parsed
?.
y
??
0
)
return
bValue
-
aValue
},
callbacks
:
{
callbacks
:
{
label
:
(
context
:
any
)
=>
{
label
:
(
context
:
any
)
=>
{
return
`
${
context
.
dataset
.
label
}
:
${
formatTokens
(
context
.
raw
)}
`
return
`
${
context
.
dataset
.
label
}
:
${
formatTokens
(
context
.
raw
)}
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment