Class: ForemanInventoryUpload::ReportsController

Inherits:
ApplicationController
  • Object
show all
Includes:
InventoryUpload::ReportActions
Defined in:
app/controllers/foreman_inventory_upload/reports_controller.rb

Instance Method Summary collapse

Methods included from InventoryUpload::ReportActions

#report_file, #start_report_generation

Instance Method Details

#generateObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/foreman_inventory_upload/reports_controller.rb', line 7

def generate
  organization_id = validate_organization_id
  return if performed?

  disconnected = boolean_param(:disconnected)

  task = start_report_generation(organization_id, disconnected)

  render json: {
    id: task.id,
    humanized: {
      action: task.action,
    },
  }, status: :ok
end