diff --git a/model/log.go b/model/log.go index 401d53c4..1d2b38fc 100644 --- a/model/log.go +++ b/model/log.go @@ -124,7 +124,7 @@ func formatUserLogs(logs []*Log, startIdx int) { // Remove operation-audit details (operator/route info), admin-only. delete(otherMap, "audit_info") // delete(otherMap, "reject_reason") - delete(otherMap, "stream_status") + // delete(otherMap, "stream_status") } logs[i].Other = common.MapToJsonStr(otherMap) } diff --git a/web/src/features/usage-logs/components/dialogs/details-dialog.tsx b/web/src/features/usage-logs/components/dialogs/details-dialog.tsx index ded70ad5..8f57ac6b 100644 --- a/web/src/features/usage-logs/components/dialogs/details-dialog.tsx +++ b/web/src/features/usage-logs/components/dialogs/details-dialog.tsx @@ -1107,48 +1107,46 @@ export function DetailsDialog(props: DetailsDialogProps) { /> )} - {/* Stream status details (admin only) */} - {props.isAdmin && - other?.stream_status && - other.stream_status.status !== 'ok' && ( - + {/* Stream status details */} + {other?.stream_status && other.stream_status.status !== 'ok' && ( + + + } + /> + {other.stream_status.end_reason && ( - } + label={t('End Reason')} + value={other.stream_status.end_reason} /> - {other.stream_status.end_reason && ( - + )} + {(other.stream_status.error_count ?? 0) > 0 && ( + + )} + {other.stream_status.end_error && ( + + )} + {Array.isArray(other.stream_status.errors) && + other.stream_status.errors.length > 0 && ( +
+                  {other.stream_status.errors.join('\n')}
+                
)} - {(other.stream_status.error_count ?? 0) > 0 && ( - - )} - {other.stream_status.end_error && ( - - )} - {Array.isArray(other.stream_status.errors) && - other.stream_status.errors.length > 0 && ( -
-                    {other.stream_status.errors.join('\n')}
-                  
- )} -
- )} +
+ )} {/* Subscription billing details */} {isSubscription && other && (