Skip to content

Commit 10ec47f

Browse files
committed
modify: meta of huawei cloud auditplan
1 parent 97ada7e commit 10ec47f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

sqle/server/auditplan/huawei_task.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (at *huaweiRdsMySQLTask) collectorDo() {
150150
at.logger.Warnf("huawei cloud secret access key is not configured")
151151
return
152152
}
153-
projectId := at.ap.Params.GetParam(paramProjectId).String()
153+
projectId := at.ap.Params.GetParam(paramKeyProjectId).String()
154154
if projectId == "" {
155155
at.logger.Warnf("huawei cloud project id is not configured")
156156
return
@@ -160,7 +160,7 @@ func (at *huaweiRdsMySQLTask) collectorDo() {
160160
at.logger.Warnf("huawei cloud instance id is not configured")
161161
return
162162
}
163-
region := at.ap.Params.GetParam(paramRegion).String()
163+
region := at.ap.Params.GetParam(paramKeyRegion).String()
164164
if region == "" {
165165
at.logger.Warnf("huawei cloud region is not configured")
166166
return

sqle/server/auditplan/meta.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ const (
5252
paramKeyAccessKeySecret = "access_key_secret"
5353
paramKeyRdsPath = "rds_path"
5454
paramKeyFirstSqlsScrappedInLastPeriodHours = "first_sqls_scrapped_in_last_period_hours"
55-
paramProjectId = "project_id"
56-
paramRegion = "region"
55+
paramKeyProjectId = "project_id"
56+
paramKeyRegion = "region"
5757
)
5858

5959
var Metas = []Meta{
@@ -282,7 +282,7 @@ var Metas = []Meta{
282282
CreateTask: NewHuaweiRdsMySQLSlowLogTask,
283283
Params: []*params.Param{
284284
{
285-
Key: paramProjectId,
285+
Key: paramKeyProjectId,
286286
Desc: "项目ID",
287287
Value: "",
288288
Type: params.ParamTypeString,
@@ -307,14 +307,14 @@ var Metas = []Meta{
307307
},
308308
{
309309
Key: paramKeyFirstSqlsScrappedInLastPeriodHours,
310-
Desc: "启动任务时拉取慢日志时间范围(单位:小时,最大30天)",
310+
Desc: "启动任务时拉取慢日志的时间范围(单位:小时,最大30天",
311311
Value: "",
312312
Type: params.ParamTypeInt,
313313
},
314314
{
315-
Key: paramRegion,
316-
Desc: "当前API开放的地区",
317-
Value: "ap-southeast-1",
315+
Key: paramKeyRegion,
316+
Desc: "当前RDS实例所在的地区(示例:cn-east-2)",
317+
Value: "",
318318
Type: params.ParamTypeString,
319319
},
320320
},

0 commit comments

Comments
 (0)