diff --git a/awx/ui/client/src/notifications/notification-templates-list/list.controller.js b/awx/ui/client/src/notifications/notification-templates-list/list.controller.js index edbd0cb42f..78a08c8839 100644 --- a/awx/ui/client/src/notifications/notification-templates-list/list.controller.js +++ b/awx/ui/client/src/notifications/notification-templates-list/list.controller.js @@ -109,41 +109,43 @@ export default } scope.showSummary = function(event, id) { + Wait('start'); + setTimeout(function(){ + if (!Empty(id)) { + var recent_notifications, + html, title = "Recent Notifications"; - if (!Empty(id)) { - var recent_notifications, - html, title = "Recent Notifications"; - - scope.notification_templates.forEach(function(notification_template){ - if(notification_template.id === id){ - recent_notifications = notification_template.summary_fields.recent_notifications; - } - }); - Wait('stop'); - if (recent_notifications.length > 0) { - html = "
| Status | "; - html += "Time | "; - html += "
|---|---|
| \n"; - html += " | " + ($filter('longDate')(row.created)).replace(/ /,' ') + " | \n";
- html += "
| Status | "; + html += "Time | "; + html += "
|---|---|
| \n"; + html += " | " + ($filter('longDate')(row.created)).replace(/ /,' ') + " | \n";
+ html += "
No recent notifications.
\n"; + } + attachElem(event, html, title); } - else { - html = "No recent notifications.
\n"; - } - attachElem(event, html, title); - } + }, 100); }; scope.testNotification = function(){ diff --git a/awx/ui/client/src/notifications/notificationTemplates.list.js b/awx/ui/client/src/notifications/notificationTemplates.list.js index f365112b4e..5046f4a192 100644 --- a/awx/ui/client/src/notifications/notificationTemplates.list.js +++ b/awx/ui/client/src/notifications/notificationTemplates.list.js @@ -27,7 +27,7 @@ export default function(){ icon: "{{ 'icon-job-' + notification_template.status }}", awToolTip: "Click for recent notifications", awTipPlacement: "right", - ngClick: "showSummary($event, notification_templates.id)", + ngClick: "showSummary($event, notification_template.id)", ngClass: "" }] },