Sha256: c4a31ca2b1c5a0602cd019fd5ba960872b6b7dae636b5040ccb56f3b34d6651a

Contents?: true

Size: 1.77 KB

Versions: 12

Compression:

Stored size: 1.77 KB

Contents

Rails.application.routes.draw do
  scope :salt, path: '/salt' do
    constraints(id: /[\w.-]+/) do
      get '/node/:id' => 'foreman_salt/minions#node'
      get '/run/:id'  => 'foreman_salt/minions#run'
    end

    resources :minions, controller: 'foreman_salt/minions', only: [] do
      collection do
        constraints(id: %r{[^/]+}) do
          put 'salt_environment_selected'
        end
      end
    end

    resources :salt_environments, controller: 'foreman_salt/salt_environments' do
      collection do
        get 'auto_complete_search'
      end
    end

    resources :salt_modules, controller: 'foreman_salt/salt_modules' do
      collection do
        get 'import'
        get 'auto_complete_search'
        post 'apply_changes'
      end
    end

    resources :salt_variables, controller: 'foreman_salt/salt_variables', except: [:show] do
      resources :lookup_values, only: %i[index create update destroy]
      collection do
        get 'auto_complete_search'
      end
    end
  end

  constraints(id: %r{[^/]+}) do
    resources :hosts do
      collection do
        post 'select_multiple_salt_master'
        post 'update_multiple_salt_master'
        post 'select_multiple_salt_environment'
        post 'update_multiple_salt_environment'
      end
    end
  end

  constraints(smart_proxy_id: %r{[^/]+}) do
    resources :smart_proxies, except: [:show] do
      constraints(id: %r{[^/]+}) do
        resources :salt_autosign, only: %i[index destroy create new], controller: 'foreman_salt/salt_autosign'
        resources :salt_keys, only: %i[index destroy], controller: 'foreman_salt/salt_keys' do
          get :accept
          get :reject
        end
      end
    end
  end

  resources :hostgroups do
    collection do
      post 'salt_environment_selected'
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
foreman_salt-17.0.0 config/routes.rb
foreman_salt-16.0.3 config/routes.rb
foreman_salt-16.0.2 config/routes.rb
foreman_salt-16.0.1 config/routes.rb
foreman_salt-16.0.0 config/routes.rb
foreman_salt-15.2.3 config/routes.rb
foreman_salt-15.2.2 config/routes.rb
foreman_salt-15.2.1 config/routes.rb
foreman_salt-15.2.0 config/routes.rb
foreman_salt-15.1.0 config/routes.rb
foreman_salt-15.0.0 config/routes.rb
foreman_salt-14.1.0 config/routes.rb