refactor: Improve alarm prompt information (#9564)

This commit is contained in:
2025-07-18 15:43:22 +08:00 committed by GitHub
parent 84608b7d42
commit 9c609da332
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 136 additions and 33 deletions

View file

@ -3637,9 +3637,9 @@ const message = {
alertNotice: 'Alert Notification',
methodConfig: 'Notification Method Configuration',
commonConfig: 'Global Configuration',
smsConfig: 'SMS Configuration',
smsConfig: 'SMS',
smsConfigHelper: 'Configure phone numbers for SMS notifications',
emailConfig: 'Email Configuration',
emailConfig: 'Email',
emailConfigHelper: 'Configure SMTP email sending service',
deleteConfigTitle: 'Delete Alert Configuration',
deleteConfigMsg: 'Are you sure you want to delete the alert configuration?',
@ -3655,6 +3655,14 @@ const message = {
recipient: 'Recipient',
licenseTime: 'License Expiration Reminder',
licenseTimeTitle: 'License Expiration Reminder',
displayNameHelper: 'Sender display name for emails',
senderHelper: 'Email address used to send messages',
passwordHelper: 'Authorization code for the email service',
hostHelper: 'SMTP server address, e.g., smtp.qq.com',
portHelper: 'SSL usually uses 465, TLS usually uses 587, no encryption usually uses 25',
sslHelper: 'If the SMTP port is 465, SSL is usually required',
tlsHelper: 'If the SMTP port is 587, TLS is usually required',
none: 'None',
},
theme: {
lingXiaGold: 'Ling Xia Gold',

View file

@ -3501,9 +3501,9 @@ const message = {
alertNotice: 'アラート通知',
methodConfig: '通知方法の設定',
commonConfig: 'グローバル設定',
smsConfig: 'SMS 設定',
smsConfig: 'SMS',
smsConfigHelper: 'SMS 通知の電話番号を設定する',
emailConfig: 'メール設定',
emailConfig: 'メール',
emailConfigHelper: 'SMTP メール送信サービスを設定する',
deleteConfigTitle: 'アラート設定を削除',
deleteConfigMsg: 'アラート設定を削除してもよろしいですか',
@ -3519,6 +3519,14 @@ const message = {
recipient: '受信者',
licenseTime: 'ライセンスの有効期限切れ通知',
licenseTimeTitle: 'ライセンスの有効期限切れ通知',
displayNameHelper: 'メールの送信者表示名',
senderHelper: 'メール送信に使用するメールアドレス',
passwordHelper: 'メールサービスの認証コード',
hostHelper: 'SMTP サーバーアドレスsmtp.qq.com',
portHelper: 'SSLは通常465TLSは通常587暗号化なしは通常25',
sslHelper: 'SMTPポートが465の場合通常はSSLが必要です',
tlsHelper: 'SMTPポートが587の場合通常はTLSが必要です',
none: 'なし',
},
theme: {
lingXiaGold: '凌霞金',

View file

@ -3439,9 +3439,9 @@ const message = {
alertNotice: '알림 통지',
methodConfig: '알림 방법 설정',
commonConfig: '전역 설정',
smsConfig: 'SMS 설정',
smsConfig: 'SMS',
smsConfigHelper: 'SMS 알림을 받을 전화번호를 설정합니다',
emailConfig: '이메일 설정',
emailConfig: '이메일',
emailConfigHelper: 'SMTP 이메일 발송 서비스를 설정합니다',
deleteConfigTitle: '알림 설정 삭제',
deleteConfigMsg: '알림 설정을 삭제하시겠습니까?',
@ -3457,6 +3457,14 @@ const message = {
recipient: '수신자',
licenseTime: '라이선스 만료 알림',
licenseTimeTitle: '라이선스 만료 알림',
displayNameHelper: '이메일 발신자 표시 이름',
senderHelper: '이메일 발송에 사용되는 주소',
passwordHelper: '메일 서비스의 인증 코드',
hostHelper: 'SMTP 서버 주소, : smtp.qq.com',
portHelper: 'SSL 일반적으로 465, TLS 587, 암호화 없음은 일반적으로 25',
sslHelper: 'SMTP 포트가 465 이면 일반적으로 SSL 필요합니다',
tlsHelper: 'SMTP 포트가 587 이면 일반적으로 TLS 필요합니다',
none: '없음',
},
theme: {
lingXiaGold: '링샤 골드',

View file

@ -3582,9 +3582,9 @@ const message = {
alertNotice: 'Pemberitahuan Amaran',
methodConfig: 'Konfigurasi Kaedah Pemberitahuan',
commonConfig: 'Konfigurasi Global',
smsConfig: 'Konfigurasi SMS',
smsConfig: 'SMS',
smsConfigHelper: 'Konfigurasi nombor untuk pemberitahuan SMS',
emailConfig: 'Konfigurasi E-mel',
emailConfig: 'E-mel',
emailConfigHelper: 'Konfigurasi perkhidmatan penghantaran e-mel SMTP',
deleteConfigTitle: 'Padam Konfigurasi Amaran',
deleteConfigMsg: 'Adakah anda pasti mahu memadam konfigurasi amaran?',
@ -3600,6 +3600,14 @@ const message = {
recipient: 'Penerima',
licenseTime: 'Peringatan Tamat Tempoh Lesen',
licenseTimeTitle: 'Peringatan Tamat Tempoh Lesen',
displayNameHelper: 'Nama paparan pengirim e-mel',
senderHelper: 'Alamat e-mel yang digunakan untuk menghantar e-mel',
passwordHelper: 'Kod kebenaran untuk perkhidmatan e-mel',
hostHelper: 'Alamat pelayan SMTP, contoh: smtp.qq.com',
portHelper: 'SSL biasanya 465, TLS biasanya 587, tanpa penyulitan biasanya 25',
sslHelper: 'Jika port SMTP ialah 465, SSL biasanya diperlukan',
tlsHelper: 'Jika port SMTP ialah 587, TLS biasanya diperlukan',
none: 'Tiada',
},
theme: {
lingXiaGold: 'Ling Xia Emas',

View file

@ -3589,9 +3589,9 @@ const message = {
alertNotice: 'Notificação de Alerta',
methodConfig: 'Configuração do Método de Notificação',
commonConfig: 'Configuração Global',
smsConfig: 'Configuração de SMS',
smsConfig: 'SMS',
smsConfigHelper: 'Configure os números para notificação por SMS',
emailConfig: 'Configuração de E-mail',
emailConfig: 'E-mail',
emailConfigHelper: 'Configure o serviço de envio de e-mail SMTP',
deleteConfigTitle: 'Excluir Configuração de Alerta',
deleteConfigMsg: 'Tem certeza de que deseja excluir a configuração de alerta?',
@ -3607,6 +3607,14 @@ const message = {
recipient: 'Destinatário',
licenseTime: 'Lembrete de Expiração da Licença',
licenseTimeTitle: 'Lembrete de Expiração da Licença',
displayNameHelper: 'Nome exibido do remetente do e-mail',
senderHelper: 'Endereço de e-mail usado para envio',
passwordHelper: 'Código de autorização do serviço de e-mail',
hostHelper: 'Endereço do servidor SMTP, ex: smtp.qq.com',
portHelper: 'SSL geralmente usa 465, TLS geralmente usa 587, sem criptografia usa 25',
sslHelper: 'Se a porta SMTP for 465, normalmente é necessário SSL',
tlsHelper: 'Se a porta SMTP for 587, normalmente é necessário TLS',
none: 'Nenhum',
},
theme: {
lingXiaGold: 'Ling Xia Gold',

View file

@ -3580,9 +3580,9 @@ const message = {
alertNotice: 'Уведомление об оповещении',
methodConfig: 'Настройка способа уведомления',
commonConfig: 'Глобальная настройка',
smsConfig: 'Настройка SMS',
smsConfig: 'SMS',
smsConfigHelper: 'Настройка номеров для SMS-уведомлений',
emailConfig: 'Настройка электронной почты',
emailConfig: 'электронной почты',
emailConfigHelper: 'Настройка службы отправки SMTP-писем',
deleteConfigTitle: 'Удалить конфигурацию оповещения',
deleteConfigMsg: 'Вы уверены, что хотите удалить конфигурацию оповещения?',
@ -3598,6 +3598,14 @@ const message = {
recipient: 'Получатель',
licenseTime: 'Напоминание об истечении лицензии',
licenseTimeTitle: 'Напоминание об истечении лицензии',
displayNameHelper: 'Отображаемое имя отправителя письма',
senderHelper: 'Адрес электронной почты для отправки сообщений',
passwordHelper: 'Код авторизации почтового сервиса',
hostHelper: 'Адрес SMTP-сервера, например: smtp.qq.com',
portHelper: 'SSL обычно использует 465, TLS 587, без шифрования 25',
sslHelper: 'Если порт SMTP 465, обычно требуется SSL',
tlsHelper: 'Если порт SMTP 587, обычно требуется TLS',
none: 'Нет',
},
theme: {
lingXiaGold: 'Лин Ся Золотой',

View file

@ -3678,9 +3678,9 @@ const message = {
alertNotice: 'Uyarı Bildirimi',
methodConfig: 'Bildirim Yöntemi Ayarı',
commonConfig: 'Genel Ayar',
smsConfig: 'SMS Ayarı',
smsConfig: 'SMS',
smsConfigHelper: 'SMS bildirimi için telefon numaralarını yapılandırın',
emailConfig: 'E-posta Ayarı',
emailConfig: 'E-posta',
emailConfigHelper: 'SMTP e-posta gönderme hizmetini yapılandırın',
deleteConfigTitle: 'Uyarı Yapılandırmasını Sil',
deleteConfigMsg: 'Uyarı yapılandırmasını silmek istediğinizden emin misiniz?',
@ -3696,6 +3696,14 @@ const message = {
recipient: 'Alıcı',
licenseTime: 'Lisans Süresi Hatırlatması',
licenseTimeTitle: 'Lisans Süresi Hatırlatması',
displayNameHelper: 'E-posta göndericisinin görünen adı',
senderHelper: 'E-posta göndermek için kullanılan adres',
passwordHelper: 'E-posta servisinin yetkilendirme kodu',
hostHelper: 'SMTP sunucu adresi, örneğin: smtp.qq.com',
portHelper: 'SSL genellikle 465, TLS genellikle 587, şifreleme yoksa genellikle 25',
sslHelper: 'SMTP portu 465 ise genellikle SSL gerekir',
tlsHelper: 'SMTP portu 587 ise genellikle TLS gerekir',
none: 'Yok',
},
theme: {
lingXiaGold: 'Ling Xia Altın',

View file

@ -3383,9 +3383,9 @@ const message = {
alertNotice: '警報通知',
methodConfig: '發送方式設定',
commonConfig: '全域設定',
smsConfig: '簡訊設定',
smsConfig: '簡訊',
smsConfigHelper: '設定簡訊通知號碼',
emailConfig: '郵件設定',
emailConfig: '郵件',
emailConfigHelper: '設定 SMTP 郵件發送服務',
deleteConfigTitle: '刪除警報設定',
deleteConfigMsg: '是否確定刪除此警報設定',
@ -3401,6 +3401,14 @@ const message = {
recipient: '收件者',
licenseTime: '授權到期提醒',
licenseTimeTitle: '授權到期提醒',
displayNameHelper: '郵件的寄件人顯示名稱',
senderHelper: '用於發送郵件的電子信箱地址',
passwordHelper: '郵件服務的授權碼',
hostHelper: 'SMTP 伺服器地址例如smtp.qq.com',
portHelper: 'SSL 通常為 465TLS 通常為 587無加密則通常為 25',
sslHelper: ' SMTP 連接埠為 465通常需要啟用 SSL',
tlsHelper: ' SMTP 連接埠為 587通常需要啟用 TLS',
none: '無',
},
theme: {
lingXiaGold: '凌霞金',

View file

@ -3353,9 +3353,9 @@ const message = {
alertNotice: '告警通知',
methodConfig: '发送方式配置',
commonConfig: '全局配置',
smsConfig: '短信配置',
smsConfig: '短信通知',
smsConfigHelper: '配置短信通知号码',
emailConfig: '邮箱配置',
emailConfig: '邮箱',
emailConfigHelper: '配置 SMTP 邮件发送服务',
deleteConfigTitle: '删除告警配置',
deleteConfigMsg: '是否确认删除告警配置',
@ -3371,6 +3371,14 @@ const message = {
recipient: '收件人',
licenseTime: '许可证到期提醒',
licenseTimeTitle: '许可证到期提醒',
displayNameHelper: '邮件的发件人显示名称',
senderHelper: '用于发送邮件的邮箱地址',
passwordHelper: '邮件服务的授权码',
hostHelper: 'SMTP 服务器地址例如: smtp.qq.com',
portHelper: 'SSL 通常为465TLS 通常为587无加密方式通常为25',
sslHelper: '如果 SMTP 端口是 465通常需要启用 SSL',
tlsHelper: '如果 SMTP 端口是 587通常需要启用 TLS',
none: '无',
},
theme: {
lingXiaGold: '凌霞金',

View file

@ -12,25 +12,47 @@
<el-col :span="22">
<el-form-item :label="$t('xpack.alert.displayName')" prop="displayName">
<el-input v-model="form.config.displayName" />
<span class="input-help">
{{ $t('xpack.alert.displayNameHelper') }}
</span>
</el-form-item>
<el-form-item :label="$t('xpack.alert.sender')" prop="sender">
<el-input v-model="form.config.sender" />
<span class="input-help">
{{ $t('xpack.alert.senderHelper') }}
</span>
</el-form-item>
<el-form-item :label="$t('xpack.alert.password')" prop="password">
<el-input v-model="form.config.password" type="password" show-password />
<span class="input-help">
{{ $t('xpack.alert.passwordHelper') }}
</span>
</el-form-item>
<el-form-item :label="$t('xpack.alert.host')" prop="host">
<el-input v-model="form.config.host" />
<el-input v-model="form.config.host" placeholder="smtp.qq.com" />
<span class="input-help">
{{ $t('xpack.alert.hostHelper') }}
</span>
</el-form-item>
<el-form-item :label="$t('xpack.alert.port')" prop="port">
<el-input v-model="form.config.port" :min="1" :max="65535" />
<span class="input-help">
{{ $t('xpack.alert.portHelper') }}
</span>
</el-form-item>
<el-form-item :label="$t('xpack.alert.encryption')" prop="encryption">
<el-select v-model="form.config.encryption" :placeholder="$t('commons.rule.requiredSelect')">
<el-option label="SSL" value="SSL" />
<el-option label="TLS" value="TLS" />
<el-option label="NONE" value="NONE" />
<el-option :label="$t('xpack.alert.none')" value="NONE" />
</el-select>
<span class="input-help">
{{
form.config.encryption == 'SSL'
? $t('xpack.alert.sslHelper')
: $t('xpack.alert.tlsHelper')
}}
</span>
</el-form-item>
<el-form-item :label="$t('xpack.alert.recipient')" prop="recipient">
<el-input v-model="form.config.recipient" />
@ -66,7 +88,6 @@ const emit = defineEmits<{ (e: 'search'): void }>();
const rules = {
displayName: [Rules.requiredInput],
sender: [Rules.requiredInput],
password: [Rules.requiredInput],
host: [Rules.requiredInput],
port: [Rules.requiredInput],
recipient: [Rules.requiredInput],

View file

@ -4,7 +4,9 @@
<template #title>
<div class="flex items-center justify-between">
<span>{{ $t('xpack.alert.commonConfig') }}</span>
<el-button plain icon="Edit" @click="onChangeCommon(commonConfig.id)" />
<el-button plain round size="default" @click="onChangeCommon(commonConfig.id)">
{{ $t('commons.button.edit') }}
</el-button>
</div>
</template>
<template #main>
@ -50,16 +52,22 @@
<div>
<el-button
plain
icon="Edit"
round
size="default"
:disabled="!emailConfig.id"
@click="onChangeEmail(emailConfig.id)"
/>
>
{{ $t('commons.button.edit') }}
</el-button>
<el-button
size="default"
plain
icon="Delete"
round
:disabled="!emailConfig.id"
@click="onDelete(emailConfig.id)"
/>
>
{{ $t('commons.button.delete') }}
</el-button>
</div>
</div>
<div class="text-sm mb-2">{{ $t('xpack.alert.emailConfigHelper') }}</div>
@ -94,7 +102,9 @@
<div class="flex items-center justify-between mb-2">
<div class="text-lg font-semibold">{{ $t('xpack.alert.smsConfig') }}</div>
<div>
<el-button plain icon="Edit" @click="onChangePhone(smsConfig.id)" />
<el-button plain round @click="onChangePhone(smsConfig.id)">
{{ $t('commons.button.edit') }}
</el-button>
</div>
</div>
<div class="text-sm mb-2">{{ $t('xpack.alert.smsConfigHelper') }}</div>
@ -165,8 +175,8 @@ const defaultEmailConfig: EmailConfig = {
sender: '',
password: '',
host: '',
port: 465,
encryption: 'SSL',
port: 25,
encryption: 'NONE',
status: '',
recipient: '',
},
@ -193,11 +203,11 @@ const defaultCommonConfig: CommonConfig = {
alertDailyNum: 50,
alertSendTimeRange:
i18n.global.t('xpack.alert.noticeAlert') +
':' +
': ' +
'08:00:00 - 23:59:59' +
' | ' +
i18n.global.t('xpack.alert.resourceAlert') +
':' +
': ' +
'00:00:00 - 23:59:59',
isOffline: 'Disable',
},
@ -280,11 +290,11 @@ const search = async () => {
const resourceTimeRange = sendTimeRangeValue.value.resourceAlert.sendTimeRange || '00:00:00 - 23:59:59';
sendTimeRange.value =
i18n.global.t('xpack.alert.noticeAlert') +
':' +
': ' +
noticeTimeRange +
' | ' +
i18n.global.t('xpack.alert.resourceAlert') +
':' +
': ' +
resourceTimeRange;
isInitialized.value = true;
} finally {