1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

changing the codemirror on the host event modal for custom stdout

more style changes to host event stdout
This commit is contained in:
jaredevantabor 2016-11-23 16:13:43 -08:00
parent d77cc5c984
commit 1d3737d553
5 changed files with 53 additions and 7 deletions

View File

@ -37,10 +37,9 @@
<!-- end of details-->
<div class="HostEvent-nav">
<!-- view navigation buttons -->
<button ui-sref="jobDetail.host-event.json" type="button" class="btn btn-sm btn-default HostEvent-tab" ng-class="{'HostEvent-tab--selected' : isActiveState('jobDetail.host-event.json')}">JSON</button>
<button ng-if="stdout" ui-sref="jobDetail.host-event.stdout" type="button" class="btn btn-sm btn-default HostEvent-tab" ng-class="{'HostEvent-tab--selected' : isActiveState('jobDetail.host-event.stdout')}">Standard Out</button>
<button ng-if="stderr" ui-sref="jobDetail.host-event.stderr" type="button" class="btn btn-sm btn-default HostEvent-tab" ng-class="{'HostEvent-tab--selected' : isActiveState('jobDetail.host-event.stderr')}">Standard Error</button>
<button ui-sref="jobDetail.host-event.json" type="button" class="btn btn-sm btn-default HostEvent-tab" ng-class="{'HostEvent-tab--selected' : isActiveState('jobDetail.host-event.json')}">JSON</button>
</div>
<div class="HostEvent-body">
<!-- views -->

View File

@ -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;
}

View File

@ -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){

View File

@ -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')
};

View File

@ -69,7 +69,7 @@ export default ['$log', 'moment', function($log, moment){
return line;
}
else{
return `<a ui-sref="jobDetail.host-event.json({eventId: ${event.id}, taskId: ${event.parent} })" aw-tool-tip="Event ID: ${event.id} <br>Status: ${event.event_display} <br>Click for details" data-placement="top">${line}</a>`;
return `<a ui-sref="jobDetail.host-event.stdout({eventId: ${event.id}, taskId: ${event.parent} })" aw-tool-tip="Event ID: ${event.id} <br>Status: ${event.event_display} <br>Click for details" data-placement="top">${line}</a>`;
}
},