Class: ForemanInventoryUpload::UploadsController
  
  
  
  
  
    - Inherits:
 
    - 
      ApplicationController
      
        
          - Object
 
          
            - ApplicationController
 
          
            - ForemanInventoryUpload::UploadsController
 
          
        
        show all
      
     
  
  
  
  
  
  
  
      - Includes:
 
      - InventoryUpload::ReportActions
 
  
  
  
  
  
  
    - Defined in:
 
    - app/controllers/foreman_inventory_upload/uploads_controller.rb
 
  
  
 
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  #report_file, #start_report_generation
  
  
  
    Instance Method Details
    
      
  
  
    #download_file  ⇒ Object 
  
  
  
  
    
      
14
15
16
17
18 
     | 
    
      # File 'app/controllers/foreman_inventory_upload/uploads_controller.rb', line 14
def download_file
  filename, file = report_file(params[:organization_id])
  send_file file, disposition: 'attachment', filename: filename
end 
     | 
  
 
    
      
  
  
    #enable_cloud_connector  ⇒ Object 
  
  
  
  
    
      
20
21
22
23
24
25
26 
     | 
    
      # File 'app/controllers/foreman_inventory_upload/uploads_controller.rb', line 20
def enable_cloud_connector
    Setting[:allow_auto_inventory_upload] = true
  cloud_connector = ForemanRhCloud::CloudConnector.new
  render json: cloud_connector.install.to_json
end
     |