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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
13 deletions
+20
-13
pkg/models/alert.go
+1
-1
pkg/services/alerting/result_handler.go
+1
-1
public/app/features/alerting/alert_def.ts
+15
-7
public/app/features/alerting/partials/alert_list.html
+3
-4
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
...
...
@@ -61,28 +61,36 @@ function getStateDisplayModel(state) {
iconClass
:
'icon-gf icon-gf-critical'
,
stateClass
:
'alert-state-critical'
};
}
case
'warning'
:
{
}
case
'warning'
:
{
return
{
text
:
'WARNING'
,
iconClass
:
'icon-gf icon-gf-warning'
,
stateClass
:
'alert-state-warning'
};
}
case
'pending'
:
{
}
case
'pending'
:
{
return
{
text
:
'PENDING'
,
iconClass
:
"fa fa-question"
,
stateClass
:
'alert-state-warning'
};
}
case
'paused'
:
{
}
case
'execution_error'
:
{
return
{
text
:
'EXECUTION ERROR'
,
iconClass
:
'icon-gf icon-gf-critical'
,
stateClass
:
'alert-state-critical'
};
}
case
'paused'
:
{
return
{
text
:
'paused'
,
iconClass
:
"fa fa-pause"
,
stateClass
:
'alert-state-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"
>
...
...
@@ -49,7 +46,9 @@
<i
class=
"{{alert.stateModel.iconClass}}"
></i>
{{alert.stateModel.text}}
</span>
for {{alert.newStateDateAgo}}
</div>
</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