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
8c2dd7b3
"vscode:/vscode.git/clone" did not exist on "c5c12d4c8b44cbfecf2ee22ae3fd7810f724c638"
Commit
8c2dd7b3
authored
Mar 11, 2026
by
ius
Browse files
Fix dashboard snapshot lint errors
parent
4167c437
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/handler/admin/dashboard_snapshot_v2_handler.go
View file @
8c2dd7b3
...
@@ -162,7 +162,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
...
@@ -162,7 +162,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
if
includeStats
{
if
includeStats
{
stats
,
err
:=
h
.
dashboardService
.
GetDashboardStats
(
ctx
)
stats
,
err
:=
h
.
dashboardService
.
GetDashboardStats
(
ctx
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
errors
.
New
(
"
F
ailed to get dashboard statistics"
)
return
nil
,
errors
.
New
(
"
f
ailed to get dashboard statistics"
)
}
}
resp
.
Stats
=
&
dashboardSnapshotV2Stats
{
resp
.
Stats
=
&
dashboardSnapshotV2Stats
{
DashboardStats
:
*
stats
,
DashboardStats
:
*
stats
,
...
@@ -186,7 +186,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
...
@@ -186,7 +186,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
filters
.
BillingType
,
filters
.
BillingType
,
)
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
errors
.
New
(
"
F
ailed to get usage trend"
)
return
nil
,
errors
.
New
(
"
f
ailed to get usage trend"
)
}
}
resp
.
Trend
=
trend
resp
.
Trend
=
trend
}
}
...
@@ -205,7 +205,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
...
@@ -205,7 +205,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
filters
.
BillingType
,
filters
.
BillingType
,
)
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
errors
.
New
(
"
F
ailed to get model statistics"
)
return
nil
,
errors
.
New
(
"
f
ailed to get model statistics"
)
}
}
resp
.
Models
=
models
resp
.
Models
=
models
}
}
...
@@ -224,7 +224,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
...
@@ -224,7 +224,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
filters
.
BillingType
,
filters
.
BillingType
,
)
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
errors
.
New
(
"
F
ailed to get group statistics"
)
return
nil
,
errors
.
New
(
"
f
ailed to get group statistics"
)
}
}
resp
.
Groups
=
groups
resp
.
Groups
=
groups
}
}
...
@@ -232,7 +232,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
...
@@ -232,7 +232,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
if
includeUsersTrend
{
if
includeUsersTrend
{
usersTrend
,
_
,
err
:=
h
.
getUserUsageTrendCached
(
ctx
,
startTime
,
endTime
,
granularity
,
usersTrendLimit
)
usersTrend
,
_
,
err
:=
h
.
getUserUsageTrendCached
(
ctx
,
startTime
,
endTime
,
granularity
,
usersTrendLimit
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
errors
.
New
(
"
F
ailed to get user usage trend"
)
return
nil
,
errors
.
New
(
"
f
ailed to get user usage trend"
)
}
}
resp
.
UsersTrend
=
usersTrend
resp
.
UsersTrend
=
usersTrend
}
}
...
...
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