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

fixing module_name check and adding support for the debug module
This commit is contained in:
Jared Tabor 2017-02-27 08:44:44 -08:00 committed by GitHub
commit d72c79fb26

View File

@ -52,7 +52,7 @@
// 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.res.task_action || "No result found";
$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.json = hostEvent.event_data.res;
@ -60,6 +60,11 @@
catch(err){
// do nothing, no stdout/stderr for this module
}
if($scope.module_name === "debug" &&
hostEvent.event_data.res.hasOwnProperty('result') &&
hostEvent.event_data.res.result.hasOwnProperty('stdout')){
$scope.stdout = hostEvent.event_data.res.result.stdout;
}
if($scope.module_name === "yum" &&
hostEvent.event_data.res.hasOwnProperty('results') &&
_.isArray(hostEvent.event_data.res.results)){