|
<div id="hostlist">
|
|
<% if hosts.size > 0 -%>
|
|
<strong><center><%= header ||= "" -%></center></strong><br/>
|
|
<table class="list">
|
|
<th colspan="8"><%= render "common/searchbar" %></th>
|
|
<tr>
|
|
<th><%= order @search, :by => :name %></th>
|
|
<th>Operating system</th>
|
|
<th>Environment</th>
|
|
<th>Model</th>
|
|
<th>Host Group</th>
|
|
<th><%= order @search, :by => :last_report %></th>
|
|
<th>Edit</th>
|
|
<th>Delete</th>
|
|
</tr>
|
|
<% hosts.each do |host| -%>
|
|
<tr class="<%= cycle("even", "odd") -%>">
|
|
<td><%=name_column(host) %></td>
|
|
<td><%=h host.try(:os) %></td>
|
|
<td><%=h host.try(:environment) %></td>
|
|
<td><%=h host.try(:model) %></td>
|
|
<td><%=h host.try(:hostgroup) %></td>
|
|
<td><%=last_report_column(host) %></td>
|
|
<td><%= link_to 'Edit', edit_host_url(host) %></td>
|
|
<td><%= link_to "Destroy", host, :confirm => 'Are you sure?', :method => :delete %></td>
|
|
<% end -%>
|
|
</tr>
|
|
</table>
|
|
<% end -%>
|
|
</div>
|
|
<%= page_entries_info hosts %>
|
|
<%= will_paginate hosts %>
|