foreman_openscap 9.0.4 → 10.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_openscap/locale/cs_CZ/foreman_openscap.js +115 -127
  3. data/app/assets/javascripts/foreman_openscap/locale/de/foreman_openscap.js +12 -24
  4. data/app/assets/javascripts/foreman_openscap/locale/en/foreman_openscap.js +1 -13
  5. data/app/assets/javascripts/foreman_openscap/locale/en_GB/foreman_openscap.js +3 -15
  6. data/app/assets/javascripts/foreman_openscap/locale/es/foreman_openscap.js +12 -24
  7. data/app/assets/javascripts/foreman_openscap/locale/fr/foreman_openscap.js +83 -95
  8. data/app/assets/javascripts/foreman_openscap/locale/gl/foreman_openscap.js +4 -16
  9. data/app/assets/javascripts/foreman_openscap/locale/it/foreman_openscap.js +10 -22
  10. data/app/assets/javascripts/foreman_openscap/locale/ja/foreman_openscap.js +68 -80
  11. data/app/assets/javascripts/foreman_openscap/locale/ka/foreman_openscap.js +28 -40
  12. data/app/assets/javascripts/foreman_openscap/locale/ko/foreman_openscap.js +12 -24
  13. data/app/assets/javascripts/foreman_openscap/locale/pt_BR/foreman_openscap.js +9 -21
  14. data/app/assets/javascripts/foreman_openscap/locale/ru/foreman_openscap.js +8 -20
  15. data/app/assets/javascripts/foreman_openscap/locale/sv_SE/foreman_openscap.js +6 -18
  16. data/app/assets/javascripts/foreman_openscap/locale/zh_CN/foreman_openscap.js +67 -79
  17. data/app/assets/javascripts/foreman_openscap/locale/zh_TW/foreman_openscap.js +9 -21
  18. data/app/helpers/foreman_openscap_helper.rb +2 -18
  19. data/db/migrate/20201217161511_add_url_to_oval_content.rb +1 -1
  20. data/lib/foreman_openscap/engine.rb +148 -155
  21. data/lib/foreman_openscap/version.rb +1 -1
  22. data/locale/Makefile +12 -2
  23. data/locale/cs_CZ/LC_MESSAGES/foreman_openscap.mo +0 -0
  24. data/locale/cs_CZ/foreman_openscap.edit.po +1442 -0
  25. data/locale/cs_CZ/foreman_openscap.po +120 -130
  26. data/locale/cs_CZ/foreman_openscap.po.time_stamp +0 -0
  27. data/locale/de/LC_MESSAGES/foreman_openscap.mo +0 -0
  28. data/locale/de/foreman_openscap.edit.po +1454 -0
  29. data/locale/de/foreman_openscap.po +13 -25
  30. data/locale/de/foreman_openscap.po.time_stamp +0 -0
  31. data/locale/en/LC_MESSAGES/foreman_openscap.mo +0 -0
  32. data/locale/en/foreman_openscap.edit.po +1439 -0
  33. data/locale/en/foreman_openscap.po +1 -13
  34. data/locale/en/foreman_openscap.po.time_stamp +0 -0
  35. data/locale/en_GB/LC_MESSAGES/foreman_openscap.mo +0 -0
  36. data/locale/en_GB/foreman_openscap.edit.po +1440 -0
  37. data/locale/en_GB/foreman_openscap.po +3 -15
  38. data/locale/en_GB/foreman_openscap.po.time_stamp +0 -0
  39. data/locale/es/LC_MESSAGES/foreman_openscap.mo +0 -0
  40. data/locale/es/foreman_openscap.edit.po +1449 -0
  41. data/locale/es/foreman_openscap.po +12 -24
  42. data/locale/es/foreman_openscap.po.time_stamp +0 -0
  43. data/locale/foreman_openscap.pot +47 -61
  44. data/locale/fr/LC_MESSAGES/foreman_openscap.mo +0 -0
  45. data/locale/fr/foreman_openscap.edit.po +1455 -0
  46. data/locale/fr/foreman_openscap.po +83 -95
  47. data/locale/fr/foreman_openscap.po.time_stamp +0 -0
  48. data/locale/gl/LC_MESSAGES/foreman_openscap.mo +0 -0
  49. data/locale/gl/foreman_openscap.edit.po +1440 -0
  50. data/locale/gl/foreman_openscap.po +4 -16
  51. data/locale/gl/foreman_openscap.po.time_stamp +0 -0
  52. data/locale/it/LC_MESSAGES/foreman_openscap.mo +0 -0
  53. data/locale/it/foreman_openscap.edit.po +1442 -0
  54. data/locale/it/foreman_openscap.po +10 -22
  55. data/locale/it/foreman_openscap.po.time_stamp +0 -0
  56. data/locale/ja/LC_MESSAGES/foreman_openscap.mo +0 -0
  57. data/locale/ja/foreman_openscap.edit.po +1450 -0
  58. data/locale/ja/foreman_openscap.po +68 -80
  59. data/locale/ja/foreman_openscap.po.time_stamp +0 -0
  60. data/locale/ka/LC_MESSAGES/foreman_openscap.mo +0 -0
  61. data/locale/ka/foreman_openscap.edit.po +1444 -0
  62. data/locale/ka/foreman_openscap.po +28 -40
  63. data/locale/ka/foreman_openscap.po.time_stamp +0 -0
  64. data/locale/ko/LC_MESSAGES/foreman_openscap.mo +0 -0
  65. data/locale/ko/foreman_openscap.edit.po +1440 -0
  66. data/locale/ko/foreman_openscap.po +12 -24
  67. data/locale/ko/foreman_openscap.po.time_stamp +0 -0
  68. data/locale/pt_BR/LC_MESSAGES/foreman_openscap.mo +0 -0
  69. data/locale/pt_BR/foreman_openscap.edit.po +1454 -0
  70. data/locale/pt_BR/foreman_openscap.po +9 -21
  71. data/locale/pt_BR/foreman_openscap.po.time_stamp +0 -0
  72. data/locale/ru/LC_MESSAGES/foreman_openscap.mo +0 -0
  73. data/locale/ru/foreman_openscap.edit.po +1444 -0
  74. data/locale/ru/foreman_openscap.po +8 -20
  75. data/locale/ru/foreman_openscap.po.time_stamp +0 -0
  76. data/locale/sv_SE/LC_MESSAGES/foreman_openscap.mo +0 -0
  77. data/locale/sv_SE/foreman_openscap.edit.po +1440 -0
  78. data/locale/sv_SE/foreman_openscap.po +6 -18
  79. data/locale/sv_SE/foreman_openscap.po.time_stamp +0 -0
  80. data/locale/zh_CN/LC_MESSAGES/foreman_openscap.mo +0 -0
  81. data/locale/zh_CN/foreman_openscap.edit.po +1449 -0
  82. data/locale/zh_CN/foreman_openscap.po +67 -79
  83. data/locale/zh_CN/foreman_openscap.po.time_stamp +0 -0
  84. data/locale/zh_TW/LC_MESSAGES/foreman_openscap.mo +0 -0
  85. data/locale/zh_TW/foreman_openscap.edit.po +1441 -0
  86. data/locale/zh_TW/foreman_openscap.po +9 -21
  87. data/locale/zh_TW/foreman_openscap.po.time_stamp +0 -0
  88. data/test/unit/message_cleaner_test.rb +1 -0
  89. metadata +35 -7
  90. data/locale/action_names.rb +0 -2
  91. data/webpack/components/EditableInput.js +0 -166
  92. data/webpack/components/EditableInput.scss +0 -3
  93. data/webpack/helpers/formFieldsHelper.js +0 -114
