mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 11:52:13 +08:00
Alerting: Add threshold expression (#55102)
This commit is contained in:
@ -289,6 +289,8 @@ const (
|
||||
TypeResample
|
||||
// TypeClassicConditions is the CMDType for the classic condition operation.
|
||||
TypeClassicConditions
|
||||
// TypeThreshold is the CMDType for checking if a threshold has been crossed
|
||||
TypeThreshold
|
||||
)
|
||||
|
||||
func (gt CommandType) String() string {
|
||||
@ -317,6 +319,8 @@ func ParseCommandType(s string) (CommandType, error) {
|
||||
return TypeResample, nil
|
||||
case "classic_conditions":
|
||||
return TypeClassicConditions, nil
|
||||
case "threshold":
|
||||
return TypeThreshold, nil
|
||||
default:
|
||||
return TypeUnknown, fmt.Errorf("'%v' is not a recognized expression type", s)
|
||||
}
|
||||
|
Reference in New Issue
Block a user