Sha256: 8da8467a065ba0b9b3d0021751804774cbbe53694117301c82ab11a23f2324a7

Contents?: true

Size: 935 Bytes

Versions: 37

Compression:

Stored size: 935 Bytes

Contents

module Support
  class DummyDynflowAction < Actions::EntryAction
  end

  class DummyPauseAction < Actions::EntryAction
    def plan
      plan_action(DummyPauseActionWithCustomTroubleshooting)
      plan_self
    end

    def run
      error! "This is an error"
    end
  end

  class DummyPauseActionWithCustomTroubleshooting < Actions::EntryAction
    def run
      error! "This is an error"
    end

    def troubleshooting_info
      ForemanTasks::TroubleshootingHelpGenerator::Info.new.tap do |i|
        i.add_line _('This task requires special handling.')
        i.add_link(ForemanTasks::TroubleshootingHelpGenerator::Link.new(
                     name: :custom_link,
                     title: _('custom link'),
                     href: "/additional_troubleshooting_page",
                     description: _("Investigate %{link} on more details for this custom error.")
                   ))
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
foreman-tasks-10.0.2 test/support/dummy_dynflow_action.rb
foreman-tasks-10.0.1 test/support/dummy_dynflow_action.rb
foreman-tasks-10.0.0 test/support/dummy_dynflow_action.rb
foreman-tasks-9.2.3 test/support/dummy_dynflow_action.rb
foreman-tasks-9.2.2 test/support/dummy_dynflow_action.rb
foreman-tasks-9.2.1 test/support/dummy_dynflow_action.rb
foreman-tasks-9.2.0 test/support/dummy_dynflow_action.rb
foreman-tasks-9.1.1 test/support/dummy_dynflow_action.rb
foreman-tasks-9.0.4 test/support/dummy_dynflow_action.rb
foreman-tasks-9.1.0 test/support/dummy_dynflow_action.rb
foreman-tasks-9.0.2 test/support/dummy_dynflow_action.rb
foreman-tasks-9.0.1 test/support/dummy_dynflow_action.rb
foreman-tasks-8.3.3 test/support/dummy_dynflow_action.rb
foreman-tasks-9.0.0 test/support/dummy_dynflow_action.rb
foreman-tasks-8.2.1 test/support/dummy_dynflow_action.rb
foreman-tasks-8.1.4 test/support/dummy_dynflow_action.rb
foreman-tasks-8.3.2 test/support/dummy_dynflow_action.rb
foreman-tasks-8.3.1 test/support/dummy_dynflow_action.rb
foreman-tasks-8.1.3 test/support/dummy_dynflow_action.rb
foreman-tasks-8.3.0 test/support/dummy_dynflow_action.rb