diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index 268b0da772..7cebb19339 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -267,13 +267,13 @@ var tower = angular.module('Tower', [ features: ['FeaturesService', function(FeaturesService) { return FeaturesService.get(); }], - jobEventsSocket: ['Socket', '$rootScope', function(Socket, $rootScope) { - if (!$rootScope.event_socket) { - $rootScope.event_socket = Socket({ + adhocEventsSocket: ['Socket', '$rootScope', function(Socket, $rootScope) { + if (!$rootScope.adhoc_event_socket) { + $rootScope.adhoc_event_socket = Socket({ scope: $rootScope, - endpoint: "job_events" + endpoint: "ad_hoc_command_events" }); - $rootScope.event_socket.init(); + $rootScope.adhoc_event_socket.init(); return true; } else { return true; diff --git a/awx/ui/static/js/controllers/JobStdout.js b/awx/ui/static/js/controllers/JobStdout.js index 6572294084..cbd6818e52 100644 --- a/awx/ui/static/js/controllers/JobStdout.js +++ b/awx/ui/static/js/controllers/JobStdout.js @@ -33,13 +33,23 @@ export function JobStdoutController ($location, $log, $rootScope, $scope, $compi function openSockets() { - $log.debug("socket watching on job_events-" + job_id); - $rootScope.event_socket.on("job_events-" + job_id, function() { - $log.debug("socket fired on job_events-" + job_id); - if (api_complete) { - event_queue++; - } - }); + if (/\/jobs\/(\d)+\/stdout/.test($location.$$url)) { + $log.debug("socket watching on job_events-" + job_id); + $rootScope.event_socket.on("job_events-" + job_id, function() { + $log.debug("socket fired on job_events-" + job_id); + if (api_complete) { + event_queue++; + } + }); + } else if (/\/ad_hoc_commands\/(\d)+/.test($location.$$url)) { + $log.debug("socket watching on ad_hoc_command_events-" + job_id); + $rootScope.adhoc_event_socket.on("ad_hoc_command_events-" + job_id, function() { + $log.debug("socket fired on ad_hoc_command_events-" + job_id); + if (api_complete) { + event_queue++; + } + }); + } } openSockets(); diff --git a/awx/ui/static/less/stdout.less b/awx/ui/static/less/stdout.less index fc5c850afd..6477c05be4 100644 --- a/awx/ui/static/less/stdout.less +++ b/awx/ui/static/less/stdout.less @@ -58,3 +58,9 @@ .ansi45 { background-color: #E850A8; } .ansi46 { background-color: @skipped; } .ansi47 { background-color: #F5F1DE; } + +#pre-container-content > span { + display: inline-block; + white-space: pre-wrap; + word-wrap: normal; +}