NotificationChannels: Add delete button to edit page (#19103)

* Add delete button to edit notification channel page

* Simplified code
This commit is contained in:
Lauren Muhlhauser
2019-09-15 06:08:57 -04:00
committed by Torkel Ödegaard
parent 3d3bbb7159
commit 3827913105
2 changed files with 8 additions and 0 deletions

View File

@@ -100,6 +100,13 @@ export class AlertNotificationEditCtrl {
}
}
deleteNotification() {
this.backendSrv.delete(`/api/alert-notifications/${this.model.id}`).then((res: any) => {
this.model = res;
this.$location.path('alerting/notifications');
});
}
getNotifierTemplateId(type: string) {
return `notifier-options-${type}`;
}