|
<% title "Puppet classes" %>
|
|
|
|
<% title_actions import_proxy_select(hash_for_import_environments_puppetclasses_path), button_group(display_link_if_authorized("New Puppetclass", hash_for_new_puppetclass_path)) %>
|
|
|
|
<table class="table table-bordered table-striped">
|
|
<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>
|
|
<% puppetclass.environments.uniq.each do |environment| -%>
|
|
<%= link_to_function environment, 'show_rdoc(this)', :'data-url' => rdoc_classes_path(environment, puppetclass.name) %>
|
|
<% end %>
|
|
</td>
|
|
<td><%= puppetclass.hostgroups.map {|hg| link_to_if_authorized hg, hash_for_edit_hostgroup_path(:id=>hg)}.to_sentence.html_safe %></td>
|
|
<td> <%= link_to host_counter(puppetclass), hosts_path(:search => "class = #{puppetclass.name}")%></td>
|
|
<td><%= @keys_counter[puppetclass.name] || 0 %> </td>
|
|
<td>
|
|
<%= display_delete_if_authorized hash_for_puppetclass_path(:id => puppetclass), :confirm => "Delete #{puppetclass.name}?" %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
|
|
<%= page_entries_info @puppetclasses %>
|
|
<%= will_paginate @puppetclasses %>
|