Class: SolidQueueMonitor::JobDetailsPresenter

Inherits:
BasePresenter show all
Defined in:
app/presenters/solid_queue_monitor/job_details_presenter.rb

Instance Method Summary collapse

Methods inherited from BasePresenter

#calculate_visible_pages, #default_url_options, #engine_mount_point, #filter_query_string, #format_arguments, #format_datetime, #format_hash, #generate_pagination, #queue_link, #request_path, #section_wrapper, #sort_arrow, #sortable_header

Constructor Details

#initialize(job, failed_execution: nil, claimed_execution: nil, scheduled_execution: nil, recent_executions: [], back_path: nil, nonce: nil) ⇒ JobDetailsPresenter

Returns a new instance of JobDetailsPresenter.



5
6
7
8
9
10
11
12
13
14
15
# File 'app/presenters/solid_queue_monitor/job_details_presenter.rb', line 5

def initialize(job, failed_execution: nil, claimed_execution: nil, scheduled_execution: nil,
               recent_executions: [], back_path: nil, nonce: nil)
  @job = job
  @failed_execution = failed_execution
  @claimed_execution = claimed_execution
  @scheduled_execution = scheduled_execution
  @recent_executions = recent_executions
  @back_path = back_path
  @nonce = nonce
  calculate_timing
end

Instance Method Details

#renderObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'app/presenters/solid_queue_monitor/job_details_presenter.rb', line 17

def render
  <<-HTML
    <div class="job-details-page">
      #{render_back_link}
      #{render_header}
      #{render_timeline}
      #{render_timing_cards}
      #{render_error_section if @failed_execution}
      #{render_arguments_section}
      #{render_details_section}
      #{render_worker_section if @claimed_execution}
      #{render_recent_executions}
      #{render_raw_data_section}
    </div>
  HTML
end