From 1d3737d5536c9f389b03a2b8369c07972d8bf115 Mon Sep 17 00:00:00 2001 From: jaredevantabor Date: Wed, 23 Nov 2016 16:13:43 -0800 Subject: [PATCH] changing the codemirror on the host event modal for custom stdout more style changes to host event stdout --- .../host-event/host-event-modal.partial.html | 3 +- .../host-event/host-event.block.less | 48 ++++++++++++++++++- .../host-event/host-event.controller.js | 3 +- .../host-event/host-event.route.js | 4 +- .../src/job-results/parse-stdout.service.js | 2 +- 5 files changed, 53 insertions(+), 7 deletions(-) diff --git a/awx/ui/client/src/job-results/host-event/host-event-modal.partial.html b/awx/ui/client/src/job-results/host-event/host-event-modal.partial.html index 7f5b750eaa..c81beb718c 100644 --- a/awx/ui/client/src/job-results/host-event/host-event-modal.partial.html +++ b/awx/ui/client/src/job-results/host-event/host-event-modal.partial.html @@ -37,10 +37,9 @@
- - +
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 f9eff87d5c..218792a477 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 @@ -105,8 +105,9 @@ margin-bottom: 8px; } .HostEvent .modal-body{ - height: 480px; + max-height: 500px; padding: 20px; + overflow-y: auto; } .HostEvent-nav{ padding-top: 12px; @@ -150,3 +151,48 @@ .HostEvent-button:disabled { pointer-events: all!important; } + +.HostEvent-stdout{ + height:200px; + width:100% +} + +.HostEvent-stdoutContainer { + height:200px; + overflow-y: scroll; + overflow-x: hidden; + border-radius: 5px; + border: 1px solid #ccc; + font-style: normal; +} + +.HostEvent-numberColumnPreload { + background-color: @default-no-items-bord; + height: 198px; + border-right: 1px solid #ccc; + width: 30px; + position: fixed; +} + +.HostEvent-numberColumn { + background-color: @default-no-items-bord; + border-right: 1px solid #ccc; + border-bottom-left-radius: 5px; + color: #999; + font-family: monospace; + position: fixed; + padding: 4px 3px 0 5px; + text-align: right; + white-space: nowrap; + width: 30px; +} + +.HostEvent-numberColumn--second{ + padding-top:0px; +} + +.HostEvent-stdoutColumn{ + margin-left: 46px; + padding-top: 4px; + font-family: monospace; +} 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 fcb0f62f73..707ccde385 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 @@ -45,13 +45,14 @@ }; var init = function(){ + hostEvent.event_name = hostEvent.event; $scope.event = _.cloneDeep(hostEvent); $scope.hostResults = hostResults; $scope.json = JobDetailService.processJson(hostEvent); // grab standard out & standard error if present, and remove from the results displayed in the details panel if (hostEvent.stdout){ - $scope.stdout = parseStdoutService.prettify(hostEvent.stdout, "unstyled"); + $scope.stdout = parseStdoutService.prettify(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 04d08e1399..728e75467d 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 @@ -44,14 +44,14 @@ var hostEventStdout = { name: 'jobDetail.host-event.stdout', url: '/stdout', controller: 'HostEventController', - templateUrl: templateUrl('job-results/host-event/host-event-codemirror') + templateUrl: templateUrl('job-results/host-event/host-event-stdout') }; var hostEventStderr = { name: 'jobDetail.host-event.stderr', url: '/stderr', controller: 'HostEventController', - templateUrl: templateUrl('job-results/host-event/host-event-codemirror') + templateUrl: templateUrl('job-results/host-event/host-event-stdout') }; 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 3607b0e3e3..7469333aae 100644 --- a/awx/ui/client/src/job-results/parse-stdout.service.js +++ b/awx/ui/client/src/job-results/parse-stdout.service.js @@ -69,7 +69,7 @@ export default ['$log', 'moment', function($log, moment){ return line; } else{ - return `${line}`; + return `${line}`; } },