Load eventlog details per notification
This commit is contained in:
@@ -17,9 +17,8 @@ angular.module('Application').controller('NotificationsController', ['$scope', '
|
||||
Client.getNotifications($scope.notifications.all ? null : false, 1, 20, function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
result.forEach(function (r) {
|
||||
r.isCollapsed = r.acknowledged;
|
||||
});
|
||||
// collapse by default
|
||||
result.forEach(function (r) { r.isCollapsed = true; });
|
||||
|
||||
$scope.notifications.notifications = result;
|
||||
|
||||
@@ -69,6 +68,18 @@ angular.module('Application').controller('NotificationsController', ['$scope', '
|
||||
}
|
||||
};
|
||||
|
||||
$scope.notificationExpanding = function (notification) {
|
||||
notification.busyLoadEvent = true;
|
||||
|
||||
Client.getEvent(notification.eventId, function (error, result) {
|
||||
notification.busyLoadEvent = false;
|
||||
|
||||
if (error) return console.error(error);
|
||||
|
||||
notification.event = result;
|
||||
});
|
||||
};
|
||||
|
||||
Client.onReady(function () {
|
||||
$scope.notifications.refresh();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user