feat(alerting): add delete button for removing alerts

This commit is contained in:
bergquist
2016-05-11 11:11:45 +02:00
parent 18bf2b2391
commit b58be91e71
2 changed files with 11 additions and 1 deletions
@@ -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);
@@ -72,4 +72,8 @@
</div>
</div>
</div>
<div class="editor-row">
<div class="gf-form-button-row">
<button class="btn btn-warning" ng-click="alertTab.markAsDeleted()">Delete Alert</button>
</div>
</div>