refactor(alerting): refactoring PR for OR conditions, #6579

This commit is contained in:
Torkel Ödegaard
2016-11-17 15:48:15 +01:00
parent 457ae74343
commit 62e8a039a1
8 changed files with 32 additions and 30 deletions
+2 -2
View File
@@ -119,8 +119,8 @@ func AlertTest(c *middleware.Context, dto dtos.AlertTestCommand) Response {
res := backendCmd.Result
dtoRes := &dtos.AlertTestResult{
Firing: res.Firing,
FiringEval: res.FiringEval,
Firing: res.Firing,
ConditionEvals: res.ConditionEvals,
}
if res.Error != nil {
+6 -6
View File
@@ -35,12 +35,12 @@ type AlertTestCommand struct {
}
type AlertTestResult struct {
Firing bool `json:"firing"`
FiringEval string `json:"firingEvaluation"`
TimeMs string `json:"timeMs"`
Error string `json:"error,omitempty"`
EvalMatches []*EvalMatch `json:"matches,omitempty"`
Logs []*AlertTestResultLog `json:"logs,omitempty"`
Firing bool `json:"firing"`
ConditionEvals string `json:"conditionEvals"`
TimeMs string `json:"timeMs"`
Error string `json:"error,omitempty"`
EvalMatches []*EvalMatch `json:"matches,omitempty"`
Logs []*AlertTestResultLog `json:"logs,omitempty"`
}
type AlertTestResultLog struct {