fix message "empty scenario"
This commit is contained in:
parent
90c38db9f2
commit
76ea3a063f
|
@ -64,17 +64,16 @@ func formatAlertAsString(machineId string, alert *models.Alert) []string {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
reason := ""
|
|
||||||
msg := ""
|
msg := ""
|
||||||
if alert.Scenario != nil && *alert.Scenario != "" {
|
if alert.Scenario != nil && *alert.Scenario != "" {
|
||||||
msg = *alert.Scenario
|
msg = *alert.Scenario
|
||||||
} else if alert.Message != nil && *alert.Message != "" {
|
} else if alert.Message != nil && *alert.Message != "" {
|
||||||
msg = *alert.Message
|
msg = *alert.Message
|
||||||
} else {
|
} 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 {
|
if len(alert.Decisions) > 0 {
|
||||||
for i, decisionItem := range alert.Decisions {
|
for i, decisionItem := range alert.Decisions {
|
||||||
|
|
Loading…
Reference in a new issue