Attempt to parse the notification message as json and show accordingly
This commit is contained in:
@@ -20,6 +20,13 @@ angular.module('Application').controller('NotificationsController', ['$scope', '
|
||||
// collapse by default
|
||||
result.forEach(function (r) { r.isCollapsed = true; });
|
||||
|
||||
// attempt to parse the message as json
|
||||
result.forEach(function (r) {
|
||||
try {
|
||||
r.messageJson = JSON.parse(r.message);
|
||||
} catch (e) {}
|
||||
});
|
||||
|
||||
$scope.notifications.notifications = result;
|
||||
|
||||
$scope.notifications.busy = false;
|
||||
|
||||
Reference in New Issue
Block a user