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

Merge pull request #6319 from marshmalien/fix/hideEmptyStdTabs

Hide Job Modal Standard Out and Err tabs when stdout == ""
This commit is contained in:
Marliana Lara 2017-05-23 09:49:43 -04:00 committed by GitHub
commit 27369aebe9

View File

@ -40,6 +40,7 @@
$scope.closeHostEvent = function() {
// Unbind the listener so it doesn't fire when we close the modal via navigation
$('#HostEvent').off('hidden.bs.modal');
$('#HostEvent').modal('hide');
$state.go('jobDetail');
};
@ -51,8 +52,8 @@
// event's "res" object, for things like Ansible modules
try{
$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.stdout = (hostEvent.event_data.res.stdout === "" || " ") ? undefined : hostEvent.event_data.res.stdout;
$scope.stderr = (hostEvent.event_data.res.stderr === "" || " ") ? undefined : hostEvent.event_data.res.stderr;
$scope.json = hostEvent.event_data.res;
}
catch(err){