foreman/app/views/hosts/_selected_hosts.html.erb @ beab18ed
49338863 | Amos Benari | <div class="row">
|
|
bf4a13d3 | Walden Raines | <div class="col-md-8">
|
|
82e47ae0 | Amos Benari | <table class="table table-bordered table-striped">
|
|
49338863 | Amos Benari | <thead>
|
|
<tr>
|
|||
e77dd577 | Shimon Shtein | <th>
|
|
beab18ed | amirfefer | <%= _("Name") %>
|
|
e77dd577 | Shimon Shtein | </th>
|
|
<th>
|
|||
beab18ed | amirfefer | <%= _("Host group") %>
|
|
e77dd577 | Shimon Shtein | </th>
|
|
<th>
|
|||
beab18ed | amirfefer | <%= _("Environment") %>
|
|
e77dd577 | Shimon Shtein | </th>
|
|
bfbf7ed8 | Lukas Zapletal | <%= raw("<th>" + _("Location") + "</th>") if SETTINGS[:locations_enabled]%>
|
|
<%= raw("<th>" + _("Organization") + "</th>") if SETTINGS[:organizations_enabled]%>
|
|||
49338863 | Amos Benari | </tr>
|
|
</thead>
|
|||
<tbody>
|
|||
d5896a14 | Daniel Lobato | <% associations = [:hostgroup, :environment] %>
|
|
<% associations << :organization if SETTINGS[:organizations_enabled] %>
|
|||
<% associations << :location if SETTINGS[:locations_enabled] %>
|
|||
<% hosts.includes(*associations).each do |host| %>
|
|||
29972d83 | Amos Benari | <tr>
|
|
e77dd577 | Shimon Shtein | <td><%=h host %>
|
|
</td>
|
|||
49338863 | Amos Benari | <td><%=h host.try(:hostgroup) %></td>
|
|
<td><%=h host.try(:environment) %></td>
|
|||
a6bbe3d7 | Ohad Levy | <% if SETTINGS[:locations_enabled]%>
|
|
e77dd577 | Shimon Shtein | <td><%=h host.try(:location) %></td>
|
|
a6bbe3d7 | Ohad Levy | <% end %>
|
|
<% if SETTINGS[:organizations_enabled]%>
|
|||
e77dd577 | Shimon Shtein | <td><%=h host.try(:organization) %></td>
|
|
a6bbe3d7 | Ohad Levy | <% end %>
|
|
49338863 | Amos Benari | </tr>
|
|
4d4557e9 | Joseph Magen | <% end %>
|
|
49338863 | Amos Benari | </tbody>
|
|
</table>
|
|||
</div>
|
|||
</div>
|