Commit 7490c49f by utkarshcmu

Alert un paused to pending state

parent d9f25199
......@@ -264,7 +264,7 @@ func PauseAlert(c *middleware.Context, dto dtos.PauseAlertCommand) Response {
return ApiError(500, "", err)
}
var response models.AlertStateType = models.AlertStateNoData
var response models.AlertStateType = models.AlertStatePending
pausedState := "un paused"
if cmd.Paused {
response = models.AlertStatePaused
......
......@@ -260,7 +260,7 @@ func PauseAlertRule(cmd *m.PauseAlertCommand) error {
if cmd.Paused {
newState = m.AlertStatePaused
} else {
newState = m.AlertStateNoData
newState = m.AlertStatePending
}
alert.State = newState
......
......@@ -87,6 +87,13 @@ function getStateDisplayModel(state) {
stateClass: 'alert-state-paused'
};
}
case 'pending': {
return {
text: 'PENDING',
iconClass: "fa fa-exclamation",
stateClass: 'alert-state-warning'
};
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment