File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
pkg/monitor/alerting/notifiers Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -64,16 +64,16 @@ func generateMonitorTitle(suffix string, data interface{}) string {
6464 var level string
6565 if suffix == "cn" {
6666 level = "普通"
67- if priority == "important" {
67+ if priority == string ( notify . NotifyPriorityImportant ) {
6868 level = "重要"
69- } else if priority == "critical" {
69+ } else if priority == string ( notify . NotifyPriorityCritical ) {
7070 level = "致命"
7171 }
7272 } else {
7373 level = "Normal"
74- if priority == "important" {
74+ if priority == string ( notify . NotifyPriorityImportant ) {
7575 level = "Important"
76- } else if priority == "critical" {
76+ } else if priority == string ( notify . NotifyPriorityCritical ) {
7777 level = "Critical"
7878 }
7979 }
@@ -219,10 +219,10 @@ func getNotifyTemplateConfigOfLang(ctx *alerting.EvalContext,
219219 priority = notify .NotifyPriorityNormal
220220 case "important" :
221221 priority = notify .NotifyPriorityImportant
222- level = levelNormal
222+ level = levelImportant
223223 case "fatal" , "critical" :
224224 priority = notify .NotifyPriorityCritical
225- level = levelNormal
225+ level = levelCritial
226226 }
227227 topic := fmt .Sprintf ("[%s]" , trans (level ))
228228
You can’t perform that action at this time.
0 commit comments