diff --git a/pkg/services/alerting/notifier.go b/pkg/services/alerting/notifier.go index f39f148ce8d..c763e37c133 100644 --- a/pkg/services/alerting/notifier.go +++ b/pkg/services/alerting/notifier.go @@ -151,8 +151,8 @@ func NewNotificationFromDBModel(model *m.AlertNotification) (*Notification, erro Name: model.Name, Type: model.Type, Notifierr: notifier, - SendCritical: !model.Settings.Get("ignoreCrit").MustBool(), - SendWarning: !model.Settings.Get("ignoreWarn").MustBool(), + SendCritical: model.Settings.Get("sendCrit").MustBool(), + SendWarning: model.Settings.Get("sendWarn").MustBool(), }, nil } diff --git a/public/app/features/alerting/notification_edit_ctrl.ts b/public/app/features/alerting/notification_edit_ctrl.ts index 08b4c41b361..9bca3cddbec 100644 --- a/public/app/features/alerting/notification_edit_ctrl.ts +++ b/public/app/features/alerting/notification_edit_ctrl.ts @@ -13,6 +13,13 @@ export class AlertNotificationEditCtrl { constructor(private $routeParams, private backendSrv, private $scope) { if ($routeParams.notificationId) { this.loadNotification($routeParams.notificationId); + } else { + this.notification = { + settings: { + sendCrit: true, + sendWarn: true, + } + }; } } diff --git a/public/app/features/alerting/partials/notification_edit.html b/public/app/features/alerting/partials/notification_edit.html index 26a24bcf849..fea91e5045a 100644 --- a/public/app/features/alerting/partials/notification_edit.html +++ b/public/app/features/alerting/partials/notification_edit.html @@ -24,6 +24,12 @@
+
+ +
+
+ +