foreman_openscap 0.9.3 → 0.10.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.
- checksums.yaml +4 -4
- data/app/helpers/arf_reports_helper.rb +13 -0
- data/app/views/arf_reports/show.html.erb +1 -0
- data/app/views/arf_reports/show_html.html.erb +3 -0
- data/app/views/policies/edit.html.erb +11 -0
- data/app/views/scap_contents/edit.html.erb +12 -0
- data/app/views/tailoring_files/edit.html.erb +10 -0
- data/config/routes.rb +2 -2
- data/lib/foreman_openscap/engine.rb +1 -1
- data/lib/foreman_openscap/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: caa574656df74e25c0475002df05b229193b872e
|
|
4
|
+
data.tar.gz: 307217d077f8f6ab73c167fa0a48105d12145d32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 350cb9657d7ac2939208c7264076c08da48004345666085df5260246e60aa45817d05667a258825993e76bf1369670187f7a847dd2b156c447dbadd56a1c3bdd
|
|
7
|
+
data.tar.gz: 20fd5f82f889557c8c14df2b5afc1d8f79535ee9b2846ab13c549f7748a836260554f561e90ea5f61e69b00c132dc0d180bd8e81851f60878aec6ca71c3aea72
|
|
@@ -13,6 +13,19 @@ module ArfReportsHelper
|
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
+
def arf_report_breadcrumbs
|
|
17
|
+
if @arf_report && @arf_report.host
|
|
18
|
+
breadcrumbs(:resource_url => api_compliance_arf_reports_path,
|
|
19
|
+
:switchable => false,
|
|
20
|
+
:items => [
|
|
21
|
+
{ :caption => _('Compliance Reports'),
|
|
22
|
+
:url => url_for(arf_reports_path) },
|
|
23
|
+
{ :caption => @arf_report.host.name,
|
|
24
|
+
:url => (arf_report_path(@arf_report) if authorized_for(hash_for_arf_report_path(@arf_report))) }
|
|
25
|
+
])
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
16
29
|
def result_tag(level)
|
|
17
30
|
tag = case level
|
|
18
31
|
when 'pass'
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
<% title _("Edit Compliance Policy") %>
|
|
2
|
+
<%= breadcrumbs(:resource_url => api_compliance_policies_path,
|
|
3
|
+
:items => [
|
|
4
|
+
{ :caption => _('Policies'),
|
|
5
|
+
:url => url_for(policies_path)
|
|
6
|
+
},
|
|
7
|
+
{ :caption => @policy.name,
|
|
8
|
+
:url => (edit_policy_path(@policy) if authorized_for(hash_for_edit_policy_path(@policy)))
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
) if @policy %>
|
|
12
|
+
|
|
2
13
|
<%= render :partial => "form" %>
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
<% title _("Edit SCAP Content") %>
|
|
2
|
+
<%= breadcrumbs(:resource_url => api_compliance_scap_contents_path,
|
|
3
|
+
:name_field => 'title',
|
|
4
|
+
:items => [
|
|
5
|
+
{ :caption => _('Scap Contents'),
|
|
6
|
+
:url => url_for(scap_contents_path)
|
|
7
|
+
},
|
|
8
|
+
{ :caption => @scap_content.title,
|
|
9
|
+
:url => (edit_scap_content_path(@scap_content) if authorized_for(hash_for_edit_scap_content_path(@scap_content)))
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
) if @scap_content %>
|
|
13
|
+
|
|
2
14
|
|
|
3
15
|
<%= render :partial => 'form' %>
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
<% title _("Edit Tailoring File") %>
|
|
2
|
+
<%= breadcrumbs(:resource_url => api_compliance_tailoring_files_path,
|
|
3
|
+
:items => [
|
|
4
|
+
{ :caption => _('Tailoring Files'),
|
|
5
|
+
:url => url_for(tailoring_files_path)
|
|
6
|
+
},
|
|
7
|
+
{ :caption => @tailoring_file.name,
|
|
8
|
+
:url => (edit_tailoring_file_path(@tailoring_file) if authorized_for(hash_for_edit_tailoring_file_path(@tailoring_file)))
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
) if @tailoring_file %>
|
|
2
12
|
|
|
3
13
|
<%= render :partial => 'form' %>
|
data/config/routes.rb
CHANGED
|
@@ -56,9 +56,9 @@ Rails.application.routes.draw do
|
|
|
56
56
|
resources :hosts, :only => [:show], :as => :compliance_hosts, :controller => :compliance_hosts
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
namespace :api do
|
|
59
|
+
namespace :api, :defaults => { :format => 'json' } do
|
|
60
60
|
scope "(:apiv)", :module => :v2, :defaults => { :apiv => 'v2' },
|
|
61
|
-
:apiv => /v1|v2/, :constraints => ApiConstraints.new(:version => 2) do
|
|
61
|
+
:apiv => /v1|v2/, :constraints => ApiConstraints.new(:version => 2, :default => true) do
|
|
62
62
|
namespace :compliance do
|
|
63
63
|
resources :scap_contents, :except => %i[new edit] do
|
|
64
64
|
member do
|
|
@@ -42,7 +42,7 @@ module ForemanOpenscap
|
|
|
42
42
|
|
|
43
43
|
initializer 'foreman_openscap.register_plugin', :before => :finisher_hook do |app|
|
|
44
44
|
Foreman::Plugin.register :foreman_openscap do
|
|
45
|
-
requires_foreman '>= 1.
|
|
45
|
+
requires_foreman '>= 1.18'
|
|
46
46
|
|
|
47
47
|
apipie_documented_controllers ["#{ForemanOpenscap::Engine.root}/app/controllers/api/v2/compliance/*.rb"]
|
|
48
48
|
|