diff --git a/src/api/message.ts b/src/api/message.ts index 5f5a9f4..888ce79 100644 --- a/src/api/message.ts +++ b/src/api/message.ts @@ -18,6 +18,10 @@ export interface MessageRecord { incidentId?: number alertRecordId?: number nextRetryAt?: string + occurrenceCount?: number + firstOccurredAt?: string + lastOccurredAt?: string + lastDeliveryId?: number } export type MessageListType = MessageRecord[] diff --git a/src/api/ops/noticeChannel.ts b/src/api/ops/noticeChannel.ts index e302904..ea14293 100644 --- a/src/api/ops/noticeChannel.ts +++ b/src/api/ops/noticeChannel.ts @@ -32,7 +32,7 @@ export const createNoticeChannel = (data: { email_to?: string[] email_cc?: string[] email_bcc?: string[] - email_use_tls?: boolean + email_security_mode?: 'none' | 'starttls' | 'tls' sms_provider?: string sms_access_key_id?: string sms_access_key_secret?: string @@ -40,6 +40,7 @@ export const createNoticeChannel = (data: { sms_template_code?: string sms_phones?: string[] in_app_targets?: string[] + in_app_aggregation_window?: number }) => { return request.post('/Alert/v1/channel/create', data) } @@ -67,7 +68,7 @@ export const updateNoticeChannel = (data: { email_to?: string[] email_cc?: string[] email_bcc?: string[] - email_use_tls?: boolean + email_security_mode?: 'none' | 'starttls' | 'tls' sms_provider?: string sms_access_key_id?: string sms_access_key_secret?: string @@ -75,6 +76,7 @@ export const updateNoticeChannel = (data: { sms_template_code?: string sms_phones?: string[] in_app_targets?: string[] + in_app_aggregation_window?: number }) => { return request.post('/Alert/v1/channel/update', data) } diff --git a/src/components/message-box/list.vue b/src/components/message-box/list.vue index e58a35b..42fe441 100644 --- a/src/components/message-box/list.vue +++ b/src/components/message-box/list.vue @@ -13,7 +13,8 @@ {{ getDeliveryLabel(item.deliveryStatus) }} - 未开始 + 发生 {{ item.occurrenceCount }} 次 + 未开始 已开通 进行中 即将到期 diff --git a/src/views/ops/pages/alert/notice/components/ChannelFormDialog.vue b/src/views/ops/pages/alert/notice/components/ChannelFormDialog.vue index 09b7408..bae3deb 100644 --- a/src/views/ops/pages/alert/notice/components/ChannelFormDialog.vue +++ b/src/views/ops/pages/alert/notice/components/ChannelFormDialog.vue @@ -58,8 +58,12 @@ - - + + + 普通 SMTP + STARTTLS + TLS + @@ -98,20 +102,66 @@ - + + - + @@ -169,7 +219,7 @@ - + @@ -199,8 +249,11 @@ - +