Sha256: 7ae0b920760b280b5bd0a7733f8fa987f25e0d5693940dd6334e8d8cf0e9c3b2

Contents?: true

Size: 1.7 KB

Versions: 6

Compression:

Stored size: 1.7 KB

Contents

Rails.application.routes.draw do
  namespace :foreman_inventory_upload do
    get ':organization_id/reports/last', to: 'reports#last', constraints: { organization_id: %r{[^\/]+} }
    post ':organization_id/reports', to: 'reports#generate', constraints: { organization_id: %r{[^\/]+} }
    get ':organization_id/uploads/last', to: 'uploads#last', constraints: { organization_id: %r{[^\/]+} }
    get ':organization_id/uploads/file', to: 'uploads#download_file', constraints: { organization_id: %r{[^\/]+} }
    get 'accounts', to: 'accounts#index'
    get 'settings', to: 'uploads_settings#index'
    post 'setting', to: 'uploads_settings#set_advanced_setting'

    post 'cloud_connector', to: 'uploads#enable_cloud_connector'

    resources :tasks, only: [:create, :show]
  end

  namespace :insights_cloud do
    resources :tasks, only: [:create]
    resource :settings, only: [:show, :update]
    resources :hits, except: %i[show] do
      collection do
        get 'auto_complete_search'
        get 'resolutions', to: 'hits#resolutions'
      end
    end
    match 'hits/:host_id', to: 'hits#show', via: :get
    post 'save_token_and_sync', to: 'settings#save_token_and_sync'
  end

  namespace :foreman_rh_cloud do
    get 'inventory_upload', to: '/react#index'
    get 'insights_cloud', to: '/react#index' # Uses foreman's react controller
  end

  scope :module => :'insights_cloud/api', :path => :redhat_access do
    scope 'r/insights/v1' do
      get 'branch_info', to: 'machine_telemetries#branch_info'
    end

    scope '/r/insights' do
      match '/*path', :constraints => lambda { |req| !req.path.include?('view/api') }, to: 'machine_telemetries#forward_request', via: [:get, :post, :delete,:put, :patch]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_rh_cloud-3.0.22 config/routes.rb
foreman_rh_cloud-4.0.22 config/routes.rb
foreman_rh_cloud-4.0.21.1 config/routes.rb
foreman_rh_cloud-3.0.21.1 config/routes.rb
foreman_rh_cloud-3.0.21 config/routes.rb
foreman_rh_cloud-3.0.20 config/routes.rb