mirror of https://github.com/grafana/grafana
move eval_conditions to API models package (#51447)
parent
99f921cf32
commit
78c012df65
@ -1,16 +1,18 @@ |
||||
package models |
||||
package definitions |
||||
|
||||
import ( |
||||
"encoding/json" |
||||
"fmt" |
||||
"time" |
||||
|
||||
"github.com/grafana/grafana/pkg/services/ngalert/models" |
||||
) |
||||
|
||||
// EvalAlertConditionCommand is the command for evaluating a condition
|
||||
type EvalAlertConditionCommand struct { |
||||
Condition string `json:"condition"` |
||||
Data []AlertQuery `json:"data"` |
||||
Now time.Time `json:"now"` |
||||
Condition string `json:"condition"` |
||||
Data []models.AlertQuery `json:"data"` // TODO yuri. Create API model for AlertQuery
|
||||
Now time.Time `json:"now"` |
||||
} |
||||
|
||||
func (cmd *EvalAlertConditionCommand) UnmarshalJSON(b []byte) error { |
||||
Loading…
Reference in new issue