Sha256: 9eb3cf8e636e5f9bc946df0ec8418db64f75fc9699e90d2c629d372b9cf4f7c7

Contents?: true

Size: 1.93 KB

Versions: 10

Compression:

Stored size: 1.93 KB

Contents

<% if job_invocation.resolved? %>
  <%= form_with url: job_invocation_path(job_invocation), method: "get", id: "search-form" do |f| %>
    <div class="row">
      <div class="title_filter col-md-6">
        <div class="input-group">
            <%= autocomplete_f(f, :search, value: params[:search].try(:squeeze, " "), placeholder: _("Filter") + ' ...', path: hosts_path, only_input: true) %>
            <span class="input-group-btn">
              <button class="btn btn-default" type="submit">
                <%= icon_text('search', content_tag(:span, _('Search'), :class => 'hidden-xs', :kind => 'fa')) %>
              </button>
            </span>
        </div>
      </div>
    </div>
  <% end %>
  <br>

  <table class="<%= table_css_classes('table-condensed') %>">
    <thead>
    <tr>
      <th><%= sort :name, :as => _('Host') %></th>
      <th><%= _('Status') %></th>
      <th><%= _('Actions') %></th>
    </tr>
    </thead>

    <tbody>
    <% 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) %>
      <tr>
        <% 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 %>
      </tr>
    <% end %>
    </tbody>
  </table>

  <%= will_paginate_with_info @hosts, :container => true %>
<% else %>
  <div class="alert alert-warning">
    <%=
        _("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))})
     %>
  </div>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
foreman_remote_execution-3.2.2 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-3.3.1 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-3.3.0 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-3.2.1 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-3.2.0 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-3.1.0 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-3.0.3 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-3.0.2 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-3.0.1 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-3.0.0 app/views/job_invocations/_tab_hosts.html.erb