foreman_openscap 9.0.5 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_openscap/locale/cs_CZ/foreman_openscap.js +0 -9
  3. data/app/assets/javascripts/foreman_openscap/locale/de/foreman_openscap.js +0 -9
  4. data/app/assets/javascripts/foreman_openscap/locale/en/foreman_openscap.js +0 -9
  5. data/app/assets/javascripts/foreman_openscap/locale/en_GB/foreman_openscap.js +0 -9
  6. data/app/assets/javascripts/foreman_openscap/locale/es/foreman_openscap.js +0 -9
  7. data/app/assets/javascripts/foreman_openscap/locale/fr/foreman_openscap.js +0 -9
  8. data/app/assets/javascripts/foreman_openscap/locale/gl/foreman_openscap.js +0 -9
  9. data/app/assets/javascripts/foreman_openscap/locale/it/foreman_openscap.js +0 -9
  10. data/app/assets/javascripts/foreman_openscap/locale/ja/foreman_openscap.js +0 -9
  11. data/app/assets/javascripts/foreman_openscap/locale/ka/foreman_openscap.js +0 -9
  12. data/app/assets/javascripts/foreman_openscap/locale/ko/foreman_openscap.js +0 -9
  13. data/app/assets/javascripts/foreman_openscap/locale/pt_BR/foreman_openscap.js +0 -9
  14. data/app/assets/javascripts/foreman_openscap/locale/ru/foreman_openscap.js +0 -9
  15. data/app/assets/javascripts/foreman_openscap/locale/sv_SE/foreman_openscap.js +0 -9
  16. data/app/assets/javascripts/foreman_openscap/locale/zh_CN/foreman_openscap.js +0 -9
  17. data/app/assets/javascripts/foreman_openscap/locale/zh_TW/foreman_openscap.js +0 -9
  18. data/app/controllers/api/v2/compliance/scap_contents_controller.rb +2 -0
  19. data/app/helpers/foreman_openscap_helper.rb +2 -18
  20. data/db/migrate/20201217161511_add_url_to_oval_content.rb +1 -1
  21. data/{app/services → lib}/foreman_openscap/bulk_upload.rb +7 -14
  22. data/lib/foreman_openscap/engine.rb +148 -155
  23. data/lib/foreman_openscap/version.rb +1 -1
  24. data/lib/tasks/foreman_openscap_tasks.rake +1 -0
  25. data/locale/cs_CZ/foreman_openscap.edit.po +1443 -0
  26. data/locale/cs_CZ/foreman_openscap.po +0 -9
  27. data/locale/cs_CZ/foreman_openscap.po.time_stamp +0 -0
  28. data/locale/de/LC_MESSAGES/foreman_openscap.mo +0 -0
  29. data/locale/de/foreman_openscap.edit.po +1468 -0
  30. data/locale/de/foreman_openscap.po +0 -9
  31. data/locale/de/foreman_openscap.po.time_stamp +0 -0
  32. data/locale/en/foreman_openscap.edit.po +1443 -0
  33. data/locale/en/foreman_openscap.po +0 -9
  34. data/locale/en/foreman_openscap.po.time_stamp +0 -0
  35. data/locale/en_GB/foreman_openscap.edit.po +1443 -0
  36. data/locale/en_GB/foreman_openscap.po +0 -9
  37. data/locale/en_GB/foreman_openscap.po.time_stamp +0 -0
  38. data/locale/es/LC_MESSAGES/foreman_openscap.mo +0 -0
  39. data/locale/es/foreman_openscap.edit.po +1463 -0
  40. data/locale/es/foreman_openscap.po +0 -9
  41. data/locale/es/foreman_openscap.po.time_stamp +0 -0
  42. data/locale/foreman_openscap.pot +47 -57
  43. data/locale/fr/LC_MESSAGES/foreman_openscap.mo +0 -0
  44. data/locale/fr/foreman_openscap.edit.po +1469 -0
  45. data/locale/fr/foreman_openscap.po +0 -9
  46. data/locale/fr/foreman_openscap.po.time_stamp +0 -0
  47. data/locale/gl/foreman_openscap.edit.po +1443 -0
  48. data/locale/gl/foreman_openscap.po +0 -9
  49. data/locale/gl/foreman_openscap.po.time_stamp +0 -0
  50. data/locale/it/foreman_openscap.edit.po +1445 -0
  51. data/locale/it/foreman_openscap.po +0 -9
  52. data/locale/it/foreman_openscap.po.time_stamp +0 -0
  53. data/locale/ja/LC_MESSAGES/foreman_openscap.mo +0 -0
  54. data/locale/ja/foreman_openscap.edit.po +1460 -0
  55. data/locale/ja/foreman_openscap.po +0 -9
  56. data/locale/ja/foreman_openscap.po.time_stamp +0 -0
  57. data/locale/ka/LC_MESSAGES/foreman_openscap.mo +0 -0
  58. data/locale/ka/foreman_openscap.edit.po +1449 -0
  59. data/locale/ka/foreman_openscap.po +0 -9
  60. data/locale/ka/foreman_openscap.po.time_stamp +0 -0
  61. data/locale/ko/foreman_openscap.edit.po +1443 -0
  62. data/locale/ko/foreman_openscap.po +0 -9
  63. data/locale/ko/foreman_openscap.po.time_stamp +0 -0
  64. data/locale/pt_BR/LC_MESSAGES/foreman_openscap.mo +0 -0
  65. data/locale/pt_BR/foreman_openscap.edit.po +1468 -0
  66. data/locale/pt_BR/foreman_openscap.po +0 -9
  67. data/locale/pt_BR/foreman_openscap.po.time_stamp +0 -0
  68. data/locale/ru/foreman_openscap.edit.po +1447 -0
  69. data/locale/ru/foreman_openscap.po +0 -9
  70. data/locale/ru/foreman_openscap.po.time_stamp +0 -0
  71. data/locale/sv_SE/foreman_openscap.edit.po +1443 -0
  72. data/locale/sv_SE/foreman_openscap.po +0 -9
  73. data/locale/sv_SE/foreman_openscap.po.time_stamp +0 -0
  74. data/locale/zh_CN/LC_MESSAGES/foreman_openscap.mo +0 -0
  75. data/locale/zh_CN/foreman_openscap.edit.po +1459 -0
  76. data/locale/zh_CN/foreman_openscap.po +0 -9
  77. data/locale/zh_CN/foreman_openscap.po.time_stamp +0 -0
  78. data/locale/zh_TW/foreman_openscap.edit.po +1444 -0
  79. data/locale/zh_TW/foreman_openscap.po +0 -9
  80. data/locale/zh_TW/foreman_openscap.po.time_stamp +0 -0
  81. data/test/lib/foreman_openscap/bulk_upload_test.rb +4 -3
  82. data/test/unit/message_cleaner_test.rb +1 -0
  83. metadata +36 -4
