Add missing option "OK" for Error state (#45262)
* Add missing OK option to models * add ok to legacy legacy UI does not support it but it is possible to do so via provisioning. * use enums in migration so linter would catch missing cases
This commit is contained in:
+2
-1
@@ -28,6 +28,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
ExecutionErrorSetOk ExecutionErrorOption = "ok"
|
||||
ExecutionErrorSetAlerting ExecutionErrorOption = "alerting"
|
||||
ExecutionErrorKeepState ExecutionErrorOption = "keep_state"
|
||||
)
|
||||
@@ -55,7 +56,7 @@ func (s NoDataOption) ToAlertState() AlertStateType {
|
||||
}
|
||||
|
||||
func (s ExecutionErrorOption) IsValid() bool {
|
||||
return s == ExecutionErrorSetAlerting || s == ExecutionErrorKeepState
|
||||
return s == ExecutionErrorSetAlerting || s == ExecutionErrorKeepState || s == ExecutionErrorSetOk
|
||||
}
|
||||
|
||||
func (s ExecutionErrorOption) ToAlertState() AlertStateType {
|
||||
|
||||
Reference in New Issue
Block a user