fix dashboard name (#911)

This commit is contained in:
zheng 2022-04-13 21:34:25 +08:00 committed by GitHub
parent ee8c367933
commit 42a6be95e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ func alertRuleBuiltinList(c *gin.Context) {
continue
}
name := strings.TrimRight(f, ".json")
name := strings.TrimSuffix(f, ".json")
names = append(names, name)
}
@ -103,7 +103,7 @@ func dashboardBuiltinList(c *gin.Context) {
continue
}
name := strings.TrimRight(f, ".json")
name := strings.TrimSuffix(f, ".json")
names = append(names, name)
}