Commit 22805ce5 by bergquist

fix(alert_tab): fix broken alert history

parent 55b560a4
......@@ -106,6 +106,13 @@ export class AlertTabCtrl {
}));
}
changeTabIndex(newTabIndex) {
this.subTabIndex = newTabIndex;
if (this.subTabIndex === 2) {
this.getAlertHistory();
}
}
notificationAdded() {
var model = _.findWhere(this.notifications, {name: this.addNotificationSegment.value});
......
......@@ -2,15 +2,15 @@
<aside class="edit-sidemenu-aside">
<ul class="edit-sidemenu">
<li ng-class="{active: ctrl.subTabIndex === 0}">
<a ng-click="ctrl.subTabIndex = 0">Alert Config</a>
<a ng-click="ctrl.changeTabIndex(0)">Alert Config</a>
</li>
<li ng-class="{active: ctrl.subTabIndex === 1}">
<a ng-click="ctrl.subTabIndex = 1">
<a ng-click="ctrl.changeTabIndex(1)">
Notifications <span class="muted">({{ctrl.alert.notifications.length}})</span>
</a>
</li>
<li ng-class="{active: ctrl.subTabIndex === 2}">
<a ng-click="ctrl.subTabIndex = 2">Alert History</a>
<a ng-click="ctrl.changeTabIndex(2)">Alert History</a>
</li>
<li>
<a ng-click="ctrl.delete()">Delete</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment