Module: PuppetdbForeman::HostsHelperExtensions::Overrides

Defined in:
app/helpers/concerns/puppetdb_foreman/hosts_helper_extensions.rb

Instance Method Summary collapse

Instance Method Details

#show_appropriate_host_buttons(host) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/helpers/concerns/puppetdb_foreman/hosts_helper_extensions.rb', line 8

def show_appropriate_host_buttons(host)
  buttons = super

  if host.puppet_proxy_id?
    buttons << link_to_if_authorized(
      _('Puppet Classes'),
      hash_for_puppetdb_foreman_node_path(id: host.name),
      title: _('Browse host puppet classes'),
      class: 'btn btn-default'
    )
  end

  buttons.compact
end