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
fe4a0a98
Commit
fe4a0a98
authored
Sep 30, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(alerting): added confirm modal in UI, when deleting alert
parent
24a25453
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
pkg/services/alerting/engine.go
+0
-1
public/app/features/alerting/alert_tab_ctrl.ts
+15
-4
No files found.
pkg/services/alerting/engine.go
View file @
fe4a0a98
...
...
@@ -144,7 +144,6 @@ func (e *Engine) handleResponse(result *EvalContext) {
}
}()
e
.
log
.
Info
(
"rule"
,
"nil"
,
result
.
Rule
==
nil
)
e
.
log
.
Debug
(
"Alert Rule Result"
,
"ruleId"
,
result
.
Rule
.
Id
,
"firing"
,
result
.
Firing
)
e
.
resultHandler
.
Handle
(
result
)
}
public/app/features/alerting/alert_tab_ctrl.ts
View file @
fe4a0a98
...
...
@@ -6,6 +6,7 @@ import {QueryPart} from 'app/core/components/query_part/query_part';
import
alertDef
from
'./alert_def'
;
import
config
from
'app/core/config'
;
import
moment
from
'moment'
;
import
appEvents
from
'app/core/app_events'
;
export
class
AlertTabCtrl
{
panel
:
any
;
...
...
@@ -302,10 +303,20 @@ export class AlertTabCtrl {
}
delete
()
{
this
.
alert
=
this
.
panel
.
alert
=
{
enabled
:
false
};
this
.
panel
.
thresholds
=
[];
this
.
conditionModels
=
[];
this
.
panelCtrl
.
render
();
appEvents
.
emit
(
'confirm-modal'
,
{
title
:
'Delete Alert'
,
text
:
'Are you sure you want to delete this alert rule?'
,
text2
:
'You need to save dashboard for the delete to take effect'
,
icon
:
'fa-trash'
,
yesText
:
'Delete'
,
onConfirm
:
()
=>
{
this
.
alert
=
this
.
panel
.
alert
=
{
enabled
:
false
};
this
.
panel
.
thresholds
=
[];
this
.
conditionModels
=
[];
this
.
panelCtrl
.
render
();
}
});
}
enable
()
{
...
...
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