Module: ForemanRemoteExecution::HostsHelperExtensions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb
Instance Method Summary collapse
- #host_title_actions_with_run_button(*args) ⇒ Object
- #multiple_actions_with_remote_execution ⇒ Object
- #schedule_job_button(*args) ⇒ Object
- #schedule_job_multi_button(*args) ⇒ Object
Instance Method Details
#host_title_actions_with_run_button(*args) ⇒ Object
30 31 32 33 |
# File 'app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb', line 30 def (*args) title_actions(((*args))) (*args) end |
#multiple_actions_with_remote_execution ⇒ Object
10 11 12 |
# File 'app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb', line 10 def multiple_actions_with_remote_execution multiple_actions_without_remote_execution + [ [_('Schedule Remote Job'), new_job_invocation_path, false] ] end |
#schedule_job_button(*args) ⇒ Object
26 27 28 |
# File 'app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb', line 26 def (*args) link_to(_('Schedule Remote Job'), new_job_invocation_path(:host_ids => [args.first.id]), :id => :run_button, :class => 'btn btn-default') end |
#schedule_job_multi_button(*args) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb', line 14 def (*args) host_features = RemoteExecutionFeature..order(:label).map do |feature| link_to(_('%s') % feature.name, job_invocations_path(:host_ids => [args.first.id], :feature => feature.label), :method => :post) end if host_features.present? ((*args), *host_features) else (*args) end end |