fixing module_name check and adding support for the debug module

This commit is contained in:
jaredevantabor 2017-02-27 08:33:53 -08:00
parent a1840863da
commit 683a1252c8

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