Sha256: 96315197cac81ede2bea8f9987f2b0dbb32379ad3ded823ac482dd6a18c3be8f

Contents?: true

Size: 783 Bytes

Versions: 8

Compression:

Stored size: 783 Bytes

Contents

module ForemanXen
  module HostHelperExtensions
    extend ActiveSupport::Concern

    included do
      alias_method_chain :host_title_actions, :xen_snap_button
    end

    def host_title_actions_with_xen_snap_button(*args)
      unless @host.compute_resource.nil?
        if @host.compute_resource.type == 'ForemanXen::Xenserver'
          title_actions(
            button_group(
              link_to(
                _('Xen Snapshots'),
                "../foreman_xen/snapshots/#{@host.id}/",
                :title => _('Manage machine snapshots'),
                :id    => :xen_snap_button,
                :class => 'btn btn-default'
              )
            )
          )
        end
      end
      host_title_actions_without_xen_snap_button(*args)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foreman_xen-0.5.4 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.5.3 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.5.2 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.5.1 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.5.0 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.3.2 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.4.1 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.4.0 app/models/concerns/foreman_xen/host_helper_extensions.rb