Sha256: c25139314eea815a9c29ca4194ecb8a7eed89251d096b631a7b10276cbbcf463

Contents?: true

Size: 1.81 KB

Versions: 3

Compression:

Stored size: 1.81 KB

Contents

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

  <table class="table table-bordered table-striped 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 %>
<% else %>
  <div class="alert alert-warning">
    <%= _("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)) %>
  </div>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_remote_execution-0.2.3 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-0.2.2 app/views/job_invocations/_tab_hosts.html.erb
foreman_remote_execution-0.2.1 app/views/job_invocations/_tab_hosts.html.erb