Class: Ductwork::PipelinesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/ductwork/pipelines_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
# File 'app/controllers/ductwork/pipelines_controller.rb', line 5

def index
  @runs = query_pipeline_runs
  @klasses = Ductwork::Pipeline.group(:klass).pluck(:klass).sort
  @statuses = Ductwork::Pipeline.statuses.keys
end

#showObject



11
12
13
14
15
16
17
18
# File 'app/controllers/ductwork/pipelines_controller.rb', line 11

def show
  @pipeline = Ductwork::Pipeline.find(params[:id])
  @last_run = @pipeline.runs.order(started_at: :desc).first
  @per_page = 10
  @steps = query_steps
  @klasses = @last_run.steps.group(:klass).pluck(:klass).sort
  @statuses = Ductwork::Step.statuses.keys
end