NEZ-993 fix:修复 Alert--Alert rule--New alert rule页面,Type选择logs,然后Type选择Metrics,Expression没有变回Metric

This commit is contained in:
zhangyu
2021-09-14 10:00:58 +08:00
parent af0388c2b5
commit 9590596aef

View File

@@ -606,6 +606,7 @@ export default {
}
if (val === 1) {
this.showSnmpTrap = true // showSnmpTrap 为 true 时显示 expr,threshold,unit
this.showMetrics = true
this.$refs.alertRuleForm.clearValidate('expr') // 移除from表单的 expr 验证
} else if (val === 2) {
this.showMetrics = false // showMetrics 为 false 时,展示 Logs label
@@ -613,6 +614,7 @@ export default {
this.$refs.alertRuleForm.clearValidate('expr') // 移除from表单的 expr 验证
} else if (val === 3) {
this.showSnmpTrap = false // showSnmpTrap 为 false 时,展示 OID
this.showMetrics = false
this.editAlertRule.inr = ''
this.editAlertRule.last = ''
this.editAlertRule.unit = 0