From b58be91e7179df1b9d1a12c0b33eed4c0dc6d878 Mon Sep 17 00:00:00 2001 From: bergquist Date: Wed, 11 May 2016 11:11:45 +0200 Subject: [PATCH] feat(alerting): add delete button for removing alerts --- public/app/plugins/panel/graph/alert_tab_ctrl.ts | 6 ++++++ public/app/plugins/panel/graph/partials/tab_alerting.html | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/graph/alert_tab_ctrl.ts b/public/app/plugins/panel/graph/alert_tab_ctrl.ts index 4aca42c56a7..ca5b8aa37f0 100644 --- a/public/app/plugins/panel/graph/alert_tab_ctrl.ts +++ b/public/app/plugins/panel/graph/alert_tab_ctrl.ts @@ -46,6 +46,12 @@ export class AlertTabCtrl { } } + markAsDeleted() { + if (this.panel.alerting) { + this.panel.alerting.queryRef = this.metricTargets[0].refId; + } + } + thresholdsUpdated() { if (this.panel.alerting.warnLevel) { this.panel.grid.threshold1 = parseInt(this.panel.alerting.warnLevel); diff --git a/public/app/plugins/panel/graph/partials/tab_alerting.html b/public/app/plugins/panel/graph/partials/tab_alerting.html index 0f78b5558fb..db04ef8e8e1 100644 --- a/public/app/plugins/panel/graph/partials/tab_alerting.html +++ b/public/app/plugins/panel/graph/partials/tab_alerting.html @@ -72,4 +72,8 @@ - +
+
+ +
+