Fixes #6039 - CP events in CH tasks tab

This fix displays the candlepin events in content-host details task
sub-tab.
All `var`s should be declared on the first line of the function, see https://github.com/katello/katello/tree/master/engines/bastion#conventions