mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Updated removing notification channel by uid
This commit is contained in:
parent
c27bf6e688
commit
43c3d5b8ba
@ -140,6 +140,7 @@ export class AlertTabCtrl {
|
||||
name: model.name,
|
||||
iconClass: this.getNotificationIcon(model.type),
|
||||
isDefault: false,
|
||||
uid: model.uid
|
||||
});
|
||||
if (!_.find(this.alert.notifications, { id: model.id})) {
|
||||
this.alert.notifications.push({ uid: model.uid });
|
||||
@ -151,9 +152,9 @@ export class AlertTabCtrl {
|
||||
this.addNotificationSegment.fake = true;
|
||||
}
|
||||
|
||||
removeNotification(index) {
|
||||
this.alert.notifications.splice(index, 1);
|
||||
this.alertNotifications.splice(index, 1);
|
||||
removeNotification(deleteUid) {
|
||||
_.remove(this.alert.notifications, { uid: deleteUid});
|
||||
_.remove(this.alertNotifications, { uid: deleteUid});
|
||||
}
|
||||
|
||||
initModel() {
|
||||
|
@ -135,7 +135,7 @@
|
||||
<div class="gf-form" ng-repeat="nc in ctrl.alertNotifications">
|
||||
<span class="gf-form-label" ng-style="{'background-color': nc.bgColor }">
|
||||
<i class="{{nc.iconClass}}"></i> {{nc.name}}
|
||||
<i class="fa fa-remove pointer muted" ng-click="ctrl.removeNotification($index)" ng-if="nc.isDefault === false"></i>
|
||||
<i class="fa fa-remove pointer muted" ng-click="ctrl.removeNotification(nc.uid)" ng-if="nc.isDefault === false"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="gf-form">
|
||||
|
Loading…
Reference in New Issue
Block a user