@@ -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.4".freeze
2
+ VERSION = "10.0.1".freeze
3
3
  end
data/locale/Makefile CHANGED
@@ -31,9 +31,16 @@ all-mo: $(MOFILES)
31
31
  cat $@
32
32
  ! grep -q msgid $@
33
33
 
34
- %.edit.po:
34
+ %.edit.po: %.po.time_stamp
35
35
  touch $@
36
36
 
37
+ # gettext will trash the .edit.po file if the time stamp doesn't exist or is older than the po file
38
+ %.po.time_stamp: %.po
39
+ touch --reference $< $@
40
+
41
+ # Prevent make from treating this as an intermediate file to be cleaned up
42
+ .PRECIOUS: %.po.time_stamp
43
+
37
44
  check: $(POXFILES)
38
45
 
39
46
  # Unify duplicate translations
@@ -43,7 +50,10 @@ uniq-po:
43
50
  done
44
51
 
45
52
  tx-pull: $(EDITFILES)
46
- cd .. && tx pull -f --all
53
+ # Initialize new languages
54
+ cd .. && tx pull -f --all --minimum-perc 50
55
+ # Force update all existing languages
56
+ cd .. && tx pull -f --minimum-perc 0
47
57
  for f in $(EDITFILES) ; do \
48
58
  sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
49
59
  done