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

View File

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