Revision b09b4515
Added by Ohad Levy about 14 years ago
- ID b09b451583194c3bae7cafc2b5331f1319c4681a
Fixes #193 - move hosts controller away from AS
- Remove active scaffold from hosts controller.
- changed default host graphs from one day for up to one week
- added dynamic dropdown boxes for host creation / edit page (e.g. for puppet classes, operating systems etc).
- converted puppet class selection to a template, using it in hostgroups and hosts edit page.
- Renamed puppetgroups to hostgroups for consistency
- Added search option to list, this include search by facts as well
app/views/hosts/_minilist.html.erb | ||
---|---|---|
<div>
|
||
<div id="hostlist">
|
||
<% if hosts.size > 0 -%>
|
||
<table class="list">
|
||
<caption> <%= header -%> </caption>
|
||
<caption> <%= header ||= "" -%> </caption>
|
||
<tr>
|
||
<th>Name</th><th>Operatingsystem</th><th>Environment</th><th>Last Report</th><th>Edit</th>
|
||
<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>
|
Also available in: Unified diff