mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
minor fixes based on code review
This commit is contained in:
@@ -70,11 +70,11 @@ func (c *EvalContext) GetStateModel() *StateDescription {
|
|||||||
}
|
}
|
||||||
case m.AlertStateUnknown:
|
case m.AlertStateUnknown:
|
||||||
return &StateDescription{
|
return &StateDescription{
|
||||||
Color: "888888",
|
Color: "#888888",
|
||||||
Text: "Unknown",
|
Text: "Unknown",
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
panic("Unknown rule state for alert notifications " + c.Rule.State)
|
panic("Unknown rule state for alert " + c.Rule.State)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ func updateAlerts(existingAlerts []*m.Alert, cmd *m.SaveAlertsCommand, sess *DBS
|
|||||||
if alertToUpdate.ContainsUpdates(alert) {
|
if alertToUpdate.ContainsUpdates(alert) {
|
||||||
alert.Updated = timeNow()
|
alert.Updated = timeNow()
|
||||||
alert.State = alertToUpdate.State
|
alert.State = alertToUpdate.State
|
||||||
sess.MustCols("message", "debounce_duration")
|
sess.MustCols("message", "for")
|
||||||
|
|
||||||
_, err := sess.ID(alert.Id).Update(alert)
|
_, err := sess.ID(alert.Id).Update(alert)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user