add cluster field when import builtin alerts
This commit is contained in:
parent
929c970b42
commit
4c22284ca7
|
@ -39,6 +39,7 @@ func alertRuleBuiltinList(c *gin.Context) {
|
||||||
|
|
||||||
type alertRuleBuiltinImportForm struct {
|
type alertRuleBuiltinImportForm struct {
|
||||||
Name string `json:"name" binding:"required"`
|
Name string `json:"name" binding:"required"`
|
||||||
|
Cluster string `json:"cluster" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func alertRuleBuiltinImport(c *gin.Context) {
|
func alertRuleBuiltinImport(c *gin.Context) {
|
||||||
|
@ -70,6 +71,7 @@ func alertRuleBuiltinImport(c *gin.Context) {
|
||||||
reterr := make(map[string]string)
|
reterr := make(map[string]string)
|
||||||
for i := 0; i < count; i++ {
|
for i := 0; i < count; i++ {
|
||||||
lst[i].Id = 0
|
lst[i].Id = 0
|
||||||
|
lst[i].Cluster = f.Cluster
|
||||||
lst[i].GroupId = bgid
|
lst[i].GroupId = bgid
|
||||||
lst[i].CreateBy = username
|
lst[i].CreateBy = username
|
||||||
lst[i].UpdateBy = username
|
lst[i].UpdateBy = username
|
||||||
|
|
Loading…
Reference in New Issue