Alerting: fix response popover prompt when add notification channels (#18967)

This commit is contained in:
lzd
2019-09-09 20:09:21 +08:00
committed by Torkel Ödegaard
parent de075e529d
commit c9c0dd1ea8
2 changed files with 3 additions and 3 deletions

View File

@@ -64,6 +64,7 @@ func (n *notificationService) sendAndMarkAsComplete(evalContext *EvalContext, no
if err != nil {
n.log.Error("failed to send notification", "uid", notifier.GetNotifierUID(), "error", err)
metrics.MAlertingNotificationFailed.WithLabelValues(notifier.GetType()).Inc()
return err
}
if evalContext.IsTestRun {
@@ -108,6 +109,7 @@ func (n *notificationService) sendNotifications(evalContext *EvalContext, notifi
err := n.sendNotification(evalContext, notifierState)
if err != nil {
n.log.Error("failed to send notification", "uid", notifierState.notifier.GetNotifierUID(), "error", err)
return err
}
}

View File

@@ -121,9 +121,7 @@ export class AlertNotificationEditCtrl {
settings: this.model.settings,
};
this.backendSrv.post(`/api/alert-notifications/test`, payload).then((res: any) => {
appEvents.emit('alert-success', ['Test notification sent', '']);
});
this.backendSrv.post(`/api/alert-notifications/test`, payload);
}
}