fix: alertRuleBox type 为 SNMP trap时Evaluation interval 为空
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
<!--type-->
|
<!--type-->
|
||||||
<el-form-item :label="$t('overall.type')" prop="type" class="half-form-item">
|
<el-form-item :label="$t('overall.type')" prop="type" class="half-form-item">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="editAlertRule.type"
|
v-model="fromData.status"
|
||||||
class="right-box__select"
|
class="right-box__select"
|
||||||
popper-class="right-box-select-dropdown prevent-clickoutside"
|
popper-class="right-box-select-dropdown prevent-clickoutside"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -246,6 +246,7 @@
|
|||||||
:popper-append-to-body="false"
|
:popper-append-to-body="false"
|
||||||
popper-class="prevent-clickoutside"
|
popper-class="prevent-clickoutside"
|
||||||
size="small"
|
size="small"
|
||||||
|
@change="receiverAndNotifyValidate"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
:label="$t('dashboard.panel.chartForm.lockList.on')"
|
:label="$t('dashboard.panel.chartForm.lockList.on')"
|
||||||
@@ -267,6 +268,7 @@
|
|||||||
:popper-append-to-body="false"
|
:popper-append-to-body="false"
|
||||||
popper-class="prevent-clickoutside"
|
popper-class="prevent-clickoutside"
|
||||||
size="small"
|
size="small"
|
||||||
|
@change="receiverAndNotifyValidate"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
:label="$t('dashboard.panel.chartForm.lockList.on')"
|
:label="$t('dashboard.panel.chartForm.lockList.on')"
|
||||||
@@ -574,6 +576,12 @@ export default {
|
|||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
receiverAndNotifyValidate () {
|
||||||
|
if (!this.editAlertRule.notifyExpired && !this.editAlertRule.notifyActive) {
|
||||||
|
this.$refs.alertRuleForm.clearValidate('receiver')
|
||||||
|
this.$refs.alertRuleForm.clearValidate('method')
|
||||||
|
}
|
||||||
|
},
|
||||||
selectAlertRuleMetric (val) {
|
selectAlertRuleMetric (val) {
|
||||||
if (val === 'Metrics') {
|
if (val === 'Metrics') {
|
||||||
this.MetricsType = 1 // type = 1
|
this.MetricsType = 1 // type = 1
|
||||||
@@ -587,6 +595,7 @@ export default {
|
|||||||
this.$refs.alertRuleForm.clearValidate('expr') // 移除from表单的 expr 验证
|
this.$refs.alertRuleForm.clearValidate('expr') // 移除from表单的 expr 验证
|
||||||
} else if (val === 'SNMP trap') {
|
} else if (val === 'SNMP trap') {
|
||||||
this.showSnmpTrap = false // showSnmpTrap 为 false 时,展示 OID
|
this.showSnmpTrap = false // showSnmpTrap 为 false 时,展示 OID
|
||||||
|
this.editAlertRule.inr = ''
|
||||||
this.MetricsType = 3 // type = 3
|
this.MetricsType = 3 // type = 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -621,6 +630,7 @@ export default {
|
|||||||
this.fromData.status = 'SNMP trap'
|
this.fromData.status = 'SNMP trap'
|
||||||
this.showSnmpTrap = false // showSnmpTrap 为 false 时,展示 OID
|
this.showSnmpTrap = false // showSnmpTrap 为 false 时,展示 OID
|
||||||
this.MetricsType = 3 // 默认保存 type
|
this.MetricsType = 3 // 默认保存 type
|
||||||
|
this.editAlertRule.inr = ''
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user