<% template_invocations = job_invocation.pattern_template_invocations %>
<%= render :partial => 'card_results', :locals => { :job_invocation => job_invocation } %> <%= render :partial => 'card_schedule', :locals => { :job_invocation => job_invocation } %>
<%= render :partial => 'card_target_hosts', :locals => { :job_invocation => job_invocation } %> <% template_invocations.each do |template_invocation| %> <%= minicard('user', template_invocation.effective_user || Setting[:remote_execution_effective_user], template_invocation.template.name + ' ' + _('effective user')) %>
<% missing = job_invocation.missing_hosts_count %> <% size = missing.zero? ? 12 : 6 %>
<%= minicard('cluster', job_invocation.total_hosts_count, _('Total hosts')) %>
<% unless missing.zero? %>
<%= minicard('warning-triangle-o', missing, _('Hosts gone missing'), :tooltip => _('This can happen if the host is removed or moved to another organization or location after the job was started')) %>
<% end %>
<% if template_invocation.input_values.present? %> <%= render :partial => 'card_user_input', :locals => { :template_invocation => template_invocation } %> <% end %> <% end %>

<% if job_invocation.resolved? %>
<%= render :partial => 'tab_hosts', :locals => { :job_invocation => job_invocation, :hosts => hosts } %>
<% else %>
<%= _("The dynamic query '#{job_invocation.targeting.search_query}' was not resolved yet. The list of hosts to which it would resolve now can be seen") %> <%= link_to('here.', hosts_url(:search => job_invocation.targeting.search_query)) %>
<% end %>