Преглед на файлове

feat(alerting): add alerts for notification edits

bergquist преди 9 години
родител
ревизия
f3d6035c59
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      public/app/features/alerting/notification_edit_ctrl.ts

+ 2 - 0
public/app/features/alerting/notification_edit_ctrl.ts

@@ -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', '']);
       });
     }
   }