diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index db43657283..cff60eb1ec 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -624,6 +624,11 @@ var tower = angular.module('Tower', [ ncyBreadcrumb: { parent: "projects", label: "CREATE PROJECT" + }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } } }); @@ -638,6 +643,11 @@ var tower = angular.module('Tower', [ ncyBreadcrumb: { parent: 'projects', label: '{{name}}' + }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } } }); @@ -654,6 +664,7 @@ var tower = angular.module('Tower', [ templateUrl: urlPrefix + 'partials/projects.html', controller: OrganizationsAdd }); + $rootScope.addPermission = function(scope) { $compile("")(scope); }; diff --git a/awx/ui/client/src/controllers/Home.js b/awx/ui/client/src/controllers/Home.js index eb5938aad2..281a5cee84 100644 --- a/awx/ui/client/src/controllers/Home.js +++ b/awx/ui/client/src/controllers/Home.js @@ -28,7 +28,7 @@ export function Home($scope, $compile, $stateParams, $rootScope, $location, $log var dataCount = 0; - $rootScope.$on('dashboard-jobs', function () { + $rootScope.$on('ws-dashboard-jobs', function () { Rest.setUrl(GetBasePath('dashboard')); Rest.get() .success(function (data) { diff --git a/awx/ui/client/src/controllers/Jobs.js b/awx/ui/client/src/controllers/Jobs.js index d0f4c9c640..e3cfd2ab99 100644 --- a/awx/ui/client/src/controllers/Jobs.js +++ b/awx/ui/client/src/controllers/Jobs.js @@ -113,14 +113,14 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $statePa if ($rootScope.removeJobStatusChange) { $rootScope.removeJobStatusChange(); } - $rootScope.removeJobStatusChange = $rootScope.$on('jobs-jobs', function() { + $rootScope.removeJobStatusChange = $rootScope.$on('ws-jobs-jobs', function() { $scope.refreshJobs(); }); if ($rootScope.removeScheduleStatusChange) { $rootScope.removeScheduleStatusChange(); } - $rootScope.removeScheduleStatusChange = $rootScope.$on('jobs-schedules', function() { + $rootScope.removeScheduleStatusChange = $rootScope.$on('ws-jobs-schedules', function() { if (api_complete) { scheduled_scope.search('schedule'); } diff --git a/awx/ui/client/src/controllers/Projects.js b/awx/ui/client/src/controllers/Projects.js index 2f6022fd70..56aca39209 100644 --- a/awx/ui/client/src/controllers/Projects.js +++ b/awx/ui/client/src/controllers/Projects.js @@ -90,7 +90,7 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams, if ($rootScope.removeJobStatusChange) { $rootScope.removeJobStatusChange(); } - $rootScope.removeJobStatusChange = $rootScope.$on(`${$state.current.name}-jobs`, function(e, data) { + $rootScope.removeJobStatusChange = $rootScope.$on(`ws-${$state.current.name}-jobs`, function(e, data) { var project; $log.debug(data); if ($scope.projects) { diff --git a/awx/ui/client/src/dashboard/graphs/job-status/job-status-graph.service.js b/awx/ui/client/src/dashboard/graphs/job-status/job-status-graph.service.js index 06c2bbf343..cf68287c44 100644 --- a/awx/ui/client/src/dashboard/graphs/job-status/job-status-graph.service.js +++ b/awx/ui/client/src/dashboard/graphs/job-status/job-status-graph.service.js @@ -58,7 +58,7 @@ function JobStatusGraphData(Rest, getBasePath, processErrors, $rootScope, $q) { destroyWatcher: angular.noop, setupWatcher: function(period, jobType) { this.destroyWatcher = - $rootScope.$on('dashboard-jobs', function() { + $rootScope.$on('ws-dashboard-jobs', function() { getData(period, jobType).then(function(result) { $rootScope. $broadcast('DataReceived:JobStatusGraph', diff --git a/awx/ui/client/src/inventories/manage/adhoc/adhoc.route.js b/awx/ui/client/src/inventories/manage/adhoc/adhoc.route.js index d8eb57e735..935dac79f6 100644 --- a/awx/ui/client/src/inventories/manage/adhoc/adhoc.route.js +++ b/awx/ui/client/src/inventories/manage/adhoc/adhoc.route.js @@ -23,5 +23,10 @@ export default { }, ncyBreadcrumb: { label: "RUN COMMAND" + }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } } }; diff --git a/awx/ui/client/src/inventories/manage/copy-move/copy-move.route.js b/awx/ui/client/src/inventories/manage/copy-move/copy-move.route.js index 85d856c5ed..e133414ce1 100644 --- a/awx/ui/client/src/inventories/manage/copy-move/copy-move.route.js +++ b/awx/ui/client/src/inventories/manage/copy-move/copy-move.route.js @@ -22,6 +22,11 @@ var copyMoveGroup = { return GroupManageService.get({id: $stateParams.group_id}).then(res => res.data.results[0]); }] }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } + }, views: { 'form@inventoryManage' : { controller: CopyMoveGroupsController, @@ -40,6 +45,11 @@ var copyMoveHost = { return HostManageService.get({id: $stateParams.host_id}).then(res => res.data.results[0]); }] }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } + }, views: { 'form@inventoryManage': { templateUrl: templateUrl('inventories/manage/copy-move/copy-move'), diff --git a/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js b/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js index 9e13b74867..5cd2297129 100644 --- a/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js +++ b/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js @@ -104,7 +104,7 @@ if ($rootScope.inventoryManageStatus) { $rootScope.inventoryManageStatus(); } - $rootScope.inventoryManageStatus = $rootScope.$on(`${$state.current.name}-jobs`, function(e, data){ + $rootScope.inventoryManageStatus = $rootScope.$on(`ws-${$state.current.name}-jobs`, function(e, data){ var group = Find({ list: $scope.groups, key: 'id', val: data.group_id }); if(data.status === 'failed' || data.status === 'successful'){ $state.reload(); diff --git a/awx/ui/client/src/inventories/manage/groups/groups.route.js b/awx/ui/client/src/inventories/manage/groups/groups.route.js index 905a7d2997..e7a9ac8732 100644 --- a/awx/ui/client/src/inventories/manage/groups/groups.route.js +++ b/awx/ui/client/src/inventories/manage/groups/groups.route.js @@ -16,6 +16,11 @@ var ManageGroupsEdit = { data: { mode: 'edit' }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } + }, resolve: { groupData: ['$stateParams', 'GroupManageService', function($stateParams, GroupManageService){ return GroupManageService.get({id: $stateParams.group_id}).then(res => res.data.results[0]); @@ -41,6 +46,11 @@ var ManageGroupsAdd = { data: { mode: 'add' }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } + }, views: { 'form@inventoryManage': { controller: addController, diff --git a/awx/ui/client/src/inventories/manage/hosts/hosts.route.js b/awx/ui/client/src/inventories/manage/hosts/hosts.route.js index 86661e70f5..2edbf3518b 100644 --- a/awx/ui/client/src/inventories/manage/hosts/hosts.route.js +++ b/awx/ui/client/src/inventories/manage/hosts/hosts.route.js @@ -23,6 +23,11 @@ var ManageHostsEdit = { }); }] }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } + }, views: { 'form@inventoryManage': { controller: editController, @@ -40,6 +45,11 @@ var ManageHostsAdd = { data: { mode: 'add' }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } + }, views: { 'form@inventoryManage': { controller: addController, diff --git a/awx/ui/client/src/job-detail/host-event/host-event.route.js b/awx/ui/client/src/job-detail/host-event/host-event.route.js index 885034b747..b9fb2d4707 100644 --- a/awx/ui/client/src/job-detail/host-event/host-event.route.js +++ b/awx/ui/client/src/job-detail/host-event/host-event.route.js @@ -22,6 +22,12 @@ var hostEventModal = { return JobDetailService.getJobEventChildren($stateParams.taskId).then(res => res.data.results); }] }, + socket: { + "groups":{ + "jobs": ["status_changed", "summary"], + "job_events": [] + } + }, onExit: function() { // close the modal // using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X" @@ -36,28 +42,52 @@ var hostEventModal = { name: 'jobDetail.host-event.details', url: '/details', controller: 'HostEventController', - templateUrl: templateUrl('job-detail/host-event/host-event-details') + templateUrl: templateUrl('job-detail/host-event/host-event-details'), + socket: { + "groups":{ + "jobs": ["status_changed", "summary"], + "job_events": [] + } + } }; var hostEventJson = { name: 'jobDetail.host-event.json', url: '/json', controller: 'HostEventController', - templateUrl: templateUrl('job-detail/host-event/host-event-codemirror') + templateUrl: templateUrl('job-detail/host-event/host-event-codemirror'), + socket: { + "groups":{ + "jobs": ["status_changed", "summary"], + "job_events": [] + } + } }; var hostEventStdout = { name: 'jobDetail.host-event.stdout', url: '/stdout', controller: 'HostEventController', - templateUrl: templateUrl('job-detail/host-event/host-event-codemirror') + templateUrl: templateUrl('job-detail/host-event/host-event-codemirror'), + socket: { + "groups":{ + "jobs": ["status_changed", "summary"], + "job_events": [] + } + } }; var hostEventStderr = { name: 'jobDetail.host-event.stderr', url: '/stderr', controller: 'HostEventController', - templateUrl: templateUrl('job-detail/host-event/host-event-codemirror') + templateUrl: templateUrl('job-detail/host-event/host-event-codemirror'), + socket: { + "groups":{ + "jobs": ["status_changed", "summary"], + "job_events": [] + } + } }; diff --git a/awx/ui/client/src/job-detail/host-events/host-events.route.js b/awx/ui/client/src/job-detail/host-events/host-events.route.js index 835d17b2b9..710ef26e84 100644 --- a/awx/ui/client/src/job-detail/host-events/host-events.route.js +++ b/awx/ui/client/src/job-detail/host-events/host-events.route.js @@ -22,6 +22,12 @@ export default { $('.modal-backdrop').remove(); $('body').removeClass('modal-open'); }, + socket: { + "groups":{ + "jobs": ["status_changed", "summary"], + "job_events": [] + } + }, resolve: { hosts: ['JobDetailService','$stateParams', function(JobDetailService, $stateParams) { return JobDetailService.getRelatedJobEvents($stateParams.id, { diff --git a/awx/ui/client/src/job-detail/host-summary/host-summary.controller.js b/awx/ui/client/src/job-detail/host-summary/host-summary.controller.js index cf648b8521..ab2b91e993 100644 --- a/awx/ui/client/src/job-detail/host-summary/host-summary.controller.js +++ b/awx/ui/client/src/job-detail/host-summary/host-summary.controller.js @@ -53,7 +53,7 @@ } // emitted by the API in the same function used to persist host summary data // JobEvent.update_host_summary_from_stats() from /awx/main.models.jobs.py - $rootScope.removeJobStatusChange = $rootScope.$on('JobSummaryComplete', function(e, data) { + $rootScope.removeJobStatusChange = $rootScope.$on('ws-JobSummaryComplete', function(e, data) { // discard socket msgs we don't care about in this context if (parseInt($stateParams.id) === data.unified_job_id){ init(); @@ -63,7 +63,7 @@ if ($rootScope.removeJobSummaryComplete) { $rootScope.removeJobSummaryComplete(); } - $rootScope.removeJobSummaryComplete = $rootScope.$on('jobDetail-jobs', function(e, data) { + $rootScope.removeJobSummaryComplete = $rootScope.$on('ws-jobDetail-jobs', function(e, data) { if (parseInt($stateParams.id) === data.unified_job_id){ $scope.status = data.status; } diff --git a/awx/ui/client/src/job-detail/host-summary/host-summary.route.js b/awx/ui/client/src/job-detail/host-summary/host-summary.route.js index 5d17fb172b..616e393dd3 100644 --- a/awx/ui/client/src/job-detail/host-summary/host-summary.route.js +++ b/awx/ui/client/src/job-detail/host-summary/host-summary.route.js @@ -14,6 +14,12 @@ export default { "jobs": ["status_changed"] } }, + socket: { + "groups":{ + "jobs": ["status_changed", "summary"], + "job_events": [] + } + }, views:{ 'host-summary': { controller: 'HostSummaryController', diff --git a/awx/ui/client/src/job-detail/job-detail.controller.js b/awx/ui/client/src/job-detail/job-detail.controller.js index 9dfef14c84..d37ee0624d 100644 --- a/awx/ui/client/src/job-detail/job-detail.controller.js +++ b/awx/ui/client/src/job-detail/job-detail.controller.js @@ -201,7 +201,7 @@ export default if ($rootScope.removeJobEventChange) { $rootScope.removeJobEventChange(); } - $rootScope.removeJobEventChange = $rootScope.$on(`${$state.current.name}-job_events-${job_id}`, function(e, data) { + $rootScope.removeJobEventChange = $rootScope.$on(`ws-${$state.current.name}-job_events-${job_id}`, function(e, data) { // update elapsed time on each event received scope.job_status.elapsed = GetElapsed({ start: scope.job.created, @@ -225,7 +225,7 @@ export default if ($rootScope.removeJobStatusChange) { $rootScope.removeJobStatusChange(); } - $rootScope.removeJobStatusChange = $rootScope.$on(`${$state.current.name}-jobs`, function(e, data) { + $rootScope.removeJobStatusChange = $rootScope.$on(`ws-${$state.current.name}-jobs`, function(e, data) { // if we receive a status change event for the current job indicating the job // is finished, stop event queue processing and reload if (parseInt(data.unified_job_id, 10) === parseInt(job_id,10)) { @@ -242,7 +242,7 @@ export default if ($rootScope.removeJobSummaryComplete) { $rootScope.removeJobSummaryComplete(); } - $rootScope.removeJobSummaryComplete = $rootScope.$on('JobSummaryComplete', function() { + $rootScope.removeJobSummaryComplete = $rootScope.$on('ws-JobSummaryComplete', function() { // the job host summary should now be available from the API $log.debug('Trigging reload of job_host_summaries'); scope.$emit('InitialLoadComplete'); diff --git a/awx/ui/client/src/job-templates/add/job-templates-add.route.js b/awx/ui/client/src/job-templates/add/job-templates-add.route.js index 68275c0f22..b4ede48910 100644 --- a/awx/ui/client/src/job-templates/add/job-templates-add.route.js +++ b/awx/ui/client/src/job-templates/add/job-templates-add.route.js @@ -15,6 +15,11 @@ export default { parent: "jobTemplates", label: "CREATE JOB TEMPLATE" }, + socket:{ + "groups":{ + "jobs": ["status_changed"] + } + }, onExit: function(){ // close the survey maker modal // using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X" diff --git a/awx/ui/client/src/job-templates/edit/job-templates-edit.route.js b/awx/ui/client/src/job-templates/edit/job-templates-edit.route.js index b2dffa229b..4e2d34f3c0 100644 --- a/awx/ui/client/src/job-templates/edit/job-templates-edit.route.js +++ b/awx/ui/client/src/job-templates/edit/job-templates-edit.route.js @@ -14,6 +14,11 @@ export default { data: { activityStreamId: 'id' }, + socket:{ + "groups":{ + "jobs": ["status_changed"] + } + }, ncyBreadcrumb: { parent: 'jobTemplates', label: "{{name}}" diff --git a/awx/ui/client/src/job-templates/list/job-templates-list.controller.js b/awx/ui/client/src/job-templates/list/job-templates-list.controller.js index 4e50f43fec..6ad5fa053f 100644 --- a/awx/ui/client/src/job-templates/list/job-templates-list.controller.js +++ b/awx/ui/client/src/job-templates/list/job-templates-list.controller.js @@ -37,6 +37,14 @@ export default view.inject(list, { mode: mode, scope: $scope }); $rootScope.flashMessage = null; + + if ($rootScope.JobStatusChange) { + $rootScope.JobStatusChange(); + } + $rootScope.JobStatusChange = $rootScope.$on(`ws-${$state.current.name}-jobs`, function (e, data) { + $scope.search(list.iterator); + }); + if ($scope.removePostRefresh) { $scope.removePostRefresh(); } diff --git a/awx/ui/client/src/job-templates/list/job-templates-list.route.js b/awx/ui/client/src/job-templates/list/job-templates-list.route.js index deeb1982bd..1a68cc8720 100644 --- a/awx/ui/client/src/job-templates/list/job-templates-list.route.js +++ b/awx/ui/client/src/job-templates/list/job-templates-list.route.js @@ -17,5 +17,10 @@ export default { }, ncyBreadcrumb: { label: "JOB TEMPLATES" + }, + socket:{ + "groups":{ + "jobs": ["status_changed"] + } } }; diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-job-templates.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-job-templates.controller.js index 58a8c60a17..4ec28f7643 100644 --- a/awx/ui/client/src/organizations/linkout/controllers/organizations-job-templates.controller.js +++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-job-templates.controller.js @@ -21,6 +21,13 @@ export default ['$scope', '$rootScope', '$location', '$log', generator = GenerateList, orgBase = GetBasePath('organizations'); + if ($rootScope.JobStatusChange) { + $rootScope.JobStatusChange(); + } + $rootScope.JobStatusChange = $rootScope.$on(`ws-${$state.current.name}-jobs`, function (e, data) { + $scope.search(list.iterator); + }); + Rest.setUrl(orgBase + $stateParams.organization_id); Rest.get() .success(function (data) { diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js index 0de1b568ed..f03b1ebb35 100644 --- a/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js +++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js @@ -90,7 +90,7 @@ export default ['$scope', '$rootScope', '$location', '$log', if ($rootScope.removeJobStatusChange) { $rootScope.removeJobStatusChange(); } - $rootScope.removeJobStatusChange = $rootScope.$on(`${$state.current.name}-jobs`, function(e, data) { + $rootScope.removeJobStatusChange = $rootScope.$on(`ws-${$state.current.name}-jobs`, function(e, data) { var project; $log.debug(data); if ($scope.projects) { diff --git a/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js b/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js index 13d51cc68f..fa909af4e3 100644 --- a/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js +++ b/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js @@ -99,6 +99,11 @@ export default [ features: ['FeaturesService', function(FeaturesService) { return FeaturesService.get(); }] + }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } } }, { @@ -121,6 +126,11 @@ export default [ features: ['FeaturesService', function(FeaturesService) { return FeaturesService.get(); }] + }, + socket: { + "groups":{ + "jobs": ["status_changed"] + } } }, { diff --git a/awx/ui/client/src/portal-mode/portal-mode-jobs.controller.js b/awx/ui/client/src/portal-mode/portal-mode-jobs.controller.js index 278bc2f4fc..10de01444b 100644 --- a/awx/ui/client/src/portal-mode/portal-mode-jobs.controller.js +++ b/awx/ui/client/src/portal-mode/portal-mode-jobs.controller.js @@ -16,7 +16,7 @@ export function PortalModeJobsController($scope, $rootScope, GetBasePath, Genera if ($rootScope.removeJobStatusChange) { $rootScope.removeJobStatusChange(); } - $rootScope.removeJobStatusChange = $rootScope.$on('portalMode-jobs', function() { + $rootScope.removeJobStatusChange = $rootScope.$on('ws-portalMode-jobs', function() { $scope.search('job'); }); diff --git a/awx/ui/client/src/shared/socket/socket.service.js b/awx/ui/client/src/shared/socket/socket.service.js index da53e2998a..922d56759a 100644 --- a/awx/ui/client/src/shared/socket/socket.service.js +++ b/awx/ui/client/src/shared/socket/socket.service.js @@ -41,13 +41,13 @@ export default // we know that this must have been a // summary complete message $log.debug('Job summary_complete ' + data.unified_job_id); - $rootScope.$emit('JobSummaryComplete', data); + $rootScope.$emit('ws-JobSummaryComplete', data); } else if(data.group_name==="job_events"){ - str = `${$state.current.name}-${data.group_name}-${data.job}`; + str = `ws-${$state.current.name}-${data.group_name}-${data.job}`; } else if(data.group_name==="ad_hoc_command_events"){ - str = `${$state.current.name}-${data.group_name}-${data.ad_hoc_command}`; + str = `ws-${$state.current.name}-${data.group_name}-${data.ad_hoc_command}`; } else if(data.group_name==="control"){ $log.debug(data.reason); @@ -59,7 +59,7 @@ export default // correct route is the route name followed by a // dash (-) and the group_name. // ex: 'jobDetail-job_events' - str = `${$state.current.name}-${data.group_name}`; + str = `ws-${$state.current.name}-${data.group_name}`; } $rootScope.$emit(str, data); return self.socket; diff --git a/awx/ui/client/src/standard-out/log/standard-out-log.controller.js b/awx/ui/client/src/standard-out/log/standard-out-log.controller.js index 2c46d218ce..52af6330ff 100644 --- a/awx/ui/client/src/standard-out/log/standard-out-log.controller.js +++ b/awx/ui/client/src/standard-out/log/standard-out-log.controller.js @@ -22,7 +22,7 @@ export default ['$log', '$rootScope', '$scope', '$state', '$stateParams', 'Proce function openSockets() { if ($state.current.name === 'jobDetail') { $log.debug("socket watching on job_events-" + job_id); - $rootScope.$on(`${$state.current.name}-job_events-${job_id}`, function() { + $rootScope.$on(`ws-${$state.current.name}-job_events-${job_id}`, function() { $log.debug("socket fired on job_events-" + job_id); if (api_complete) { event_queue++; @@ -36,7 +36,7 @@ export default ['$log', '$rootScope', '$scope', '$state', '$stateParams', 'Proce } if ($state.current.name === 'adHocJobStdout') { $log.debug("socket watching on ad_hoc_command_events-" + job_id); - $rootScope.$on(`${$state.current.name}-ad_hoc_command_events-${job_id}`, function() { + $rootScope.$on(`ws-${$state.current.name}-ad_hoc_command_events-${job_id}`, function() { $log.debug("socket fired on ad_hoc_command_events-" + job_id); if (api_complete) { event_queue++; @@ -192,7 +192,7 @@ export default ['$log', '$rootScope', '$scope', '$state', '$stateParams', 'Proce if ($scope.removeJobStatusChange) { $scope.removeJobStatusChange(); } - $scope.removeJobStatusChange = $rootScope.$on(`${$state.current.name}-jobs`, function(e, data) { + $scope.removeJobStatusChange = $rootScope.$on(`ws-${$state.current.name}-jobs`, function(e, data) { if (parseInt(data.unified_job_id, 10) === parseInt(job_id,10)) { if (data.status === 'failed' || data.status === 'canceled' || data.status === 'error' || data.status === 'successful') { diff --git a/awx/ui/client/src/standard-out/standard-out.controller.js b/awx/ui/client/src/standard-out/standard-out.controller.js index 242d339ba9..b53acdb798 100644 --- a/awx/ui/client/src/standard-out/standard-out.controller.js +++ b/awx/ui/client/src/standard-out/standard-out.controller.js @@ -28,7 +28,7 @@ export function JobStdoutController ($rootScope, $scope, $state, $stateParams, if ($scope.removeJobStatusChange) { $scope.removeJobStatusChange(); } - $scope.removeJobStatusChange = $rootScope.$on(`${$state.current.name}-jobs`, function(e, data) { + $scope.removeJobStatusChange = $rootScope.$on(`ws-${$state.current.name}-jobs`, function(e, data) { if (parseInt(data.unified_job_id, 10) === parseInt(job_id,10) && $scope.job) { $scope.job.status = data.status; }