Module: ForemanSalt::HostsHelperExtensions

Extended by:
ActiveSupport::Concern
Defined in:
app/helpers/concerns/foreman_salt/hosts_helper_extensions.rb

Instance Method Summary collapse

Instance Method Details

#host_title_actions_with_salt_run(host) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'app/helpers/concerns/foreman_salt/hosts_helper_extensions.rb', line 16

def host_title_actions_with_salt_run(host)
    title_actions(
      button_group(
        if host.try(:salt_proxy)
          link_to_if_authorized(_("Run Salt"), {:controller => :hosts, :action => :saltrun, :id => @host},
                                :title => _("Trigger a state.highstate run on a node"))
        end
      )
    )
    host_title_actions_without_salt_run(host)
end

#show_appropriate_host_buttons_with_salt(host) ⇒ Object



10
11
12
13
14
# File 'app/helpers/concerns/foreman_salt/hosts_helper_extensions.rb', line 10

def show_appropriate_host_buttons_with_salt(host)
  (show_appropriate_host_buttons_without_salt(host) +
     [(link_to_if_authorized(_("Salt ENC"), {:controller => :hosts, :action => :salt_external_node, :name => host},
     :title => _("Salt external nodes YAML dump"), :class => 'btn btn-default') unless host.salt_master.blank?)]).flatten.compact
end