Current section

Files

Jump to
step_flow lib step_flow controllers durations_controller.ex
Raw

lib/step_flow/controllers/durations_controller.ex

defmodule StepFlow.DurationsController do
use StepFlow, :controller
@moduledoc false
alias StepFlow.Statistics.Durations
def list_jobs_durations(conn, params) do
durations = Durations.list_durations_for_jobs(params)
conn
|> put_view(StepFlow.DurationsView)
|> render("index.json", durations: durations)
end
def list_workflows_durations(conn, params) do
durations = Durations.list_durations_for_workflows(params)
conn
|> put_view(StepFlow.DurationsView)
|> render("index.json", durations: durations)
end
end