Class: MaintenanceTasks::TasksController Private

Inherits:
ApplicationController show all
Defined in:
app/controllers/maintenance_tasks/tasks_controller.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class handles rendering the maintenance_tasks page in the host application. It makes data about available, enqueued, performing, and completed tasks accessible to the views so it can be displayed in the UI.

Constant Summary

Constants inherited from ApplicationController

ApplicationController::BULMA_CDN

Instance Method Summary collapse

Instance Method Details

#indexObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Renders the maintenance_tasks/tasks page, displaying available tasks to users, grouped by category.



14
15
16
# File 'app/controllers/maintenance_tasks/tasks_controller.rb', line 14

def index
  @available_tasks = TaskDataIndex.available_tasks.group_by(&:category)
end

#showObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Renders the page responsible for providing Task actions to users. Shows running and completed instances of the Task.



20
21
22
23
24
25
26
# File 'app/controllers/maintenance_tasks/tasks_controller.rb', line 20

def show
  @task = TaskDataShow.prepare(
    params.fetch(:id),
    runs_cursor: params[:cursor],
    arguments: params.except(:id, :controller, :action).permit!,
  )
end