feat(alerting): add alerts for notification edits

This commit is contained in:
bergquist 2016-08-22 14:49:40 +02:00
parent 457eb91c2f
commit f3d6035c59

View File

@ -34,10 +34,12 @@ export class AlertNotificationEditCtrl {
if (this.model.id) {
this.backendSrv.put(`/api/alert-notifications/${this.model.id}`, this.model).then(res => {
this.model = res;
this.$scope.appEvent('alert-success', ['Notification updated', '']);
});
} else {
this.backendSrv.post(`/api/alert-notifications`, this.model).then(res => {
this.$location.path('alerting/notification/' + res.id + '/edit');
this.$scope.appEvent('alert-success', ['Notification created', '']);
});
}
}