diff --git a/public/app/features/alerting/alert_tab_ctrl.ts b/public/app/features/alerting/alert_tab_ctrl.ts index 9f9b7f2b70e..8b3a757d92e 100644 --- a/public/app/features/alerting/alert_tab_ctrl.ts +++ b/public/app/features/alerting/alert_tab_ctrl.ts @@ -80,12 +80,21 @@ export class AlertTabCtrl { _.each(this.alert.notifications, item => { var model = _.findWhere(this.notifications, {id: item.id}); if (model) { + model.iconClass = this.getNotificationIcon(model.type); this.alertNotifications.push(model); } }); }); } + getNotificationIcon(type) { + switch (type) { + case "email": return "fa fa-envelope"; + case "slack": return "fa fa-slack"; + case "webhook": return "fa fa-cubes"; + } + } + getNotifications() { return Promise.resolve(this.notifications.map(item => { return this.uiSegmentSrv.newSegment(item.name); @@ -98,7 +107,7 @@ export class AlertTabCtrl { return; } - this.alertNotifications.push({name: model.name}); + this.alertNotifications.push({name: model.name, iconClass: this.getNotificationIcon(model.type)}); this.alert.notifications.push({id: model.id}); // reset plus button diff --git a/public/app/features/alerting/partials/alert_tab.html b/public/app/features/alerting/partials/alert_tab.html index 870eb220811..87ce81f69e9 100644 --- a/public/app/features/alerting/partials/alert_tab.html +++ b/public/app/features/alerting/partials/alert_tab.html @@ -16,78 +16,88 @@