Class: Toro::Monitor::JobsDatatable

Inherits:
AbstractDatatable show all
Defined in:
app/datatables/toro/monitor/jobs_datatable.rb

Instance Method Summary collapse

Methods inherited from AbstractDatatable

add_search_filter

Constructor Details

#initialize(view) ⇒ JobsDatatable

Returns a new instance of JobsDatatable.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/datatables/toro/monitor/jobs_datatable.rb', line 6

def initialize(view)
  @model_name = Toro::Job
  @columns = [
    'toro_jobs.id',
    'toro_jobs.started_by',
    'toro_jobs.queue',
    'toro_jobs.class_name',
    'toro_jobs.name',
    'toro_jobs.created_at',
    'toro_jobs.started_at',
    'COALESCE(toro_jobs.finished_at, NOW()) - toro_jobs.started_at',
    'toro_jobs.status',
    'toro_jobs.properties',
    'toro_jobs.args'
  ]
  @searchable_columns = [
    'toro_jobs.started_by',
    'toro_jobs.queue',
    'toro_jobs.class_name',
    'toro_jobs.args',
    'toro_jobs.status',
    'toro_jobs.name'
  ]
  super(view)
end