@@ -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
}
@@ -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,
+ }
+ };
@@ -24,6 +24,12 @@
<div class="gf-form">
<gf-form-switch class="gf-form" label-class="width-8" label="Always execute" checked="ctrl.notification.alwaysExecute" on-change=""></gf-form-switch>
</div>
+ <div class="gf-form">
+ <gf-form-switch class="gf-form" label-class="width-8" label="Send Warning" checked="ctrl.notification.settings.sendWarn" on-change=""></gf-form-switch>
+ </div>
+ <gf-form-switch class="gf-form" label-class="width-8" label="Send Critical" checked="ctrl.notification.settings.sendCrit" on-change=""></gf-form-switch>
<div class="gf-form-group section" ng-show="ctrl.notification.type === 'webhook'">