Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-operation-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-operation-api
Commits
7bb305b3
Commit
7bb305b3
authored
Jul 07, 2023
by
李科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 预警列表字段
parent
545ab8a7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
24 deletions
+28
-24
src/bean/entity/alert_list.go
src/bean/entity/alert_list.go
+25
-24
src/service/alert_list.go
src/service/alert_list.go
+3
-0
No files found.
src/bean/entity/alert_list.go
View file @
7bb305b3
...
...
@@ -15,7 +15,8 @@ type AlertList struct {
ClassName
string
`json:"class_name" xorm:"class_name"`
// 预警对象名称 TODO 该字段做关联存储或查询
MetricConfigId
string
`json:"metric_config_id"`
// 预警指标id // 预警指标
MetricConfigName
string
`json:"metric_config_name" xorm:"metric_config_name"`
// 预警指标名称
AlertRuleType
string
`json:"alert_rule_type" xorm:"alert_rule_type"`
// 预警规则类型 TODO 该字段做关联存储或查询
AlertRuleType
string
`json:"alert_rule_type" xorm:"alert_rule_type"`
// 预警规则类型id TODO 该字段做关联存储或查询
AlertRuleTypeName
string
`json:"alert_rule_type_name" xorm:"alert_rule_type_name"`
// 预警规则类型名称 TODO 该字段做关联存储或查询
CurrentValue
float64
`json:"current_value"`
// 当前报警值
AlertCondition
string
`json:"alert_condition" xorm:"'alert_condition'"`
// 预警规则(预警阈值) 字典值
NotificationCount
int
`json:"notification_count"`
// 通知人数
...
...
src/service/alert_list.go
View file @
7bb305b3
...
...
@@ -60,6 +60,7 @@ func (a *AlertListSvc) GetDataById(req request.DetailAlertList) (resp response.A
MetricConfigId
:
"d773b37b-dbb4-4a7b-be11-ab40f8acc00e"
,
MetricConfigName
:
"CPU负载过高"
,
AlertRuleType
:
"51a2cc1e-eb24-4b16-b106-3dc9db963a49"
,
AlertRuleTypeName
:
"%"
,
CurrentValue
:
85
,
NotificationCount
:
3
,
PushCount
:
3
,
...
...
@@ -97,6 +98,7 @@ func (a *AlertListSvc) List(req request.ListAlertList) (resp response.AlertListL
MetricConfigId
:
"d773b37b-dbb4-4a7b-be11-ab40f8acc00e"
,
MetricConfigName
:
"磁盘空间不足"
,
AlertRuleType
:
"51a2cc1e-eb24-4b16-b106-3dc9db963a49"
,
AlertRuleTypeName
:
"%"
,
CurrentValue
:
85
,
NotificationCount
:
3
,
PushCount
:
3
,
...
...
@@ -128,6 +130,7 @@ func (a *AlertListSvc) List(req request.ListAlertList) (resp response.AlertListL
MetricConfigId
:
"d773b37b-dbb4-4a7b-be11-ab40f8acc00e"
,
MetricConfigName
:
"响应时间超时"
,
AlertRuleType
:
"51a2cc1e-eb24-4b16-b106-3dc9db963a49"
,
AlertRuleTypeName
:
"%"
,
CurrentValue
:
85
,
NotificationCount
:
1
,
PushCount
:
1
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment