mirror of
https://github.com/whyour/qinglong.git
synced 2026-10-17 07:20:51 +08:00
fix(notify): audit system and JS/Python script notification results
This commit is contained in:
@@ -702,5 +702,8 @@
|
||||
"通知日志": "Notification log",
|
||||
"发送时间": "Sent at",
|
||||
"推送渠道": "Channel",
|
||||
"发送状态": "Delivery status"
|
||||
"发送状态": "Delivery status",
|
||||
"通知来源": "Notification source",
|
||||
"脚本通知": "Script notification",
|
||||
"系统通知": "System notification"
|
||||
}
|
||||
|
||||
@@ -702,5 +702,8 @@
|
||||
"通知日志": "通知日志",
|
||||
"发送时间": "发送时间",
|
||||
"推送渠道": "推送渠道",
|
||||
"发送状态": "发送状态"
|
||||
"发送状态": "发送状态",
|
||||
"通知来源": "通知来源",
|
||||
"脚本通知": "脚本通知",
|
||||
"系统通知": "系统通知"
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ interface NotifyLogItem {
|
||||
content?: string;
|
||||
status?: number;
|
||||
notifyType?: string;
|
||||
source?: 'system' | 'script';
|
||||
scriptName?: string;
|
||||
taskId?: string;
|
||||
}
|
||||
|
||||
const NotifyStatusLabel: Record<number, string> = {
|
||||
@@ -23,6 +26,18 @@ const NotifyStatusColor: Record<number, string> = {
|
||||
};
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: intl.get('通知来源'),
|
||||
key: 'source',
|
||||
width: 220,
|
||||
render: (_: unknown, record: NotifyLogItem) => (
|
||||
<span>
|
||||
{intl.get(record.source === 'script' ? '脚本通知' : '系统通知')}
|
||||
{record.scriptName ? ` · ${record.scriptName}` : ''}
|
||||
{record.taskId ? ` (#${record.taskId})` : ''}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: intl.get('序号'),
|
||||
width: 50,
|
||||
@@ -68,10 +83,7 @@ const columns = [
|
||||
render: (text: string, record: NotifyLogItem) => {
|
||||
const statusKey = record.status ?? 1;
|
||||
return (
|
||||
<Tag
|
||||
color={NotifyStatusColor[statusKey]}
|
||||
style={{ marginRight: 0 }}
|
||||
>
|
||||
<Tag color={NotifyStatusColor[statusKey]} style={{ marginRight: 0 }}>
|
||||
{intl.get(NotifyStatusLabel[statusKey])}
|
||||
</Tag>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user