<% if job_invocation.resolved? %> <%= form_with url: job_invocation_path(job_invocation), method: "get", id: "search-form" do |f| %>
<%= autocomplete_f(f, :search, value: params[:search].try(:squeeze, " "), placeholder: _("Filter") + ' ...', path: hosts_path, only_input: true) %>
<% end %>
<% hosts.each do |host| %> <% template_invocation = job_invocation.template_invocations.find { |template_invocation| template_invocation.host_id == host.id } %> <% task = template_invocation.try(:run_host_job_task) %> <% options = { :host => host, :task => task, :job_invocation => job_invocation, :template_invocation => template_invocation } %> <%= render 'host_name_td', options %> <%= render 'host_status_td', options %> <%= render 'host_actions_td', options %> <% end %>
<%= sort :name, :as => _('Host') %> <%= _('Status') %> <%= _('Actions') %>
<%= will_paginate_with_info @hosts, :container => true %> <% else %>
<%= _("The dynamic query '%{query}' was not resolved yet. The list of hosts to which it would resolve now can be seen %{here}." % { :query => job_invocation.targeting.search_query, :here => link_to(_('here'), hosts_url(:search => job_invocation.targeting.search_query))}) %>
<% end %>