<%= job_invocation_chart(job_invocation) %>
<%= _('Target hosts') %>
<% if job_invocation.bookmark.present? %>
<%= _('Bookmark') %> <%= job_invocation.bookmark.name %>
<% else %>
<%= _('Manual selection') %>
<% end %>
<%= 'using ' + _(Targeting::TYPES[job_invocation.targeting.targeting_type]) %>
<%= job_invocation.targeting.search_query %>
<%= _('Evaluated at:') %> <%= job_invocation.targeting.resolved_at %>
<% if job_invocation.pattern_template_invocations.size > 1 %>
<% job_invocation.pattern_template_invocations.each do |template_invocation| %>
<%= host_counter template_invocation.template.provider.humanized_name, ForemanTasks::Task::DynflowTask.for_action(Actions::RemoteExecution::RunHostJob).for_resource(template_invocation).uniq.size %>
<% end %>
<% end %>
<%= host_counter(_('Total hosts'), job_invocation.total_hosts_count) %>
<%= _('Providers and templates') %>
<% job_invocation.pattern_template_invocations.each do |template_invocation| %>
<%= template_invocation.template.name %> <%= 'through' %> <%= template_invocation.template.provider.humanized_name %>
<% target = template_invocation.targeting.hosts.with_os.first || template_invocation.targeting.hosts.first %>
<%= _('Preview for target %s') % target.try(:name) || 'N/A' %>
<%= preview_box(template_invocation, target) %>
<% if template_invocation.input_values.present? %>
<%= _('following user inputs were provided') %>
<% template_invocation.input_values.joins(:template_input).each do |input_value| %>
- <%= input_value.template_input.name %>: <%= trunc_with_tooltip(input_value.value, 255) %>
<% end %>
<% end %>
<% if template_invocation.effective_user %>
<%= _("Effective user") %>: <%= template_invocation.effective_user %>
<% end %>
<% end %>