-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathroutes.rb
More file actions
126 lines (112 loc) · 3.36 KB
/
Copy pathroutes.rb
File metadata and controls
126 lines (112 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
Rails.application.routes.draw do
match '/experimental/compliance' => 'react#index', :via => [:get]
match '/experimental/compliance/*page' => 'react#index', :via => [:get]
scope '/compliance' do
resources :arf_reports, :only => %i[index show destroy] do
member do
get 'show_html'
get 'parse_html'
get 'parse_bzip'
get 'download_html'
get 'show_log'
end
collection do
get 'auto_complete_search'
get 'delete_multiple'
post 'submit_delete_multiple'
end
end
get 'dashboard', :to => 'compliance_dashboard#index', :as => "compliance_dashboard"
resources :policies, :only => %i[index new show create edit update destroy] do
member do
get 'parse', :to => 'policies#parse'
get 'dashboard', :to => 'policy_dashboard#index', :as => 'policy_dashboard'
end
collection do
get 'auto_complete_search'
post 'scap_content_selected'
post 'tailoring_file_selected'
post 'select_multiple_hosts'
post 'update_multiple_hosts'
post 'disassociate_multiple_hosts'
post 'remove_policy_from_multiple_hosts'
end
end
resources :scap_contents do
collection do
get 'auto_complete_search'
end
end
resources :tailoring_files, :except => [:show] do
member do
get 'xml'
end
collection do
get 'auto_complete_search'
end
end
resources :openscap_proxies, :only => [] do
member do
get 'openscap_spool'
end
end
resources :hosts, :only => [:show], :as => :compliance_hosts, :controller => :compliance_hosts
end
namespace :api, :defaults => { :format => 'json' } do
scope "(:apiv)", :module => :v2, :defaults => { :apiv => 'v2' },
:apiv => /v2/, :constraints => ApiConstraints.new(:version => 2, :default => true) do
namespace :compliance do
resources :scap_contents, :except => %i[new edit] do
member do
get 'xml'
end
collection do
post 'bulk_upload'
end
end
resources :scap_content_profiles, :only => %i[index]
resources :tailoring_files, :except => %i[new edit] do
member do
get 'xml'
end
end
resources :policies, :except => %i[new edit] do
member do
get 'content'
get 'tailoring'
end
end
resources :arf_reports, :only => %i[index show destroy] do
member do
get 'download'
get 'download_html'
end
end
post 'arf_reports/:cname/:policy_id/:date', \
:constraints => { :cname => /[^\/]+/ }, :to => 'arf_reports#create'
end
constraints(:id => /[^\/]+/) do
resources :hosts, :only => [] do
member do
get :policies_enc
end
end
end
match 'hosts/bulk/change_openscap_proxy', :to => 'hosts_bulk_actions#change_openscap_proxy', :via => [:put]
end
end
end
Foreman::Application.routes.draw do
resources :hosts do
collection do
post 'openscap_proxy_changed'
post 'select_multiple_openscap_proxy'
post 'update_multiple_openscap_proxy'
end
end
resources :hostgroups do
collection do
post 'openscap_proxy_changed'
end
end
end