@@ -5,15 +5,6 @@ module ForemanOpenscap
5
5
 
6
6
  class Engine < ::Rails::Engine
7
7
  engine_name 'foreman_openscap'
8
- config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
9
- config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
10
- config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
11
- config.autoload_paths += Dir["#{config.root}/app/models"]
12
- config.autoload_paths += Dir["#{config.root}/app/graphql"]
13
- config.autoload_paths += Dir["#{config.root}/app/lib"]
14
- config.autoload_paths += Dir["#{config.root}/app/services"]
15
- config.autoload_paths += Dir["#{config.root}/lib"]
16
- config.autoload_paths += Dir["#{config.root}/test/"]
17
8
 
18
9
  # Add any db migrations
19
10
  initializer "foreman_openscap.load_app_instance_data" do |app|
@@ -47,154 +38,156 @@ module ForemanOpenscap
47
38
  end
48
39
 
49
40
  initializer 'foreman_openscap.register_plugin', :before => :finisher_hook do |app|
50
- Foreman::Plugin.register :foreman_openscap do
51
- requires_foreman '>= 3.11'
52
- register_gettext
53
-
54
- apipie_documented_controllers ["#{ForemanOpenscap::Engine.root}/app/controllers/api/v2/compliance/*.rb"]
55
-
56
- register_custom_status ForemanOpenscap::ComplianceStatus
57
-
58
- # Add permissions
59
- security_block :foreman_openscap do
60
- permission :view_arf_reports, { :arf_reports => %i[index show parse_html show_html show_log
61
- parse_bzip auto_complete_search download_html],
62
- 'api/v2/compliance/arf_reports' => %i[index show download download_html],
63
- :compliance_hosts => [:show] },
64
- :resource_type => 'ForemanOpenscap::ArfReport'
65
- permission :destroy_arf_reports, { :arf_reports => %i[destroy delete_multiple submit_delete_multiple],
66
- 'api/v2/compliance/arf_reports' => [:destroy] },
67
- :resource_type => 'ForemanOpenscap::ArfReport'
68
- permission :create_arf_reports, { 'api/v2/compliance/arf_reports' => [:create] },
69
- :resource_type => 'ForemanOpenscap::ArfReport'
70
-
71
- permission :view_policies, { :policies => %i[index show parse auto_complete_search],
72
- :policy_dashboard => [:index],
73
- :compliance_dashboard => [:index],
74
- 'api/v2/compliance/policies' => %i[index show content] },
75
- :resource_type => 'ForemanOpenscap::Policy'
76
- permission :edit_policies, { :policies => %i[edit update scap_content_selected],
77
- 'api/v2/compliance/policies' => [:update] },
78
- :resource_type => 'ForemanOpenscap::Policy'
79
- permission :create_policies, { :policies => %i[new create],
80
- 'api/v2/compliance/policies' => [:create] },
81
- :resource_type => 'ForemanOpenscap::Policy'
82
- permission :destroy_policies, { :policies => [:destroy],
83
- 'api/v2/compliance/policies' => [:destroy] },
84
- :resource_type => 'ForemanOpenscap::Policy'
85
- permission :assign_policies, { :policies => %i[select_multiple_hosts update_multiple_hosts
86
- disassociate_multiple_hosts
87
- remove_policy_from_multiple_hosts] },
88
- :resource_type => 'ForemanOpenscap::Policy'
89
- permission :view_scap_contents, { :scap_contents => %i[index show auto_complete_search],
90
- 'api/v2/compliance/scap_contents' => %i[index show xml],
91
- 'api/v2/compliance/scap_content_profiles' => %i[index] },
92
- :resource_type => 'ForemanOpenscap::ScapContent'
93
- permission :edit_scap_contents, { :scap_contents => %i[edit update],
94
- 'api/v2/compliance/scap_contents' => [:update] },
95
- :resource_type => 'ForemanOpenscap::ScapContent'
96
- permission :create_scap_contents, { :scap_contents => %i[new create],
97
- 'api/v2/compliance/scap_contents' => %i[create bulk_upload] },
98
- :resource_type => 'ForemanOpenscap::ScapContent'
99
- permission :destroy_scap_contents, { :scap_contents => [:destroy],
100
- 'api/v2/compliance/scap_contents' => [:destroy] },
101
- :resource_type => 'ForemanOpenscap::ScapContent'
102
- permission :edit_hosts, { :hosts => %i[openscap_proxy_changed
103
- select_multiple_openscap_proxy
104
- update_multiple_openscap_proxy] },
105
- :resource_type => "Host"
106
- permission :view_hosts, { 'api/v2/hosts' => [:policies_enc] }, :resource_type => 'Host'
107
- permission :edit_hostgroups, { :hostgroups => [:openscap_proxy_changed] }, :resource_type => "Hostgroup"
108
- permission :create_tailoring_files, { :tailoring_files => %i[create new],
109
- 'api/v2/compliance/tailoring_files' => [:create] },
110
- :resource_type => 'ForemanOpenscap::TailoringFile'
111
- permission :view_tailoring_files, { :tailoring_files => %i[index auto_complete_search xml],
112
- :policies => [:tailoring_file_selected],
113
- 'api/v2/compliance/tailoring_files' => %i[show xml index],
114
- 'api/v2/compliance/policies' => [:tailoring],
41
+ app.reloader.to_prepare do
42
+ Foreman::Plugin.register :foreman_openscap do
43
+ requires_foreman '>= 3.13'
44
+ register_gettext
45
+
46
+ apipie_documented_controllers ["#{ForemanOpenscap::Engine.root}/app/controllers/api/v2/compliance/*.rb"]
47
+
48
+ register_custom_status ForemanOpenscap::ComplianceStatus
49
+
50
+ # Add permissions
51
+ security_block :foreman_openscap do
52
+ permission :view_arf_reports, { :arf_reports => %i[index show parse_html show_html show_log
53
+ parse_bzip auto_complete_search download_html],
54
+ 'api/v2/compliance/arf_reports' => %i[index show download download_html],
55
+ :compliance_hosts => [:show] },
56
+ :resource_type => 'ForemanOpenscap::ArfReport'
57
+ permission :destroy_arf_reports, { :arf_reports => %i[destroy delete_multiple submit_delete_multiple],
58
+ 'api/v2/compliance/arf_reports' => [:destroy] },
59
+ :resource_type => 'ForemanOpenscap::ArfReport'
60
+ permission :create_arf_reports, { 'api/v2/compliance/arf_reports' => [:create] },
61
+ :resource_type => 'ForemanOpenscap::ArfReport'
62
+
63
+ permission :view_policies, { :policies => %i[index show parse auto_complete_search],
64
+ :policy_dashboard => [:index],
65
+ :compliance_dashboard => [:index],
66
+ 'api/v2/compliance/policies' => %i[index show content] },
67
+ :resource_type => 'ForemanOpenscap::Policy'
68
+ permission :edit_policies, { :policies => %i[edit update scap_content_selected],
69
+ 'api/v2/compliance/policies' => [:update] },
70
+ :resource_type => 'ForemanOpenscap::Policy'
71
+ permission :create_policies, { :policies => %i[new create],
72
+ 'api/v2/compliance/policies' => [:create] },
73
+ :resource_type => 'ForemanOpenscap::Policy'
74
+ permission :destroy_policies, { :policies => [:destroy],
75
+ 'api/v2/compliance/policies' => [:destroy] },
76
+ :resource_type => 'ForemanOpenscap::Policy'
77
+ permission :assign_policies, { :policies => %i[select_multiple_hosts update_multiple_hosts
78
+ disassociate_multiple_hosts
79
+ remove_policy_from_multiple_hosts] },
80
+ :resource_type => 'ForemanOpenscap::Policy'
81
+ permission :view_scap_contents, { :scap_contents => %i[index show auto_complete_search],
82
+ 'api/v2/compliance/scap_contents' => %i[index show xml],
115
83
  'api/v2/compliance/scap_content_profiles' => %i[index] },
116
- :resource_type => 'ForemanOpenscap::TailoringFile'
117
- permission :edit_tailoring_files, { :tailoring_files => %i[edit update],
118
- 'api/v2/compliance/tailoring_files' => [:update] },
119
- :resource_type => 'ForemanOpenscap::TailoringFile'
120
- permission :destroy_tailoring_files, { :tailoring_files => [:destroy],
121
- 'api/v2/compliance/tailoring_files' => [:destroy] },
122
- :resource_type => 'ForemanOpenscap::TailoringFile'
123
- permission :view_openscap_proxies, { :openscap_proxies => [:openscap_spool] },
124
- :resource_type => 'SmartProxy'
125
- end
126
-
127
- role "Compliance viewer", %i[view_arf_reports view_policies view_scap_contents view_tailoring_files view_openscap_proxies],
128
- "Role granting read permissions to policy configuration, scan results and downloading reports."
129
- role "Compliance manager", %i[view_arf_reports view_policies view_scap_contents
130
- destroy_arf_reports edit_policies edit_scap_contents assign_policies
131
- create_policies create_scap_contents destroy_policies destroy_scap_contents
132
- create_tailoring_files view_tailoring_files edit_tailoring_files destroy_tailoring_files
133
- view_openscap_proxies],
134
- "Role granting all permissions to compliance features to non-admin users."
135
- role "Create ARF report", [:create_arf_reports] # special as only Proxy can create
136
-
137
- add_all_permissions_to_default_roles
138
-
139
- # add menu entries
140
- divider :top_menu, :caption => N_('Compliance'), :parent => :hosts_menu
141
- menu :top_menu, :compliance_policies, :caption => N_('Policies'),
142
- :url_hash => { :controller => :policies, :action => :index },
84
+ :resource_type => 'ForemanOpenscap::ScapContent'
85
+ permission :edit_scap_contents, { :scap_contents => %i[edit update],
86
+ 'api/v2/compliance/scap_contents' => [:update] },
87
+ :resource_type => 'ForemanOpenscap::ScapContent'
88
+ permission :create_scap_contents, { :scap_contents => %i[new create],
89
+ 'api/v2/compliance/scap_contents' => %i[create bulk_upload] },
90
+ :resource_type => 'ForemanOpenscap::ScapContent'
91
+ permission :destroy_scap_contents, { :scap_contents => [:destroy],
92
+ 'api/v2/compliance/scap_contents' => [:destroy] },
93
+ :resource_type => 'ForemanOpenscap::ScapContent'
94
+ permission :edit_hosts, { :hosts => %i[openscap_proxy_changed
95
+ select_multiple_openscap_proxy
96
+ update_multiple_openscap_proxy] },
97
+ :resource_type => "Host"
98
+ permission :view_hosts, { 'api/v2/hosts' => [:policies_enc] }, :resource_type => 'Host'
99
+ permission :edit_hostgroups, { :hostgroups => [:openscap_proxy_changed] }, :resource_type => "Hostgroup"
100
+ permission :create_tailoring_files, { :tailoring_files => %i[create new],
101
+ 'api/v2/compliance/tailoring_files' => [:create] },
102
+ :resource_type => 'ForemanOpenscap::TailoringFile'
103
+ permission :view_tailoring_files, { :tailoring_files => %i[index auto_complete_search xml],
104
+ :policies => [:tailoring_file_selected],
105
+ 'api/v2/compliance/tailoring_files' => %i[show xml index],
106
+ 'api/v2/compliance/policies' => [:tailoring],
107
+ 'api/v2/compliance/scap_content_profiles' => %i[index] },
108
+ :resource_type => 'ForemanOpenscap::TailoringFile'
109
+ permission :edit_tailoring_files, { :tailoring_files => %i[edit update],
110
+ 'api/v2/compliance/tailoring_files' => [:update] },
111
+ :resource_type => 'ForemanOpenscap::TailoringFile'
112
+ permission :destroy_tailoring_files, { :tailoring_files => [:destroy],
113
+ 'api/v2/compliance/tailoring_files' => [:destroy] },
114
+ :resource_type => 'ForemanOpenscap::TailoringFile'
115
+ permission :view_openscap_proxies, { :openscap_proxies => [:openscap_spool] },
116
+ :resource_type => 'SmartProxy'
117
+ end
118
+
119
+ role "Compliance viewer", %i[view_arf_reports view_policies view_scap_contents view_tailoring_files view_openscap_proxies],
120
+ "Role granting read permissions to policy configuration, scan results and downloading reports."
121
+ role "Compliance manager", %i[view_arf_reports view_policies view_scap_contents
122
+ destroy_arf_reports edit_policies edit_scap_contents assign_policies
123
+ create_policies create_scap_contents destroy_policies destroy_scap_contents
124
+ create_tailoring_files view_tailoring_files edit_tailoring_files destroy_tailoring_files
125
+ view_openscap_proxies],
126
+ "Role granting all permissions to compliance features to non-admin users."
127
+ role "Create ARF report", [:create_arf_reports] # special as only Proxy can create
128
+
129
+ add_all_permissions_to_default_roles
130
+
131
+ # add menu entries
132
+ divider :top_menu, :caption => N_('Compliance'), :parent => :hosts_menu
133
+ menu :top_menu, :compliance_policies, :caption => N_('Policies'),
134
+ :url_hash => { :controller => :policies, :action => :index },
135
+ :parent => :hosts_menu
136
+ menu :top_menu, :compliance_contents, :caption => N_('SCAP contents'),
137
+ :url_hash => { :controller => :scap_contents, :action => :index },
138
+ :parent => :hosts_menu
139
+ menu :top_menu, :compliance_reports, :caption => N_('Reports'),
140
+ :url_hash => { :controller => :arf_reports, :action => :index },
143
141
  :parent => :hosts_menu
144
- menu :top_menu, :compliance_contents, :caption => N_('SCAP contents'),
145
- :url_hash => { :controller => :scap_contents, :action => :index },
146
- :parent => :hosts_menu
147
- menu :top_menu, :compliance_reports, :caption => N_('Reports'),
148
- :url_hash => { :controller => :arf_reports, :action => :index },
149
- :parent => :hosts_menu
150
- menu :top_menu, :compliance_files, :caption => N_('Tailoring Files'),
151
- :url_hash => { :controller => :tailoring_files, :action => :index },
152
- :parent => :hosts_menu
153
-
154
- # add dashboard widget
155
- widget 'compliance_host_reports_widget',
156
- :name => N_('Latest Compliance Reports'), :sizex => 6, :sizey => 1
157
- widget 'compliance_reports_breakdown_widget',
158
- :name => N_('Compliance Reports Breakdown'), :sizex => 4, :sizey => 1
159
-
160
- # As 'arf_report_breakdowns' is a view and does not appear in schema.rb, db:test:prepare will not create the view
161
- # which will make the following tests fail.
162
- tests_to_skip({ "DashboardIntegrationTest" => ["dashboard page", "dashboard link hosts that had performed modifications",
163
- "dashboard link hosts in error state", "dashboard link good host reports",
164
- "dashboard link hosts that had pending changes", "dashboard link out of sync hosts",
165
- "dashboard link hosts with no reports", "dashboard link hosts with alerts disabled",
166
- "widgets not in dashboard show up in list"] })
167
- # strong params
168
- parameter_filter ::Host::Managed, :openscap_proxy_id, :openscap_proxy
169
- parameter_filter ::Hostgroup, :openscap_proxy_id, :openscap_proxy
170
- parameter_filter Log, :result
171
-
172
- proxy_description = N_('OpenSCAP Proxy to use for fetching SCAP content and uploading ARF reports. Leave blank and override appropriate parameters when using proxy load balancer.')
173
-
174
- smart_proxy_for ::Hostgroup, :openscap_proxy,
175
- :feature => 'Openscap',
176
- :label => N_('OpenSCAP Proxy'),
177
- :description => proxy_description,
178
- :api_description => N_('ID of OpenSCAP Proxy')
179
- smart_proxy_for Host::Managed, :openscap_proxy,
180
- :feature => 'Openscap',
181
- :label => N_('OpenSCAP Proxy'),
182
- :description => proxy_description,
183
- :api_description => N_('ID of OpenSCAP Proxy')
184
-
185
- add_controller_action_scope('Api::V2::HostsController', :index) do |base_scope|
186
- base_scope.preload(:policies)
187
- end
188
-
189
- add_controller_action_scope('HostsController', :index) do |base_scope|
190
- base_scope.preload(:policies)
191
- end
192
-
193
- register_global_js_file 'global'
194
-
195
- describe_host do
196
- multiple_actions_provider :compliance_host_multiple_actions
197
- overview_buttons_provider :compliance_host_overview_button
142
+ menu :top_menu, :compliance_files, :caption => N_('Tailoring Files'),
143
+ :url_hash => { :controller => :tailoring_files, :action => :index },
144
+ :parent => :hosts_menu
145
+
146
+ # add dashboard widget
147
+ widget 'compliance_host_reports_widget',
148
+ :name => N_('Latest Compliance Reports'), :sizex => 6, :sizey => 1
149
+ widget 'compliance_reports_breakdown_widget',
150
+ :name => N_('Compliance Reports Breakdown'), :sizex => 4, :sizey => 1
151
+
152
+ # As 'arf_report_breakdowns' is a view and does not appear in schema.rb, db:test:prepare will not create the view
153
+ # which will make the following tests fail.
154
+ tests_to_skip({ "DashboardIntegrationTest" => ["dashboard page", "dashboard link hosts that had performed modifications",
155
+ "dashboard link hosts in error state", "dashboard link good host reports",
156
+ "dashboard link hosts that had pending changes", "dashboard link out of sync hosts",
157
+ "dashboard link hosts with no reports", "dashboard link hosts with alerts disabled",
158
+ "widgets not in dashboard show up in list"] })
159
+ # strong params
160
+ parameter_filter ::Host::Managed, :openscap_proxy_id, :openscap_proxy
161
+ parameter_filter ::Hostgroup, :openscap_proxy_id, :openscap_proxy
162
+ parameter_filter Log, :result
163
+
164
+ proxy_description = N_('OpenSCAP Proxy to use for fetching SCAP content and uploading ARF reports. Leave blank and override appropriate parameters when using proxy load balancer.')
165
+
166
+ smart_proxy_for ::Hostgroup, :openscap_proxy,
167
+ :feature => 'Openscap',
168
+ :label => N_('OpenSCAP Proxy'),
169
+ :description => proxy_description,
170
+ :api_description => N_('ID of OpenSCAP Proxy')
171
+ smart_proxy_for Host::Managed, :openscap_proxy,
172
+ :feature => 'Openscap',
173
+ :label => N_('OpenSCAP Proxy'),
174
+ :description => proxy_description,
175
+ :api_description => N_('ID of OpenSCAP Proxy')
176
+
177
+ add_controller_action_scope('Api::V2::HostsController', :index) do |base_scope|
178
+ base_scope.preload(:policies)
179
+ end
180
+
181
+ add_controller_action_scope('HostsController', :index) do |base_scope|
182
+ base_scope.preload(:policies)
183
+ end
184
+
185
+ register_global_js_file 'global'
186
+
187
+ describe_host do
188
+ multiple_actions_provider :compliance_host_multiple_actions
189
+ overview_buttons_provider :compliance_host_overview_button
190
+ end
198
191
  end
199
192
  end
200
193
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanOpenscap
2
- VERSION = "9.0.5".freeze
2
+ VERSION = "10.0.0".freeze
3
3
  end
@@ -1,5 +1,6 @@
1
1
  # Tasks
2
2
  namespace :foreman_openscap do
3
+ require 'foreman_openscap/bulk_upload'
3
4
  require 'foreman_openscap/message_cleaner'
4
5
 
5
6
  namespace :bulk_upload do