foreman_openscap 0.9.3 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b0b56c6f69891762fa3bbcbd59f7de1883a2c3c
4
- data.tar.gz: 9c3e7c7ce9fa65769ef3a8a46ca360e0efe2dae8
3
+ metadata.gz: caa574656df74e25c0475002df05b229193b872e
4
+ data.tar.gz: 307217d077f8f6ab73c167fa0a48105d12145d32
5
5
  SHA512:
6
- metadata.gz: 4732cb483607a6d37de0ee738517d0e12ab3ab718f9fb43308f831a9f3cb19934667d5ba8fb434bd1244c929acf35e0890f5a24b9736c4d1fe22b09ff1fa8b65
7
- data.tar.gz: 3e440693f385abe344f79b7b810c3b16d7603587268b3427566143dfed4b58867ea7500d2283aa520c29b4d2326d4d88a4f8a5a0849ef40948e964077374b69e
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'
@@ -3,6 +3,7 @@
3
3
  <% stylesheet 'foreman_openscap/reports' %>
4
4
 
5
5
  <% title "#{@arf_report.host}" %>
6
+ <%= arf_report_breadcrumbs %>
6
7
 
7
8
  <p class='ra'><%= reported_info @arf_report %></p>
8
9
 
@@ -1,4 +1,7 @@
1
1
  <%= javascript 'foreman_openscap/load_report'%>
2
+
3
+ <%= arf_report_breadcrumbs %>
4
+
2
5
  <div class="row">
3
6
  <div id="loading">
4
7
  <div class="col-md-4"></div>
@@ -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' %>
@@ -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.17'
45
+ requires_foreman '>= 1.18'
46
46
 
47
47
  apipie_documented_controllers ["#{ForemanOpenscap::Engine.root}/app/controllers/api/v2/compliance/*.rb"]
48
48
 
@@ -1,3 +1,3 @@
1
1
  module ForemanOpenscap
2
- VERSION = "0.9.3".freeze
2
+ VERSION = "0.10.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_openscap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - slukasik@redhat.com