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
09cdf3e9
Commit
09cdf3e9
authored
Aug 18, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(alerting): show execution errors in alert list
parent
5cf97118
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
pkg/models/alert.go
+1
-1
pkg/services/alerting/result_handler.go
+1
-1
public/app/features/alerting/alert_def.ts
+8
-0
public/app/features/alerting/partials/alert_list.html
+2
-3
No files found.
pkg/models/alert.go
View file @
09cdf3e9
...
...
@@ -11,7 +11,7 @@ type AlertSeverityType string
const
(
AlertStatePending
AlertStateType
=
"pending"
AlertStateExeuctionError
AlertStateType
=
"exe
uc
tion_error"
AlertStateExeuctionError
AlertStateType
=
"exe
cu
tion_error"
AlertStatePaused
AlertStateType
=
"paused"
AlertStateCritical
AlertStateType
=
"critical"
AlertStateWarning
AlertStateType
=
"warning"
...
...
pkg/services/alerting/result_handler.go
View file @
09cdf3e9
...
...
@@ -29,7 +29,7 @@ func NewResultHandler() *DefaultResultHandler {
func
(
handler
*
DefaultResultHandler
)
Handle
(
ctx
*
EvalContext
)
{
oldState
:=
ctx
.
Rule
.
State
exeuctionError
:=
"
"
exeuctionError
:=
""
if
ctx
.
Error
!=
nil
{
handler
.
log
.
Error
(
"Alert Rule Result Error"
,
"ruleId"
,
ctx
.
Rule
.
Id
,
"error"
,
ctx
.
Error
)
ctx
.
Rule
.
State
=
m
.
AlertStateExeuctionError
...
...
public/app/features/alerting/alert_def.ts
View file @
09cdf3e9
...
...
@@ -76,6 +76,14 @@ function getStateDisplayModel(state) {
stateClass
:
'alert-state-warning'
};
}
case
'execution_error'
:
{
return
{
text
:
'EXECUTION ERROR'
,
iconClass
:
'icon-gf icon-gf-critical'
,
stateClass
:
'alert-state-critical'
};
}
case
'paused'
:
{
return
{
text
:
'paused'
,
...
...
public/app/features/alerting/partials/alert_list.html
View file @
09cdf3e9
...
...
@@ -33,9 +33,6 @@
<i
class=
"icon-gf icon-gf-settings"
></i>
</a>
</div>
<div
class=
"card-item-notice"
ng-show=
"alert.executionError"
>
<span>
Execution Error
</span>
</div>
</div>
<div
class=
"card-item-body"
>
<div
class=
"card-item-details"
>
...
...
@@ -50,6 +47,8 @@
{{alert.stateModel.text}}
</span>
for {{alert.newStateDateAgo}}
</div>
<div
class=
"small muted"
ng-show=
"alert.executionError"
>
{{alert.executionError}}
</div>
</div>
</div>
...
...
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