mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 03:17:39 -02:30
fixed ui adhoc stdout socket endpoint and wrapping of std out
This commit is contained in:
@@ -267,13 +267,13 @@ var tower = angular.module('Tower', [
|
|||||||
features: ['FeaturesService', function(FeaturesService) {
|
features: ['FeaturesService', function(FeaturesService) {
|
||||||
return FeaturesService.get();
|
return FeaturesService.get();
|
||||||
}],
|
}],
|
||||||
jobEventsSocket: ['Socket', '$rootScope', function(Socket, $rootScope) {
|
adhocEventsSocket: ['Socket', '$rootScope', function(Socket, $rootScope) {
|
||||||
if (!$rootScope.event_socket) {
|
if (!$rootScope.adhoc_event_socket) {
|
||||||
$rootScope.event_socket = Socket({
|
$rootScope.adhoc_event_socket = Socket({
|
||||||
scope: $rootScope,
|
scope: $rootScope,
|
||||||
endpoint: "job_events"
|
endpoint: "ad_hoc_command_events"
|
||||||
});
|
});
|
||||||
$rootScope.event_socket.init();
|
$rootScope.adhoc_event_socket.init();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -33,13 +33,23 @@ export function JobStdoutController ($location, $log, $rootScope, $scope, $compi
|
|||||||
|
|
||||||
|
|
||||||
function openSockets() {
|
function openSockets() {
|
||||||
$log.debug("socket watching on job_events-" + job_id);
|
if (/\/jobs\/(\d)+\/stdout/.test($location.$$url)) {
|
||||||
$rootScope.event_socket.on("job_events-" + job_id, function() {
|
$log.debug("socket watching on job_events-" + job_id);
|
||||||
$log.debug("socket fired on job_events-" + job_id);
|
$rootScope.event_socket.on("job_events-" + job_id, function() {
|
||||||
if (api_complete) {
|
$log.debug("socket fired on job_events-" + job_id);
|
||||||
event_queue++;
|
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();
|
openSockets();
|
||||||
|
|
||||||
|
|||||||
@@ -58,3 +58,9 @@
|
|||||||
.ansi45 { background-color: #E850A8; }
|
.ansi45 { background-color: #E850A8; }
|
||||||
.ansi46 { background-color: @skipped; }
|
.ansi46 { background-color: @skipped; }
|
||||||
.ansi47 { background-color: #F5F1DE; }
|
.ansi47 { background-color: #F5F1DE; }
|
||||||
|
|
||||||
|
#pre-container-content > span {
|
||||||
|
display: inline-block;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user