fix message "empty scenario"
This commit is contained in:
parent
90c38db9f2
commit
76ea3a063f
1 changed files with 2 additions and 3 deletions
|
@ -64,17 +64,16 @@ func formatAlertAsString(machineId string, alert *models.Alert) []string {
|
|||
}
|
||||
|
||||
/**/
|
||||
reason := ""
|
||||
msg := ""
|
||||
if alert.Scenario != nil && *alert.Scenario != "" {
|
||||
msg = *alert.Scenario
|
||||
} else if alert.Message != nil && *alert.Message != "" {
|
||||
msg = *alert.Message
|
||||
} else {
|
||||
msg = fmt.Sprintf("empty scenario by %s", src)
|
||||
msg = "empty scenario"
|
||||
}
|
||||
|
||||
reason = fmt.Sprintf("%s by %s", msg, src)
|
||||
reason := fmt.Sprintf("%s by %s", msg, src)
|
||||
|
||||
if len(alert.Decisions) > 0 {
|
||||
for i, decisionItem := range alert.Decisions {
|
||||
|
|
Loading…
Add table
Reference in a new issue