Class: GroundControl::Inertia::QueuesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- GroundControl::Inertia::QueuesController
- Defined in:
- app/controllers/ground_control/inertia/queues_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/controllers/ground_control/inertia/queues_controller.rb', line 6 def index queues = ActiveJob.queues.sort_by(&:name) render inertia: page("queues/index"), props: { queues: serialize(GroundControl::Api::QueueResource.new(queues)), features: adapter_features } end |
#show ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/ground_control/inertia/queues_controller.rb', line 15 def show queue = ActiveJob.queues[params[:id]] page_obj = MissionControl::Jobs::Page.new(queue.jobs, page: params[:page].to_i, page_size: GroundControl::Api.page_size) render inertia: page("queues/show"), props: { queue: serialize(GroundControl::Api::QueueResource.new(queue)), jobs: serialize(GroundControl::Api::PageResource.new(page_obj, inner_resource_class: GroundControl::Api::JobResource)) } end |