Sha256: 89206bc981cd165adc69d184f89e1666437e3aeaeddf6ab032916c97d023427b
Contents?: true
Size: 844 Bytes
Versions: 28
Compression:
Stored size: 844 Bytes
Contents
module ForemanInventoryUpload class UploadsController < ::ApplicationController include InventoryUpload::ReportActions def last label = ForemanInventoryUpload::Async::UploadReportJob.output_label(params[:organization_id]) output = ForemanInventoryUpload::Async::ProgressOutput.get(label)&.full_output render json: { output: output, }, status: :ok end def download_file filename, file = report_file(params[:organization_id]) send_file file, disposition: 'attachment', filename: filename end def enable_cloud_connector # Set the autoupload to true, since it's required by the feature. Setting[:allow_auto_inventory_upload] = true cloud_connector = ForemanRhCloud::CloudConnector.new render json: cloud_connector.install.to_json end end end
Version data entries
28 entries across 28 versions & 1 rubygems