Sha256: dc5ab06ca0b964605c1cc5c77bd4e114468e64903b5cb5a186487c4d606a3147

Contents?: true

Size: 1.26 KB

Versions: 1

Compression:

Stored size: 1.26 KB

Contents

<% if job_invocation.targeting.resolved_at %>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
    <tr>
      <th><%= _('Host') %></th>
      <th><%= _('Provider') %></th>
      <th><%= _('Status') %></th>
      <th><%= _('Actions') %></th>
    </tr>
    </thead>

    <tbody>
      <% job_invocation.targeting.hosts.each do |host| %>
        <tr>
          <% task = job_invocation.sub_tasks.joins(:locks).where("#{ForemanTasks::Lock.table_name}.resource_type" => 'Host::Managed', "#{ForemanTasks::Lock.table_name}.resource_id" => host.id).first %>
          <td><%= link_to_if_authorized host.name, hash_for_host_path(host).merge(:auth_object => host, :permission => :view_hosts) %></td>
          <td><%= remote_execution_provider_for(task) %></td>
          <td><%= template_invocation_status(task) %></td>
          <td><%= action_buttons(template_invocation_actions(task, host)) %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% 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

1 entries across 1 versions & 1 rubygems

Version Path
foreman_remote_execution-0.0.7 app/views/job_invocations/_tab_hosts.html.erb