Sha256: 7b5aa9a1911a22ade30b168dca122c1f6d5fbefd2c4f33347cd8fb71603a7951
Contents?: true
Size: 952 Bytes
Versions: 24
Compression:
Stored size: 952 Bytes
Contents
module ForemanRemoteExecution module HostsHelperExtensions def multiple_actions super + [ [_('Schedule Remote Job'), new_job_invocation_path, false] ] end def schedule_job_multi_button(*args) host_features = RemoteExecutionFeature.with_host_action_button.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? action_buttons(schedule_job_button(*args), *host_features) else schedule_job_button(*args) end end def schedule_job_button(*args) link_to(_('Schedule Remote Job'), new_job_invocation_path(:host_ids => [args.first.id]), :id => :run_button, :class => 'btn btn-default') end def host_title_actions(*args) title_actions(button_group(schedule_job_multi_button(*args))) super(*args) end end end
Version data entries
24 entries across 24 versions & 1 rubygems