Project

General

Profile

Download (1.32 KB) Statistics
| Branch: | Tag: | Revision:

foreman_docker / config / routes.rb @ 401c0065

1 3eab3643 Daniel Lobato
Rails.application.routes.draw do
2 f880f56e Daniel Lobato
  resources :containers, :only => [:index, :new, :show, :destroy] do
3 387babdd Daniel Lobato
    member do
4
      post :commit
5 e6eb1c48 Dmitri Dolguikh
      put :power
6 387babdd Daniel Lobato
    end
7 6d101d7a Dmitri Dolguikh
  end
8
9
  resources :wizard_states, :only => [] do
10 221cfd7c Daniel Lobato
    resources :steps, :controller => 'containers/steps', :only => [:show, :update]
11 6d101d7a Dmitri Dolguikh
  end
12
13
  resources :image_search, :only => [] do
14 5274f6bc Daniel Lobato
    member do
15
      get :auto_complete_repository_name
16
      get :auto_complete_image_tag
17
      get :search_repository
18
    end
19 3eab3643 Daniel Lobato
  end
20 6d101d7a Dmitri Dolguikh
21 401c0065 Ivan Necas
  resources :registries, :except => [:show] do
22
    collection do
23
      get 'auto_complete_search'
24
    end
25
  end
26 5274f6bc Daniel Lobato
27 b8b23c15 David Davis
  scope path: '/docker', as: :foreman_docker do
28 5274f6bc Daniel Lobato
    namespace :api, :defaults => { :format => 'json' } do
29
      scope "(:apiv)", :module => :v2, :defaults => { :apiv => 'v2' }, :apiv => /v2/,
30
                       :constraints => ApiConstraints.new(:version => 2) do
31
        resources :containers, :only => [:index, :create, :show, :destroy] do
32
          member do
33
            get :logs
34
            put :power
35
          end
36
        end
37
        resources :compute_resources, :only => [] do
38
          resources :containers, :only => [:index, :create, :show, :destroy] do
39
            member do
40
              get :logs
41
              put :power
42
            end
43
          end
44
        end
45 d2e54db4 David Davis
        resources :registries, :except => [:new, :edit]
46 5274f6bc Daniel Lobato
      end
47
    end
48
  end
49 3eab3643 Daniel Lobato
end