Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
84834eee
authored
Jul 31, 2026
by
Seefs
Committed by
GitHub
Jul 31, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(logs): expose stream status to log owners (#6558)
parent
0f9f668c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
40 deletions
+38
-40
model/log.go
+1
-1
web/src/features/usage-logs/components/dialogs/details-dialog.tsx
+37
-39
No files found.
model/log.go
View file @
84834eee
...
@@ -124,7 +124,7 @@ func formatUserLogs(logs []*Log, startIdx int) {
...
@@ -124,7 +124,7 @@ func formatUserLogs(logs []*Log, startIdx int) {
// Remove operation-audit details (operator/route info), admin-only.
// Remove operation-audit details (operator/route info), admin-only.
delete
(
otherMap
,
"audit_info"
)
delete
(
otherMap
,
"audit_info"
)
// delete(otherMap, "reject_reason")
// delete(otherMap, "reject_reason")
delete
(
otherMap
,
"stream_status"
)
//
delete(otherMap, "stream_status")
}
}
logs
[
i
]
.
Other
=
common
.
MapToJsonStr
(
otherMap
)
logs
[
i
]
.
Other
=
common
.
MapToJsonStr
(
otherMap
)
}
}
...
...
web/src/features/usage-logs/components/dialogs/details-dialog.tsx
View file @
84834eee
...
@@ -1107,48 +1107,46 @@ export function DetailsDialog(props: DetailsDialogProps) {
...
@@ -1107,48 +1107,46 @@ export function DetailsDialog(props: DetailsDialogProps) {
/>
/>
)
}
)
}
{
/* Stream status details (admin only) */
}
{
/* Stream status details */
}
{
props
.
isAdmin
&&
{
other
?.
stream_status
&&
other
.
stream_status
.
status
!==
'ok'
&&
(
other
?.
stream_status
&&
<
DetailSection
label=
{
t
(
'Stream Status'
)
}
>
other
.
stream_status
.
status
!==
'ok'
&&
(
<
DetailRow
<
DetailSection
label=
{
t
(
'Stream Status'
)
}
>
label=
{
t
(
'Status'
)
}
value=
{
<
StatusBadge
label=
{
other
.
stream_status
.
status
||
t
(
'Error'
)
}
variant=
'red'
size=
'sm'
copyable=
{
false
}
/>
}
/>
{
other
.
stream_status
.
end_reason
&&
(
<
DetailRow
<
DetailRow
label=
{
t
(
'Status'
)
}
label=
{
t
(
'End Reason'
)
}
value=
{
value=
{
other
.
stream_status
.
end_reason
}
<
StatusBadge
label=
{
other
.
stream_status
.
status
||
t
(
'Error'
)
}
variant=
'red'
size=
'sm'
copyable=
{
false
}
/>
}
/>
/>
{
other
.
stream_status
.
end_reason
&&
(
)
}
<
DetailRow
{
(
other
.
stream_status
.
error_count
??
0
)
>
0
&&
(
label=
{
t
(
'End Reason'
)
}
<
DetailRow
value=
{
other
.
stream_status
.
end_reason
}
label=
{
t
(
'Soft Errors'
)
}
/>
value=
{
String
(
other
.
stream_status
.
error_count
)
}
)
}
/>
{
(
other
.
stream_status
.
error_count
??
0
)
>
0
&&
(
)
}
<
DetailRow
{
other
.
stream_status
.
end_error
&&
(
label=
{
t
(
'Soft Errors'
)
}
<
DetailRow
value=
{
String
(
other
.
stream_status
.
error_count
)
}
label=
{
t
(
'End Error'
)
}
/>
value=
{
other
.
stream_status
.
end_error
}
)
}
/>
{
other
.
stream_status
.
end_error
&&
(
)
}
<
DetailRow
{
Array
.
isArray
(
other
.
stream_status
.
errors
)
&&
label=
{
t
(
'End Error'
)
}
other
.
stream_status
.
errors
.
length
>
0
&&
(
value=
{
other
.
stream_status
.
end_error
}
<
pre
className=
'bg-background/60 mt-1 max-h-32 overflow-y-auto rounded border p-2 font-mono text-[11px] leading-relaxed wrap-break-word whitespace-pre-wrap'
>
/>
{
other
.
stream_status
.
errors
.
join
(
'\n'
)
}
</
pre
>
)
}
)
}
{
Array
.
isArray
(
other
.
stream_status
.
errors
)
&&
</
DetailSection
>
other
.
stream_status
.
errors
.
length
>
0
&&
(
)
}
<
pre
className=
'bg-background/60 mt-1 max-h-32 overflow-y-auto rounded border p-2 font-mono text-[11px] leading-relaxed wrap-break-word whitespace-pre-wrap'
>
{
other
.
stream_status
.
errors
.
join
(
'\n'
)
}
</
pre
>
)
}
</
DetailSection
>
)
}
{
/* Subscription billing details */
}
{
/* Subscription billing details */
}
{
isSubscription
&&
other
&&
(
{
isSubscription
&&
other
&&
(
...
...
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