From 25504c9191f6d94687831ac1bf880cbbc3a0443b Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 19 Apr 2016 21:51:08 -0700 Subject: [PATCH 1/2] adding notifications to management jobs --- .../management-jobs/card/card.controller.js | 7 ++ .../management-jobs/card/card.partial.html | 5 + awx/ui/client/src/management-jobs/main.js | 4 +- .../src/management-jobs/notifications/main.js | 15 +++ .../notifications/notification.controller.js | 105 ++++++++++++++++++ .../notifications/notification.route.js | 52 +++++++++ .../notifications/notifications.partial.html | 4 + .../notificationTemplates.list.js | 2 +- .../shared/notification-list-init.factory.js | 4 +- .../list-generator/list-generator.factory.js | 6 + 10 files changed, 200 insertions(+), 4 deletions(-) create mode 100644 awx/ui/client/src/management-jobs/notifications/main.js create mode 100644 awx/ui/client/src/management-jobs/notifications/notification.controller.js create mode 100644 awx/ui/client/src/management-jobs/notifications/notification.route.js create mode 100644 awx/ui/client/src/management-jobs/notifications/notifications.partial.html diff --git a/awx/ui/client/src/management-jobs/card/card.controller.js b/awx/ui/client/src/management-jobs/card/card.controller.js index 85c4d825ab..04e1261151 100644 --- a/awx/ui/client/src/management-jobs/card/card.controller.js +++ b/awx/ui/client/src/management-jobs/card/card.controller.js @@ -159,6 +159,13 @@ export default }); }; + $scope.goToNotifications = function(card){ + $state.transitionTo('managementJobsList.notifications',{ + card: card, + management_id: card.id + }); + }; + $scope.submitJob = function (id, name, card) { Wait('start'); defaultUrl = GetBasePath('system_job_templates')+id+'/launch/'; diff --git a/awx/ui/client/src/management-jobs/card/card.partial.html b/awx/ui/client/src/management-jobs/card/card.partial.html index f0884e96a7..1570b42b66 100644 --- a/awx/ui/client/src/management-jobs/card/card.partial.html +++ b/awx/ui/client/src/management-jobs/card/card.partial.html @@ -1,4 +1,5 @@
+
@@ -6,6 +7,10 @@

{{ card.name }}

+
"; + if(options.cancelButton === true) { + html += "
"; + html += "
\n"; + } html += "
"; if(list.toolbarAuxAction) { html += "
"; From 28c4a9faba8ef35bd09ceb3a66229abaab267bc4 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Thu, 21 Apr 2016 09:15:06 -0700 Subject: [PATCH 2/2] Removing GetChoices from notifications list init --- .../notifications/shared/notification-list-init.factory.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 c3395a653e..55935f6f2e 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 @@ -14,8 +14,8 @@ * */ -export default ['Wait', 'GetBasePath', 'ProcessErrors', 'Rest', 'GetChoices', - function(Wait, GetBasePath, ProcessErrors, Rest, GetChoices) { +export default ['Wait', 'GetBasePath', 'ProcessErrors', 'Rest', + function(Wait, GetBasePath, ProcessErrors, Rest) { return function(params) { var scope = params.scope, url = params.url,