Project

General

Profile

Download (1.28 KB) Statistics
| Branch: | Tag: | Revision:
<div class="row">
<div class="col-md-8">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
<%= _("Name") %>
</th>
<th>
<%= _("Host group") %>
</th>
<th>
<%= _("Environment") %>
</th>
<%= raw("<th>" + _("Location") + "</th>") if SETTINGS[:locations_enabled]%>
<%= raw("<th>" + _("Organization") + "</th>") if SETTINGS[:organizations_enabled]%>
</tr>
</thead>
<tbody>
<% associations = [:hostgroup, :environment] %>
<% associations << :organization if SETTINGS[:organizations_enabled] %>
<% associations << :location if SETTINGS[:locations_enabled] %>
<% hosts.includes(*associations).each do |host| %>
<tr>
<td><%=h host %>
</td>
<td><%=h host.try(:hostgroup) %></td>
<td><%=h host.try(:environment) %></td>
<% if SETTINGS[:locations_enabled]%>
<td><%=h host.try(:location) %></td>
<% end %>
<% if SETTINGS[:organizations_enabled]%>
<td><%=h host.try(:organization) %></td>
<% end %>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
(20-20/44)