feat(semi-auto): 报文列表展示接口用途说明
This commit is contained in:
@@ -27,6 +27,7 @@ import type { CSSProperties } from 'react'
|
||||
import { fetchAdminSemiAutoTaskHistory } from '@/services/admin/semi-auto'
|
||||
import type { SemiAutoTaskHistoryEvent, SemiAutoTraceItem } from '@/types/admin/semi-auto'
|
||||
import { formatAdminDateTime } from '@/utils/admin-time'
|
||||
import { describeSemiAutoTraceAction } from '@/utils/semi-auto-trace-action'
|
||||
import { useIsMobile } from '@/utils/use-is-mobile'
|
||||
|
||||
const { Text } = Typography
|
||||
@@ -584,6 +585,10 @@ function EventItem({
|
||||
}
|
||||
|
||||
function TraceLabel({ item }: { item: SemiAutoTraceItem }) {
|
||||
const actionLabel = describeSemiAutoTraceAction({
|
||||
channel: item.channel,
|
||||
action: item.action,
|
||||
})
|
||||
return (
|
||||
<Space direction="vertical" size={2} style={{ width: '100%' }}>
|
||||
<Space size={6} wrap>
|
||||
@@ -602,6 +607,7 @@ function TraceLabel({ item }: { item: SemiAutoTraceItem }) {
|
||||
) : null}
|
||||
<Text type="secondary">{formatAdminDateTime(item.createdAt)}</Text>
|
||||
</Space>
|
||||
{actionLabel ? <Text strong>{actionLabel}</Text> : null}
|
||||
<Text code style={{ whiteSpace: 'break-all' }}>
|
||||
{item.action}
|
||||
</Text>
|
||||
@@ -621,6 +627,10 @@ function TracePayload({
|
||||
onCopy: (text: string, label: string) => void
|
||||
onFilterRequest: (requestId: string) => void
|
||||
}) {
|
||||
const actionLabel = describeSemiAutoTraceAction({
|
||||
channel: item.channel,
|
||||
action: item.action,
|
||||
})
|
||||
return (
|
||||
<Space direction="vertical" size={10} style={{ width: '100%' }}>
|
||||
<Row gutter={[12, 12]}>
|
||||
@@ -644,7 +654,7 @@ function TracePayload({
|
||||
onClick={() =>
|
||||
onCopy(
|
||||
[
|
||||
`动作:${item.action}`,
|
||||
`动作:${actionLabel ? `${actionLabel} · ` : ''}${item.action}`,
|
||||
`requestId:${item.requestId}`,
|
||||
'',
|
||||
'# 请求',
|
||||
|
||||
Reference in New Issue
Block a user