mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-10 07:26:35 +08:00
fix: Improve alert notifications (#9591)
This commit is contained in:
parent
117faa952e
commit
9fde8c447d
4 changed files with 4 additions and 12 deletions
|
@ -48,6 +48,7 @@ func (u *CronjobService) HandleJob(cronjob *model.Cronjob) {
|
||||||
global.LOG.Debugf("preper to handle cron job [%s] %s failed, err: %v", cronjob.Type, cronjob.Name, err)
|
global.LOG.Debugf("preper to handle cron job [%s] %s failed, err: %v", cronjob.Type, cronjob.Name, err)
|
||||||
record.TaskID = ""
|
record.TaskID = ""
|
||||||
cronjobRepo.EndRecords(record, constant.StatusFailed, err.Error(), record.Records)
|
cronjobRepo.EndRecords(record, constant.StatusFailed, err.Error(), record.Records)
|
||||||
|
handleCronJobAlert(cronjob)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err := taskItem.Execute(); err != nil {
|
if err := taskItem.Execute(); err != nil {
|
||||||
|
|
|
@ -288,10 +288,6 @@
|
||||||
<el-select class="selectClass" v-model="dialogData.rowData!.sendMethod" multiple cleanable>
|
<el-select class="selectClass" v-model="dialogData.rowData!.sendMethod" multiple cleanable>
|
||||||
<el-option value="mail" :label="$t('xpack.alert.mail')" />
|
<el-option value="mail" :label="$t('xpack.alert.mail')" />
|
||||||
<el-option value="sms" :label="$t('xpack.alert.sms')" />
|
<el-option value="sms" :label="$t('xpack.alert.sms')" />
|
||||||
<el-option value="wechat" disabled :label="$t('xpack.alert.wechat')" />
|
|
||||||
<el-option value="weCom" disabled :label="$t('xpack.alert.weCom')" />
|
|
||||||
<el-option value="dingTalk" disabled :label="$t('xpack.alert.dingTalk')" />
|
|
||||||
<el-option value="feiShu" disabled :label="$t('xpack.alert.feiShu')" />
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<span class="input-help">
|
<span class="input-help">
|
||||||
|
|
|
@ -36,30 +36,25 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('xpack.alert.port')" prop="port">
|
<el-form-item :label="$t('xpack.alert.port')" prop="port">
|
||||||
<el-input v-model.number="form.config.port" :min="1" :max="65535" />
|
<el-input v-model.number="form.config.port" :min="1" :max="65535" />
|
||||||
<span class="input-help">
|
|
||||||
{{ $t('xpack.alert.portHelper') }}
|
|
||||||
</span>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('xpack.alert.encryption')" prop="encryption">
|
<el-form-item :label="$t('xpack.alert.encryption')" prop="encryption">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<span>SSL</span>
|
<span class="el-form-item__label">SSL</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="form.config.encryption"
|
v-model="form.config.encryption"
|
||||||
:active-value="'SSL'"
|
:active-value="'SSL'"
|
||||||
:inactive-value="form.config.encryption === 'SSL' ? 'NONE' : form.config.encryption"
|
:inactive-value="form.config.encryption === 'SSL' ? 'NONE' : form.config.encryption"
|
||||||
@change="handleEncryptionSwitch('SSL')"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span class="input-help">
|
<span class="input-help">
|
||||||
{{ $t('xpack.alert.sslHelper') }}
|
{{ $t('xpack.alert.sslHelper') }}
|
||||||
</span>
|
</span>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<span>TLS</span>
|
<span class="el-form-item__label">TLS</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="form.config.encryption"
|
v-model="form.config.encryption"
|
||||||
:active-value="'TLS'"
|
:active-value="'TLS'"
|
||||||
:inactive-value="form.config.encryption === 'TLS' ? 'NONE' : form.config.encryption"
|
:inactive-value="form.config.encryption === 'TLS' ? 'NONE' : form.config.encryption"
|
||||||
@change="handleEncryptionSwitch('TLS')"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span class="input-help">
|
<span class="input-help">
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-alert>
|
</el-alert>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="rounded-2xl shadow hover:shadow-md transition-all">
|
<el-card class="rounded-2xl shadow hover:shadow-md transition-all" v-if="globalStore.isProductPro">
|
||||||
<div class="flex items-center justify-between mb-2">
|
<div class="flex items-center justify-between mb-2">
|
||||||
<div class="text-lg font-semibold">{{ $t('xpack.alert.smsConfig') }}</div>
|
<div class="text-lg font-semibold">{{ $t('xpack.alert.smsConfig') }}</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue