Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
d7f11c30
Commit
d7f11c30
authored
Nov 07, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tech(alerting): set prev state when creating eval context
parent
489f087f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
2 deletions
+1
-2
pkg/services/alerting/eval_context.go
+1
-0
pkg/services/alerting/result_handler.go
+0
-2
No files found.
pkg/services/alerting/eval_context.go
View file @
d7f11c30
...
@@ -39,6 +39,7 @@ func NewEvalContext(alertCtx context.Context, rule *Rule) *EvalContext {
...
@@ -39,6 +39,7 @@ func NewEvalContext(alertCtx context.Context, rule *Rule) *EvalContext {
Logs
:
make
([]
*
ResultLogEntry
,
0
),
Logs
:
make
([]
*
ResultLogEntry
,
0
),
EvalMatches
:
make
([]
*
EvalMatch
,
0
),
EvalMatches
:
make
([]
*
EvalMatch
,
0
),
log
:
log
.
New
(
"alerting.evalContext"
),
log
:
log
.
New
(
"alerting.evalContext"
),
PrevAlertState
:
rule
.
State
,
}
}
}
}
...
...
pkg/services/alerting/result_handler.go
View file @
d7f11c30
...
@@ -59,8 +59,6 @@ func (handler *DefaultResultHandler) GetStateFromEvaluation(evalContext *EvalCon
...
@@ -59,8 +59,6 @@ func (handler *DefaultResultHandler) GetStateFromEvaluation(evalContext *EvalCon
}
}
func
(
handler
*
DefaultResultHandler
)
Handle
(
evalContext
*
EvalContext
)
error
{
func
(
handler
*
DefaultResultHandler
)
Handle
(
evalContext
*
EvalContext
)
error
{
evalContext
.
PrevAlertState
=
evalContext
.
Rule
.
State
executionError
:=
""
executionError
:=
""
annotationData
:=
simplejson
.
New
()
annotationData
:=
simplejson
.
New
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment