feat(logs): expose stream status to log owners (#6558)
This commit is contained in:
@@ -1107,48 +1107,46 @@ export function DetailsDialog(props: DetailsDialogProps) {
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Stream status details (admin only) */}
|
||||
{props.isAdmin &&
|
||||
other?.stream_status &&
|
||||
other.stream_status.status !== 'ok' && (
|
||||
<DetailSection label={t('Stream Status')}>
|
||||
{/* Stream status details */}
|
||||
{other?.stream_status && other.stream_status.status !== 'ok' && (
|
||||
<DetailSection label={t('Stream Status')}>
|
||||
<DetailRow
|
||||
label={t('Status')}
|
||||
value={
|
||||
<StatusBadge
|
||||
label={other.stream_status.status || t('Error')}
|
||||
variant='red'
|
||||
size='sm'
|
||||
copyable={false}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{other.stream_status.end_reason && (
|
||||
<DetailRow
|
||||
label={t('Status')}
|
||||
value={
|
||||
<StatusBadge
|
||||
label={other.stream_status.status || t('Error')}
|
||||
variant='red'
|
||||
size='sm'
|
||||
copyable={false}
|
||||
/>
|
||||
}
|
||||
label={t('End Reason')}
|
||||
value={other.stream_status.end_reason}
|
||||
/>
|
||||
{other.stream_status.end_reason && (
|
||||
<DetailRow
|
||||
label={t('End Reason')}
|
||||
value={other.stream_status.end_reason}
|
||||
/>
|
||||
)}
|
||||
{(other.stream_status.error_count ?? 0) > 0 && (
|
||||
<DetailRow
|
||||
label={t('Soft Errors')}
|
||||
value={String(other.stream_status.error_count)}
|
||||
/>
|
||||
)}
|
||||
{other.stream_status.end_error && (
|
||||
<DetailRow
|
||||
label={t('End Error')}
|
||||
value={other.stream_status.end_error}
|
||||
/>
|
||||
)}
|
||||
{Array.isArray(other.stream_status.errors) &&
|
||||
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>
|
||||
)}
|
||||
{(other.stream_status.error_count ?? 0) > 0 && (
|
||||
<DetailRow
|
||||
label={t('Soft Errors')}
|
||||
value={String(other.stream_status.error_count)}
|
||||
/>
|
||||
)}
|
||||
{other.stream_status.end_error && (
|
||||
<DetailRow
|
||||
label={t('End Error')}
|
||||
value={other.stream_status.end_error}
|
||||
/>
|
||||
)}
|
||||
{Array.isArray(other.stream_status.errors) &&
|
||||
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>
|
||||
)}
|
||||
</DetailSection>
|
||||
)}
|
||||
|
||||
{/* Subscription billing details */}
|
||||
{isSubscription && other && (
|
||||
|
||||
Reference in New Issue
Block a user