Commit f570d1c3 authored by 李科's avatar 李科

feat: 指标配置时间筛选

parent c65ba6a3
...@@ -18,7 +18,7 @@ type AlertRules struct { ...@@ -18,7 +18,7 @@ type AlertRules struct {
NotifyRecipients string `json:"notify_recipients" xorm:"notify_recipients"` // 预警推送用户 NotifyRecipients string `json:"notify_recipients" xorm:"notify_recipients"` // 预警推送用户
NotifyPushCount int `json:"notify_push_count" xorm:"'notify_push_count'"` // 消息推送次数 NotifyPushCount int `json:"notify_push_count" xorm:"'notify_push_count'"` // 消息推送次数
NotifyPushFrequency int `json:"notify_push_frequency" xorm:"'notify_push_frequency'"` // 消息推送频率 分钟 NotifyPushFrequency int `json:"notify_push_frequency" xorm:"'notify_push_frequency'"` // 消息推送频率 分钟
IsEnabled int `json:"is_enabled" xorm:"'is_enabled'"` // 是否开启 0:关闭 1:启动 IsEnabled int `json:"is_enabled" xorm:"'is_enabled'"` // 是否开启 1:是 2:否
CreatedBy string `json:"created_by" xorm:"'created_by'"` // 创建人 CreatedBy string `json:"created_by" xorm:"'created_by'"` // 创建人
CreatedAt jsontime.Time `json:"created_at" xorm:"'created_at'"` // 创建时间 CreatedAt jsontime.Time `json:"created_at" xorm:"'created_at'"` // 创建时间
UpdatedBy string `json:"updated_by" xorm:"'updated_by'"` // 更新人 UpdatedBy string `json:"updated_by" xorm:"'updated_by'"` // 更新人
......
...@@ -11,7 +11,7 @@ type MetricConfig struct { ...@@ -11,7 +11,7 @@ type MetricConfig struct {
Duration int `json:"duration" xorm:"'duration'"` // 持续时间 Duration int `json:"duration" xorm:"'duration'"` // 持续时间
DurationUnit string `json:"duration_unit" xorm:"'duration_unit'"` // 持续时间单位 s m h DurationUnit string `json:"duration_unit" xorm:"'duration_unit'"` // 持续时间单位 s m h
CheckPeriod int `json:"check_period" xorm:"'check_period'"` // 检查周期 单位:分钟 CheckPeriod int `json:"check_period" xorm:"'check_period'"` // 检查周期 单位:分钟
IsEnabled int `json:"is_enabled" xorm:"'is_enabled'"` // 是否开启 0:关闭 1:启动 IsEnabled int `json:"is_enabled" xorm:"'is_enabled'"` // 是否开启 1:是 2:否
AlertRuleType string `json:"alert_rule_type" xorm:"'alert_rule_type'"` // 预警规则类型 关联字典表 AlertRuleType string `json:"alert_rule_type" xorm:"'alert_rule_type'"` // 预警规则类型 关联字典表
SourceFrom int `json:"source_from" xorm:"source_from"` // 数据来源 1:默认 2:自定义 SourceFrom int `json:"source_from" xorm:"source_from"` // 数据来源 1:默认 2:自定义
CreatedBy string `json:"created_by" xorm:"'created_by'"` // 创建人 CreatedBy string `json:"created_by" xorm:"'created_by'"` // 创建人
......
...@@ -39,11 +39,11 @@ type DetailMetricConfig struct { ...@@ -39,11 +39,11 @@ type DetailMetricConfig struct {
} }
type ListMetricConfig struct { type ListMetricConfig struct {
Id string `json:"id" form:"id"` Id string `json:"id" form:"id"` // 主键id
ClassId int `json:"class_id" form:"class_id"` ClassId int `json:"class_id" form:"class_id"` // 分类id
MetricName string `json:"metric_name" form:"metric_name"` MetricName string `json:"metric_name" form:"metric_name"` // 指标名称
IsEnabled int `json:"is_enabled" form:"is_enabled" binding:"omitempty,oneof=1 2"` IsEnabled int `json:"is_enabled" form:"is_enabled" binding:"omitempty,oneof=1 2"` // 是否开启 1:是 2:否
StartTime string `json:"start_time" form:"start_time" binding:"omitempty,datetime=2006-01-02 15:04:05"` StartTime string `json:"start_time" form:"start_time" binding:"omitempty,datetime=2006-01-02 15:04:05"` // 开始时间
EndTime string `json:"end_time" form:"end_time" binding:"omitempty,datetime=2006-01-02 15:04:05"` EndTime string `json:"end_time" form:"end_time" binding:"omitempty,datetime=2006-01-02 15:04:05"` // 结束时间
Pagination Pagination
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment