diff --git a/awx/ui/client/src/job-detail/host-event/host-event.block.less b/awx/ui/client/src/job-detail/host-event/host-event.block.less
index fc84890856..eafa9678fd 100644
--- a/awx/ui/client/src/job-detail/host-event/host-event.block.less
+++ b/awx/ui/client/src/job-detail/host-event/host-event.block.less
@@ -101,11 +101,11 @@
font-weight: 600;
margin-bottom: 8px;
}
-.HostEvent .modal-body{
- max-height: 500px;
- overflow-y: auto;
- padding: 20px;
-}
+// .HostEvent .modal-body{
+// max-height: 500px;
+// overflow-y: auto;
+// padding: 20px;
+// }
.HostEvent-nav{
padding-top: 12px;
padding-bottom: 12px;
diff --git a/awx/ui/client/src/job-results/host-event/host-event-details.partial.html b/awx/ui/client/src/job-results/host-event/host-event-details.partial.html
deleted file mode 100644
index 60cd44a9b7..0000000000
--- a/awx/ui/client/src/job-results/host-event/host-event-details.partial.html
+++ /dev/null
@@ -1,46 +0,0 @@
-
+
+
+
+ CREATED
+ {{event.created || "No result found"}}
+
+
+ PLAY
+ {{event.play || "No result found"}}
+
+
+ TASK
+ {{event.task || "No result found"}}
+
+
+ MODULE
+ {{event.event_data.res.invocation.module_name || "No result found"}}
+
+
+
+
+
-
@@ -25,9 +49,6 @@
-
-
diff --git a/awx/ui/client/src/job-results/host-event/host-event.block.less b/awx/ui/client/src/job-results/host-event/host-event.block.less
index fc84890856..f9eff87d5c 100644
--- a/awx/ui/client/src/job-results/host-event/host-event.block.less
+++ b/awx/ui/client/src/job-results/host-event/host-event.block.less
@@ -96,14 +96,16 @@
.HostEvent-status--skipped{
color: @skipped;
}
+.HostEvent-header{
+ padding-bottom: 15px;
+}
.HostEvent-title{
color: @default-interface-txt;
font-weight: 600;
margin-bottom: 8px;
}
.HostEvent .modal-body{
- max-height: 500px;
- overflow-y: auto;
+ height: 480px;
padding: 20px;
}
.HostEvent-nav{
diff --git a/awx/ui/client/src/job-results/host-event/host-event.controller.js b/awx/ui/client/src/job-results/host-event/host-event.controller.js
index d5377014e2..e7bbdc00e3 100644
--- a/awx/ui/client/src/job-results/host-event/host-event.controller.js
+++ b/awx/ui/client/src/job-results/host-event/host-event.controller.js
@@ -6,8 +6,8 @@
export default
- ['$stateParams', '$scope', '$state', 'Wait', 'JobDetailService', 'hostEvent', 'hostResults',
- function($stateParams, $scope, $state, Wait, JobDetailService, hostEvent, hostResults){
+ ['$stateParams', '$scope', '$state', 'Wait', 'JobDetailService', 'hostEvent', 'hostResults', 'parseStdoutService',
+ function($stateParams, $scope, $state, Wait, JobDetailService, hostEvent, hostResults, parseStdoutService){
$scope.processEventStatus = JobDetailService.processEventStatus;
$scope.hostResults = [];
@@ -29,7 +29,7 @@
lineNumbers: true,
mode: mode
});
- editor.setSize("100%", 300);
+ editor.setSize("100%", 200);
editor.getDoc().setValue(data);
};
/*ignore jslint end*/
@@ -44,26 +44,6 @@
return $scope.hostResults.indexOf(result[0]);
};
- $scope.showPrev = function(){
- return $scope.getActiveHostIndex() !== 0;
- };
-
- $scope.showNext = function(){
- return $scope.getActiveHostIndex() < $scope.hostResults.indexOf($scope.hostResults[$scope.hostResults.length - 1]);
- };
-
- $scope.goNext = function(){
- var index = $scope.getActiveHostIndex() + 1;
- var id = $scope.hostResults[index].id;
- $state.go('jobDetail.host-event.details', {eventId: id});
- };
-
- $scope.goPrev = function(){
- var index = $scope.getActiveHostIndex() - 1;
- var id = $scope.hostResults[index].id;
- $state.go('jobDetail.host-event.details', {eventId: id});
- };
-
var init = function(){
$scope.event = _.cloneDeep(hostEvent);
$scope.hostResults = hostResults;
@@ -71,7 +51,7 @@
// grab standard out & standard error if present, and remove from the results displayed in the details panel
if (hostEvent.stdout){
- $scope.stdout = hostEvent.stdout;
+ $scope.stdout = parseStdoutService.prettifyLite(hostEvent.stdout);
delete $scope.event.stdout;
}
if (hostEvent.stderr){
diff --git a/awx/ui/client/src/job-results/host-event/host-event.route.js b/awx/ui/client/src/job-results/host-event/host-event.route.js
index 1be6f685ac..04d08e1399 100644
--- a/awx/ui/client/src/job-results/host-event/host-event.route.js
+++ b/awx/ui/client/src/job-results/host-event/host-event.route.js
@@ -11,7 +11,7 @@ var hostEventModal = {
url: '/task/:taskId/host-event/:eventId',
controller: 'HostEventController',
templateUrl: templateUrl('job-results/host-event/host-event-modal'),
- 'abstract': true,
+ 'abstract': false,
resolve: {
hostEvent: ['JobDetailService', '$stateParams', function(JobDetailService, $stateParams) {
return JobDetailService.getRelatedJobEvents($stateParams.id, {
@@ -33,13 +33,6 @@ var hostEventModal = {
}
};
-var hostEventDetails = {
- name: 'jobDetail.host-event.details',
- url: '/details',
- controller: 'HostEventController',
- templateUrl: templateUrl('job-results/host-event/host-event-details'),
-};
-
var hostEventJson = {
name: 'jobDetail.host-event.json',
url: '/json',
@@ -62,4 +55,4 @@ var hostEventStderr = {
};
-export { hostEventDetails, hostEventJson, hostEventModal, hostEventStdout, hostEventStderr };
+export { hostEventJson, hostEventModal, hostEventStdout, hostEventStderr };
diff --git a/awx/ui/client/src/job-results/host-event/main.js b/awx/ui/client/src/job-results/host-event/main.js
index 6f0be39b04..76832b45e5 100644
--- a/awx/ui/client/src/job-results/host-event/main.js
+++ b/awx/ui/client/src/job-results/host-event/main.js
@@ -4,7 +4,7 @@
* All Rights Reserved
*************************************************/
- import {hostEventModal, hostEventDetails,
+ import {hostEventModal,
hostEventJson, hostEventStdout, hostEventStderr} from './host-event.route';
import controller from './host-event.controller';
@@ -14,7 +14,6 @@
.run(['$stateExtender', function($stateExtender){
$stateExtender.addState(hostEventModal);
- $stateExtender.addState(hostEventDetails);
$stateExtender.addState(hostEventJson);
$stateExtender.addState(hostEventStdout);
$stateExtender.addState(hostEventStderr);
diff --git a/awx/ui/client/src/job-results/parse-stdout.service.js b/awx/ui/client/src/job-results/parse-stdout.service.js
index 8799a152ac..ead8c33fd3 100644
--- a/awx/ui/client/src/job-results/parse-stdout.service.js
+++ b/awx/ui/client/src/job-results/parse-stdout.service.js
@@ -33,13 +33,44 @@ export default ['$log', function($log){
line = line.replace(/\[0m/g, '');
return line;
},
+ prettifyLite: function(line){
+ // this function will return a line of stdout without the
+ // tags styling the output. This isn't needed in the case
+ // of the host event modal where stdout is displayed in a CodeMirror
+
+
+ // TODO: remove once Chris's fixes to the [K lines comes in
+ if (line.indexOf("[K") > -1) {
+ $log.error(line);
+ }
+
+ line = line.replace(/u001b/g, '');
+
+ // ansi classes
+ line = line.replace(/\[1;31m/g, '');
+ line = line.replace(/\[0;31m/g, '');
+ line = line.replace(/\[0;32m/g, '');
+ line = line.replace(/\[0;32m=/g, '');
+ line = line.replace(/\[0;32m1/g, '');
+ line = line.replace(/\[0;33m/g, '');
+ line = line.replace(/\[0;34m/g, '');
+ line = line.replace(/\[0;35m/g, '');
+ line = line.replace(/\[0;36m/g, '');
+ line = line.replace(/()\s/g, '$1');
+
+ //end span
+ line = line.replace(/\[0m/g, '');
+ //TODO: figure out how to get rid of the hidden characters that
+ // show up in the codmirror as red dots
+ return line;
+ },
// adds anchor tags and tooltips to host status lines
getAnchorTags: function(event, line){
if(event.event.indexOf("runner_") === -1){
return line;
}
else{
- return `${line}`;
+ return `${line}`;
}
},
@@ -126,7 +157,7 @@ export default ['$log', function($log){
data-uuid="${clickClass}">
`;
- console.log(expandDom);
+ // console.log(expandDom);
return expandDom;
} else {
// non-header lines don't get an expander