diff --git a/awx/ui/client/src/notifications/notifications.list.js b/awx/ui/client/src/notifications/notifications.list.js index fb781e693b..e3f645a200 100644 --- a/awx/ui/client/src/notifications/notifications.list.js +++ b/awx/ui/client/src/notifications/notifications.list.js @@ -35,6 +35,18 @@ export default ['i18n', 'templateUrl', function(i18n, templateUrl){ excludeModal: true, columnClass: 'd-none d-sm-flex col-md-4 col-sm-3' }, + notification_templates_started: { + label: i18n._("Start"), + flag: 'notification_templates_started', + type: "toggle", + ngClick: "toggleNotification($event, notification.id, \"notification_templates_started\")", + ngDisabled: "!sufficientRoleForNotifToggle", + awToolTip: "{{ schedule.play_tip }}", + dataTipWatch: "schedule.play_tip", + dataPlacement: "right", + nosort: true, + columnClass: 'd-none d-md-flex justify-content-start col-md-1' + }, notification_templates_success: { label: i18n._('Success'), flag: 'notification_templates_success', @@ -45,11 +57,11 @@ export default ['i18n', 'templateUrl', function(i18n, templateUrl){ dataTipWatch: "schedule.play_tip", dataPlacement: "right", nosort: true, - columnClass: 'd-none d-md-flex justify-content-start col-md-2' + columnClass: 'd-none d-md-flex justify-content-start col-md-1' }, notification_templates_error: { label: i18n._('Failure'), - columnClass: 'd-none d-md-flex justify-content-start col-md-2 NotifierList-lastColumn', + columnClass: 'd-none d-md-flex justify-content-start col-md-1 NotifierList-lastColumn', flag: 'notification_templates_error', type: "toggle", ngClick: "toggleNotification($event, notification.id, \"notification_templates_error\")", diff --git a/awx/ui/client/src/notifications/shared/notification-list-init.factory.js b/awx/ui/client/src/notifications/shared/notification-list-init.factory.js index 101519640a..03027feab9 100644 --- a/awx/ui/client/src/notifications/shared/notification-list-init.factory.js +++ b/awx/ui/client/src/notifications/shared/notification-list-init.factory.js @@ -49,7 +49,7 @@ export default ['Wait', 'GetBasePath', 'ProcessErrors', 'Rest', 'GetChoices', scope.relatednotificationsRemove(); } scope.relatednotificationsRemove = scope.$on('relatednotifications', function () { - var columns = ['/notification_templates_success/', '/notification_templates_error/']; + var columns = ['/notification_templates_started/', '/notification_templates_success/', '/notification_templates_error/']; GetChoices({ scope: scope, @@ -64,7 +64,10 @@ export default ['Wait', 'GetBasePath', 'ProcessErrors', 'Rest', 'GetChoices', Rest.setUrl(notifier_url); Rest.get() .then(function(response) { - var type = (response.config.url.indexOf('success')>0) ? "notification_templates_success" : "notification_templates_error"; + let checkForSuccessOrError = response.config.url.indexOf('success') > 0 ? "notification_templates_success" : "notification_templates_error"; + + let type = response.config.url.indexOf('started') > 0 ? "notification_templates_started" : checkForSuccessOrError; + if (response.data.results) { _.forEach(response.data.results, function(result){ _.forEach(scope.notifications, function(notification){ diff --git a/awx/ui/client/src/notifications/shared/toggle-notification.factory.js b/awx/ui/client/src/notifications/shared/toggle-notification.factory.js index 03cb53e260..7f99e737fb 100644 --- a/awx/ui/client/src/notifications/shared/toggle-notification.factory.js +++ b/awx/ui/client/src/notifications/shared/toggle-notification.factory.js @@ -21,7 +21,7 @@ export default ['Wait', 'ProcessErrors', 'Rest', notifier = params.notifier, notifier_id = params.notifier.id, callback = params.callback, - column = params.column, // notification_template_success/notification_template__error + column = params.column, // notification_template_success/notification_template__error/notification_template_started url = params.url + "/" + column + '/'; if(!notifier[column]){