Class: ChronoForge::Dashboard::WorkflowsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/chrono_forge/dashboard/workflows_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
6
7
8
9
10
11
# File 'app/controllers/chrono_forge/dashboard/workflows_controller.rb', line 4

def index
  @query = WorkflowsQuery.new(**list_params)
  @workflows = @query.records
  @waits = WaitStatePresenter.active_map(@workflows)
  stats = StatsQuery.new
  @stats = stats.counts
  @stats_cap = stats.cap
end

#showObject



13
14
15
16
17
18
19
20
21
# File 'app/controllers/chrono_forge/dashboard/workflows_controller.rb', line 13

def show
  @workflow = ChronoForge::Workflow.find(params[:id])
  @timeline = TimelinePresenter.new(@workflow)
  @context = ContextPresenter.new(@workflow)
  @wait = WaitStatePresenter.new(@workflow).active
  @periodic = PeriodicHealthPresenter.new(@workflow).tasks
  @branches = BranchesPresenter.new(@workflow)
  @parent_log = @workflow.parent_execution_log
end