mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(alert_tab): fix broken alert history
This commit is contained in:
@@ -106,6 +106,13 @@ export class AlertTabCtrl {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changeTabIndex(newTabIndex) {
|
||||||
|
this.subTabIndex = newTabIndex;
|
||||||
|
|
||||||
|
if (this.subTabIndex === 2) {
|
||||||
|
this.getAlertHistory();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
notificationAdded() {
|
notificationAdded() {
|
||||||
var model = _.findWhere(this.notifications, {name: this.addNotificationSegment.value});
|
var model = _.findWhere(this.notifications, {name: this.addNotificationSegment.value});
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
<aside class="edit-sidemenu-aside">
|
<aside class="edit-sidemenu-aside">
|
||||||
<ul class="edit-sidemenu">
|
<ul class="edit-sidemenu">
|
||||||
<li ng-class="{active: ctrl.subTabIndex === 0}">
|
<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>
|
||||||
<li ng-class="{active: ctrl.subTabIndex === 1}">
|
<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>
|
Notifications <span class="muted">({{ctrl.alert.notifications.length}})</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li ng-class="{active: ctrl.subTabIndex === 2}">
|
<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>
|
||||||
<li>
|
<li>
|
||||||
<a ng-click="ctrl.delete()">Delete</a>
|
<a ng-click="ctrl.delete()">Delete</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user