Class: ForemanInventoryUpload::UploadsController
Instance Method Summary
collapse
#report_file, #start_report_generation
Instance Method Details
#download_file ⇒ Object
8
9
10
11
12
|
# File 'app/controllers/foreman_inventory_upload/uploads_controller.rb', line 8
def download_file
filename, file = report_file(params[:organization_id])
send_file file, disposition: 'attachment', filename: filename
end
|
#enable_cloud_connector ⇒ Object
14
15
16
17
18
19
20
|
# File 'app/controllers/foreman_inventory_upload/uploads_controller.rb', line 14
def enable_cloud_connector
Setting[:allow_auto_inventory_upload] = true
cloud_connector = ForemanRhCloud::CloudConnector.new
render json: cloud_connector.install.to_json
end
|