fix: harden upstream and downstream receipt delivery
This commit is contained in:
@@ -1266,6 +1266,22 @@ export type DownstreamDeliveryRecord = {
|
||||
tenant?: TenantOption | null;
|
||||
application?: EnterpriseApplication | null;
|
||||
messageRecord?: SmsMessageRecord | null;
|
||||
attempts?: Array<{
|
||||
id: string;
|
||||
attemptNo: number;
|
||||
connectionId?: string | null;
|
||||
sequenceId?: string | null;
|
||||
messageId?: string | null;
|
||||
status: string;
|
||||
sentAt?: string | null;
|
||||
ackDeadlineAt?: string | null;
|
||||
acknowledgedAt?: string | null;
|
||||
ackResult?: number | null;
|
||||
failureType?: string | null;
|
||||
errorMessage?: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type BatchRequeueResponse = {
|
||||
|
||||
@@ -66,6 +66,35 @@ function DeliveryDetailModal({ record, onClose }: { record: DownstreamDeliveryRe
|
||||
<div><span>连接 ID</span><strong>{record.connectionId ?? '-'}</strong></div>
|
||||
<div className="detail-grid__wide"><span>最后错误</span><strong>{record.lastError ?? '-'}</strong></div>
|
||||
</div>
|
||||
<section className="report-history">
|
||||
<h3>逐次投递记录</h3>
|
||||
<div className="downstream-attempt-table" role="table" aria-label="逐次投递记录">
|
||||
<div className="downstream-attempt-table__header" role="row">
|
||||
<span>次数 / 状态</span><span>发送 / ACK 时间</span><span>连接 / Sequence / Msg_Id</span><span>结果</span>
|
||||
</div>
|
||||
{(record.attempts ?? []).map((attempt) => (
|
||||
<div key={attempt.id} role="row">
|
||||
<strong>第 {attempt.attemptNo} 次<br />{attempt.status}</strong>
|
||||
<span>
|
||||
{attempt.sentAt ? formatDateTime(attempt.sentAt) : '-'}
|
||||
<br />
|
||||
ACK:{attempt.acknowledgedAt ? formatDateTime(attempt.acknowledgedAt) : '-'}
|
||||
</span>
|
||||
<span>
|
||||
{attempt.connectionId ?? '-'}
|
||||
<br />
|
||||
Seq:{attempt.sequenceId ?? '-'} / Msg:{attempt.messageId ?? '-'}
|
||||
</span>
|
||||
<span>
|
||||
ACK Result:{attempt.ackResult ?? '-'}
|
||||
<br />
|
||||
{attempt.errorMessage ?? attempt.failureType ?? '-'}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
{(record.attempts ?? []).length === 0 ? <p>暂无逐次投递记录</p> : null}
|
||||
</div>
|
||||
</section>
|
||||
<section className="report-history">
|
||||
<h3>Payload</h3>
|
||||
<pre style={{ whiteSpace: 'pre-wrap', wordBreak: 'break-word', margin: 0 }}>{payloadText}</pre>
|
||||
|
||||
@@ -8700,6 +8700,34 @@ h3 {
|
||||
color: var(--color-text-strong);
|
||||
}
|
||||
|
||||
.downstream-attempt-table {
|
||||
border-top: 0;
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.downstream-attempt-table > div {
|
||||
align-items: start;
|
||||
border-top: 1px solid var(--color-border);
|
||||
display: grid;
|
||||
gap: var(--space-4);
|
||||
grid-template-columns: minmax(110px, .7fr) minmax(190px, 1.1fr) minmax(260px, 1.5fr) minmax(180px, 1fr);
|
||||
min-width: 820px;
|
||||
padding: var(--space-3) 0;
|
||||
}
|
||||
|
||||
.downstream-attempt-table .downstream-attempt-table__header {
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.downstream-attempt-table > p {
|
||||
color: var(--color-text-muted);
|
||||
margin: var(--space-3) 0 0;
|
||||
}
|
||||
|
||||
.admin-task-template-row .ui-inline-text-preview {
|
||||
background: var(--color-bg-subtle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user