Sha256: eff3ee155a8ceb8cc671bb5e3cc366f6d95cea65fdd8a510a939a922c92c4a3e

Contents?: true

Size: 511 Bytes

Versions: 2

Compression:

Stored size: 511 Bytes

Contents

module DiscoveryHomeHelperPatch
  def self.included(base)
    base.send(:include, InstanceMethods)

    base.class_eval do
      alias_method_chain :setting_options, :discovers_link
    end
  end

  module InstanceMethods
    # Adds a discovers link to the More menu
    def setting_options_with_discovers_link
      choices = setting_options_without_discovers_link
      choices += [
        [:divider],
        ['Discovered Hosts', :discovers]
      ]
      authorized_menu_actions(choices)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0.rc2 lib/discovery_home_helper_patch.rb
foreman_discovery-1.0.0.rc1 lib/discovery_home_helper_patch.rb