mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
fixed ui adhoc stdout socket endpoint and wrapping of std out
This commit is contained in:
parent
de850c48c6
commit
e068f7bb7f
@ -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;
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user