mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
fix: rule snapshot
This commit is contained in:
parent
d835aeb486
commit
1827963a8b
@ -19,7 +19,7 @@ type AlertRule struct {
|
|||||||
NotificationGroupID uint64 `json:"notification_group_id"` // 该报警规则所在的通知组
|
NotificationGroupID uint64 `json:"notification_group_id"` // 该报警规则所在的通知组
|
||||||
FailTriggerTasksRaw string `gorm:"default:'[]'" json:"-"`
|
FailTriggerTasksRaw string `gorm:"default:'[]'" json:"-"`
|
||||||
RecoverTriggerTasksRaw string `gorm:"default:'[]'" json:"-"`
|
RecoverTriggerTasksRaw string `gorm:"default:'[]'" json:"-"`
|
||||||
Rules []Rule `gorm:"-" json:"rules"`
|
Rules []*Rule `gorm:"-" json:"rules"`
|
||||||
FailTriggerTasks []uint64 `gorm:"-" json:"fail_trigger_tasks"` // 失败时执行的触发任务id
|
FailTriggerTasks []uint64 `gorm:"-" json:"fail_trigger_tasks"` // 失败时执行的触发任务id
|
||||||
RecoverTriggerTasks []uint64 `gorm:"-" json:"recover_trigger_tasks"` // 恢复时执行的触发任务id
|
RecoverTriggerTasks []uint64 `gorm:"-" json:"recover_trigger_tasks"` // 恢复时执行的触发任务id
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package model
|
|||||||
|
|
||||||
type AlertRuleForm struct {
|
type AlertRuleForm struct {
|
||||||
Name string `json:"name" minLength:"1"`
|
Name string `json:"name" minLength:"1"`
|
||||||
Rules []Rule `json:"rules"`
|
Rules []*Rule `json:"rules"`
|
||||||
FailTriggerTasks []uint64 `json:"fail_trigger_tasks"` // 失败时触发的任务id
|
FailTriggerTasks []uint64 `json:"fail_trigger_tasks"` // 失败时触发的任务id
|
||||||
RecoverTriggerTasks []uint64 `json:"recover_trigger_tasks"` // 恢复时触发的任务id
|
RecoverTriggerTasks []uint64 `json:"recover_trigger_tasks"` // 恢复时触发的任务id
|
||||||
NotificationGroupID uint64 `json:"notification_group_id"`
|
NotificationGroupID uint64 `json:"notification_group_id"`
|
||||||
|
Loading…
Reference in New Issue
Block a user