foreman_hosts 0.0.6dev → 0.0.7dev
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.
@@ -4,15 +4,6 @@ module ForemanHosts
|
|
4
4
|
# change layout if needed
|
5
5
|
#layout 'foreman_hosts/layouts/new_layout'
|
6
6
|
|
7
|
-
def new_action
|
8
|
-
# automatically renders view/foreman_hosts/hosts/new_action
|
9
|
-
end
|
10
|
-
|
11
|
-
def export
|
12
|
-
@hosts = Host.all
|
13
|
-
render xlsx: 'hosts',template: "/hosts/export.xlsx.axlsx"
|
14
|
-
end
|
15
|
-
|
16
7
|
|
17
8
|
def report_index
|
18
9
|
@fact_values = FactValue.all
|
data/lib/foreman_hosts/engine.rb
CHANGED
@@ -20,8 +20,6 @@ module ForemanHosts
|
|
20
20
|
|
21
21
|
# Add permissions
|
22
22
|
security_block :foreman_hosts do
|
23
|
-
permission :view_foreman_hosts, :'foreman_hosts/hosts' => [:new_action]
|
24
|
-
permission :view_foreman_hosts, :'foreman_hosts/hosts' => [:export]
|
25
23
|
permission :view_foreman_hosts, :'foreman_hosts/hosts' => [:report_index]
|
26
24
|
end
|
27
25
|
|
@@ -29,11 +27,11 @@ module ForemanHosts
|
|
29
27
|
role 'ForemanHosts', [:view_foreman_hosts]
|
30
28
|
|
31
29
|
# add menu entry
|
32
|
-
|
33
|
-
menu :top_menu, :foreman_hosts,
|
34
|
-
|
35
|
-
|
36
|
-
|
30
|
+
divider :top_menu, :parent => :host_menu, :after => :hosts
|
31
|
+
menu :top_menu, :foreman_hosts,
|
32
|
+
:url_hash => { :controller => 'foreman_hosts/hosts', :action => :report_index },
|
33
|
+
:caption => N_('ForemanHosts'),
|
34
|
+
:parent => :hosts_menu
|
37
35
|
|
38
36
|
# menu :top_menu, :template,
|
39
37
|
# url_hash: { controller: :'foreman_hosts/hosts', action: :new_action },
|