Merge pull request #5578 from jaredevantabor/host-event-stdout

host event stdout changes
This commit is contained in:
Jared Tabor 2017-02-28 12:36:00 -08:00 committed by GitHub
commit 5592d44ec1
3 changed files with 8 additions and 5 deletions

View File

@ -33,7 +33,7 @@
</div>
<div class="HostEvent-field">
<span class="HostEvent-field--label">MODULE</span>
<span class="HostEvent-field--content">{{module_name}}</span>
<span class="HostEvent-field--content HostEvent-field--monospaceContent">{{module_name}}</span>
</div>
</div>

View File

@ -126,6 +126,9 @@
max-width: 13em;
flex: 0 1 13em;
}
.HostEvent-field--monospaceContent{
font-family: monospace;
}
.HostEvent-details--left, .HostEvent-details--right{
flex: 1 1 47%;
}
@ -175,7 +178,7 @@
border-right: 1px solid #ccc;
border-bottom-left-radius: 5px;
color: #999;
font-family: monospace;
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
position: fixed;
padding: 4px 3px 0 5px;
text-align: right;

View File

@ -52,9 +52,9 @@
// grab standard out & standard error if present from the host
// event's "res" object, for things like Ansible modules
try{
$scope.module_name = hostEvent.event_data.res.invocation.module_name || hostEvent.event_data.task_action || "No result found";
$scope.stdout = hostEvent.event_data.res.stdout;
$scope.stderr = hostEvent.event_data.res.stderr;
$scope.module_name = hostEvent.event_data.task_action || "No result found";
$scope.stdout = hostEvent.event_data.res.stdout ? hostEvent.event_data.res.stdout : hostEvent.event_data.res.stdout === "" ? " " : undefined;
$scope.stderr = hostEvent.event_data.res.stderr ? hostEvent.event_data.res.stderr : hostEvent.event_data.res.stderr === "" ? " " : undefined;
$scope.json = hostEvent.event_data.res;
}
catch(err){