|
<% title "Puppet classes" %>
|
|
|
|
<span class="title_action">
|
|
<%= display_link_if_authorized "New Puppetclass", hash_for_new_puppetclass_path %>
|
|
<%= display_link_if_authorized "Import new puppet classes and environments", hash_for_import_environments_puppetclasses_path %>
|
|
</span>
|
|
|
|
<table class="list">
|
|
<tr>
|
|
<th><%= sort :name %></th>
|
|
<th><%= sort :environment, :as => "Environments" %>and documentation</th>
|
|
<th>Host Group</th>
|
|
<th>Hosts</th>
|
|
<th>Keys</th>
|
|
<th></th>
|
|
</tr>
|
|
<% for puppetclass in @puppetclasses %>
|
|
<tr class="<%= cycle("even", "odd") -%>">
|
|
<td><%=link_to_if_authorized h(puppetclass.name), hash_for_edit_puppetclass_path(:id => puppetclass) %></td>
|
|
<td>
|
|
<% for environment in puppetclass.environments -%>
|
|
<%= link_to h(environment), "#", :onclick => rdoc_classes_path(environment, puppetclass.name) %>
|
|
<% end %>
|
|
</td>
|
|
<td><%= puppetclass.hostgroups.map {|hg| link_to hg, hostgroup_path(hg)}.to_sentence %></td>
|
|
<td> <%= link_to host_counter(puppetclass), hosts_path(:search => "class = #{puppetclass.name}")%></td>
|
|
<td>
|
|
<%= link_to puppetclass.lookup_keys.count, puppetclass_lookup_keys_path(puppetclass) %>
|
|
</td>
|
|
<td class="ra">
|
|
<%= display_link_if_authorized "Destroy", hash_for_puppetclass_path(:id => puppetclass, :auth_action => :destroy), :confirm => "Delete #{puppetclass.name}?", :method => :delete %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
|
|
<%= page_entries_info @puppetclasses %>
|
|
<%= will_paginate @puppetclasses %>
|