<% title _("Puppet Classes") %> <% title_actions import_proxy_select(hash_for_import_environments_puppetclasses_path.merge(engine: foreman_puppet)), documentation_button('4.2.2Classes') %> <% for puppetclass in @puppetclasses %> <% end %>
<%= sort :name, as: s_("Puppetclass|Name") %> <%= sort :environment, as: _("Environments") %> <%= _('Host Groups') %> <%= _('Hosts') %> <%= _('Parameters') %> <%= _("Actions") %>
<%= link_to_if_authorized puppetclass.name, hash_for_edit_puppetclass_path(id: puppetclass).merge(engine: foreman_puppet, auth_object: puppetclass, authorizer: authorizer) %> <%= puppetclass.environments.uniq.to_sentence %> <%= puppetclass.all_hostgroups(with_descendants: false).map do |hg| link_to_if_authorized trunc_with_tooltip(hg, 24), main_app.hash_for_edit_hostgroup_path(id: hg).merge(auth_object: hg, authorizer: @hostgroups_authorizer) end.to_sentence.html_safe %> <%= link_to puppetclass.hosts_count, main_app.hosts_path(search: "class = #{puppetclass.name}")%> <%= puppetclass.class_params.size %> <% links = [display_delete_if_authorized(hash_for_puppetclass_path(id: puppetclass).merge(engine: foreman_puppet, auth_object: puppetclass, authorizer: authorizer), data: { confirm: _("Delete %s?") % puppetclass.name }, action: :delete)] links.push(display_link_if_authorized(_('Override all parameters'), hash_for_override_puppetclass_path(enable: true, id: puppetclass).merge(engine: foreman_puppet, auth_object: puppetclass, authorizer: authorizer, permission: 'edit_puppetclasses'), method: :post, data: { confirm: _("This will set all parameters of the class %s as overridden. Continue?") % puppetclass.name })) if puppetclass.class_params.present? && !overridden?(puppetclass) links.push(display_link_if_authorized(_('Set parameters to defaults'), hash_for_override_puppetclass_path(enable: false, id: puppetclass).merge(engine: foreman_puppet, auth_object: puppetclass, authorizer: authorizer, permission: 'edit_puppetclasses'), method: :post, data: { confirm: _("This will reset parameters of the class %s to their default values. Continue?") % puppetclass.name })) if puppetclass.class_params.present? && overridden?(puppetclass) %> <%= action_buttons(*links) %>
<%= will_paginate_with_info @puppetclasses %>