foreman/config/routes.rb @ df886c98
5563217a | Ohad Levy | ActionController::Routing::Routes.draw do |map|
|
|
9eb0e160 | Ohad Levy | map.root :controller => "hosts"
|
|
b0b1ea21 | Ohad Levy | map.resources :reports, :collection => { :auto_complete_search => :get }
|
|
bc2625b5 | Ohad Levy | map.connect "node/:name", :controller => 'hosts', :action => 'externalNodes',
|
|
8b96913a | Frank Sweetser | :requirements => { :name => /[^\.][\w\.-]+/ }
|
|
456d537a | Martin Englund | map.resources :hosts,
|
|
86744a6b | Ohad Levy | :requirements => {:id => /[^\/]+/},
|
|
bd5e3385 | Ohad Levy | :member => { :report => :get, :clone => :get, :toggle_manage => :put,
|
|
86744a6b | Ohad Levy | :environment_selected => :post, :architecture_selected => :post, :os_selected => :post,
|
|
bd5e3385 | Ohad Levy | :storeconfig_klasses => :get, :externalNodes => :get, :setBuild => :get, :cancelBuild => :get,
|
|
:puppetrun => :get, :facts => :get, :pxe_config => :get },
|
|||
86744a6b | Ohad Levy | :collection => { :show_search => :get, :multiple_actions => :get, :multiple_parameters => :get,
|
|
1a51088d | Ohad Levy | :update_multiple_parameters => :post, :select_multiple_hostgroup => :get,
|
|
86744a6b | Ohad Levy | :update_multiple_hostgroup => :post, :select_multiple_environment => :get, :update_multiple_environment => :post,
|
|
1f927b16 | Paul Kelly | :multiple_destroy => :get, :submit_multiple_destroy => :post, :multiple_build => :get, :submit_multiple_build => :post,
|
|
86744a6b | Ohad Levy | :reset_multiple => :get, :multiple_disable => :get, :submit_multiple_disable => :post,
|
|
69f9cb82 | Ohad Levy | :multiple_enable => :get, :submit_multiple_enable => :post, :auto_complete_search => :get, :template_used => :get,
|
|
bd5e3385 | Ohad Levy | :query => :get, :active => :get, :out_of_sync => :get, :errors => :get, :disabled => :get } do |hosts|
|
|
f3c1ecd3 | Ohad Levy | hosts.resources :reports, :requirements => {:host_id => /[^\/]+/}, :only => [:index, :show]
|
|
6032a1ff | Ohad Levy | hosts.resources :facts, :requirements => {:host_id => /[^\/]+/}, :only => :index, :controller => :fact_values
|
|
31207a31 | Ohad Levy | hosts.resources :puppetclasses, :requirements => {:host_id => /[^\/]+/}, :only => :index
|
|
86d01ac3 | Ohad Levy | hosts.resources :lookup_keys, :requirements => {:host_id => /[^\/]+/}, :only => :show
|
|
bd5e3385 | Ohad Levy | end
|
|
f87f1250 | Ohad Levy | map.dashboard '/dashboard', :controller => 'dashboard'
|
|
b342a9a8 | Ohad Levy | map.dashboard_auto_completer '/dashboard/auto_complete_search', :controller => 'hosts', :action => :auto_complete_search
|
|
7aee63b6 | Ohad Levy | map.statistics '/statistics', :controller => 'statistics'
|
|
27210309 | Paul Kelly | map.resources :notices, :only => :destroy
|
|
3b49df17 | Amos Benari | map.resources :audits, :collection => {:auto_complete_search => :get}
|
|
661e86c7 | Ohad Levy | map.resources :usergroups
|
|
8104eced | Ohad Levy | map.resources :domains, :requirements => {:id => /[^\/]+/}, :collection => {:auto_complete_search => :get}
|
|
8de14697 | Ohad Levy | map.resources :operatingsystems, :member => {:bootfiles => :get}, :collection => {:auto_complete_search => :get}
|
|
8104eced | Ohad Levy | map.resources :media, :collection => {:auto_complete_search => :get}
|
|
map.resources :models, :collection => {:auto_complete_search => :get}
|
|||
map.resources :architectures, :collection => {:auto_complete_search => :get}
|
|||
a7f78b19 | Ohad Levy | map.resources :lookup_keys, :except => [:new, :create], :requirements => {:id => /[^\/]+/} do |keys|
|
|
keys.resources :lookup_values, :only => [:index, :create, :update, :destroy]
|
|||
end
|
|||
31207a31 | Ohad Levy | map.resources :puppetclasses, :member => { :assign => :post }, :collection => {:import_environments => :get, :auto_complete_search => :get} do |pc|
|
|
pc.resources :hosts, :requirements => {:id => /[^\/]+/}
|
|||
9afa092e | Ohad Levy | pc.resources :lookup_keys, :except => [:show, :new, :create], :requirements => {:id => /[^\/]+/}
|
|
31207a31 | Ohad Levy | end
|
|
4d4b84f6 | Ohad Levy | map.resources :hostgroups, :member => { :nest => :get, :clone => :get }, :collection => { :auto_complete_search => :get }
|
|
8104eced | Ohad Levy | map.resources :common_parameters, :collection => {:auto_complete_search => :get}
|
|
map.resources :environments, :collection => {:import_environments => :get, :obsolete_and_new => :post, :auto_complete_search => :get}
|
|||
c76afe1f | Ohad Levy | map.resources :fact_values, :only => [:create, :index], :collection => { :auto_complete_search => :get }
|
|
ee878ae8 | Ohad Levy | map.resources :facts, :only => [:index, :show], :requirements => {:id => /[^\/]+/} do |facts|
|
|
b96931f2 | Ohad Levy | facts.resources :values, :requirements => {:id => /[^\/]+/}, :only => :index, :controller => :fact_values
|
|
end
|
|||
8104eced | Ohad Levy | map.resources :ptables, :collection => {:auto_complete_search => :get}
|
|
map.resources :roles, :collection => {:report => [:get, :post], :auto_complete_search => :get}
|
|||
2217ce9c | Ohad Levy | map.resources :auth_source_ldaps
|
|
4a8190ef | Ohad Levy | map.resources :users, :collection => {:login => [:get, :post], :logout => :get, :auth_source_selected => :get, :auto_complete_search => :get}
|
|
47819d54 | Ohad Levy | map.resources :config_templates, :except => [:show], :collection => { :auto_complete_search => :get }, :requirements => { :id => /[^\/]+/ }
|
|
2a0cffd3 | Ohad Levy | map.resources :smart_proxies, :except => [:show] do |proxy|
|
|
635a02c9 | Ohad Levy | proxy.resources :puppetca, :controller => "SmartProxies::Puppetca", :only => [:index, :update, :destroy], :requirements => { :id => /[^\.][\w\.-]+/ }
|
|
2a0cffd3 | Ohad Levy | proxy.resources :autosign, :controller => "SmartProxies::Autosign", :only => [:index, :new, :create, :destroy], :requirements => { :id => /[^\.][\w\.-]+/ }
|
|
end
|
|||
8104eced | Ohad Levy | map.resources :subnets, :except => [:show], :collection => {:auto_complete_search => :get}
|
|
84a4c89b | Ohad Levy | map.resources :hypervisors, :requirements => { :id => /[^\/]+/ } do |hypervisor|
|
|
ad3d61b7 | Paul Kelly | hypervisor.resources :guests, :controller => "Hypervisors::Guests", :except => [:edit],
|
|
b3f525e2 | Ohad Levy | :member => {:power => :put}, :requirements => { :id => /[^\.][\w\.-]+/ }
|
|
end if SETTINGS[:libvirt]
|
|||
7159f2a2 | Ohad Levy | map.resources :bookmarks, :except => [:show], :requirements => { :id => /[^\/]+/ }
|
|
df886c98 | Ohad Levy | map.resources :settings, :only => [:index, :update]
|
|
e5d3f34e | Ohad Levy | map.connect 'unattended/template/:id/:hostgroup', :controller => "unattended", :action => "template"
|
|
b752d4f7 | Lukas Zapletal | map.connect '/status', :controller => "home", :action => "status"
|
|
cab0d8c6 | Ohad Levy | ||
9eb0e160 | Ohad Levy | #default
|
|
5563217a | Ohad Levy | map.connect ':controller/:action/:id'
|
|
map.connect ':controller/:action/:id.:format'
|
|||
end
|