Ver Fonte

feat(alerting): add alerts for notification edits

bergquist há 9 anos atrás
pai
commit
f3d6035c59
1 ficheiros alterados com 2 adições e 0 exclusões
  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) {
     if (this.model.id) {
       this.backendSrv.put(`/api/alert-notifications/${this.model.id}`, this.model).then(res => {
       this.backendSrv.put(`/api/alert-notifications/${this.model.id}`, this.model).then(res => {
         this.model = res;
         this.model = res;
+        this.$scope.appEvent('alert-success', ['Notification updated', '']);
       });
       });
     } else {
     } else {
       this.backendSrv.post(`/api/alert-notifications`, this.model).then(res => {
       this.backendSrv.post(`/api/alert-notifications`, this.model).then(res => {
         this.$location.path('alerting/notification/' + res.id + '/edit');
         this.$location.path('alerting/notification/' + res.id + '/edit');
+        this.$scope.appEvent('alert-success', ['Notification created', '']);
       });
       });
     }
     }
   }
   }