Sha256: f94f23520de6d9387f257565bb2a52f7172453a4623e82129fa7f488fe3d7db7

Contents?: true

Size: 648 Bytes

Versions: 3

Compression:

Stored size: 648 Bytes

Contents

module ForemanRemoteExecution
  module HostsHelperExtensions
    extend ActiveSupport::Concern

    included do
      alias_method_chain(:host_title_actions, :run_button)
      alias_method_chain :multiple_actions, :remote_execution
    end

    def multiple_actions_with_remote_execution
      multiple_actions_without_remote_execution + [[_('Run Job'), new_job_invocation_path, false]]
    end

    def host_title_actions_with_run_button(*args)
      title_actions(button_group(link_to(_('Run Job'), new_job_invocation_path(:host_ids => [args.first.id]), :id => :run_button)))
      host_title_actions_without_run_button(*args)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_remote_execution-0.3.2 app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb
foreman_remote_execution-0.3.1 app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb
foreman_remote_execution-0.3.0 app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb