foreman_hosts 2.0.4.7 → 2.1.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.
- data/README.md +1 -117
- data/app/assets/javascripts/application.js +2 -0
- data/app/assets/javascripts/jquery.battatech.excelexport.js +180 -0
- data/app/controllers/foreman_hosts/syhostmodeldetails_controller.rb +83 -0
- data/app/controllers/foreman_hosts/syhostmodels_controller.rb +83 -0
- data/app/models/concerns/foreman_hosts/{host_extensions.rb → hosts_extensions.rb} +1 -1
- data/app/models/foreman_hosts/syhostmodel.rb +8 -0
- data/app/models/foreman_hosts/syhostmodeldetail.rb +5 -0
- data/app/views/foreman_hosts/hosts/report_index.html.erb +188 -3
- data/app/views/foreman_hosts/syhostmodeldetails/_form.html.erb +29 -0
- data/app/views/foreman_hosts/syhostmodeldetails/_list.html.erb +43 -0
- data/app/views/foreman_hosts/syhostmodeldetails/_sygroup.html.erb +3 -0
- data/app/views/foreman_hosts/syhostmodeldetails/_sygroup_td.html.erb +7 -0
- data/app/views/foreman_hosts/syhostmodeldetails/create.js.erb +2 -0
- data/app/views/foreman_hosts/syhostmodeldetails/destroy.js.erb +1 -0
- data/app/views/foreman_hosts/syhostmodeldetails/edit.html.erb +1 -0
- data/app/views/foreman_hosts/syhostmodeldetails/edit.js.erb +3 -0
- data/app/views/foreman_hosts/syhostmodeldetails/index.html.erb +5 -0
- data/app/views/foreman_hosts/syhostmodeldetails/new.html.erb +1 -0
- data/app/views/foreman_hosts/syhostmodeldetails/new.js.erb +3 -0
- data/app/views/foreman_hosts/syhostmodeldetails/show.html.erb +28 -0
- data/app/views/foreman_hosts/syhostmodeldetails/update.js.erb +3 -0
- data/app/views/foreman_hosts/syhostmodels/_form.html.erb +30 -0
- data/app/views/foreman_hosts/syhostmodels/_list.html.erb +41 -0
- data/app/views/foreman_hosts/syhostmodels/_report.html.erb +258 -0
- data/app/views/foreman_hosts/syhostmodels/_sub.html.erb +37 -0
- data/app/views/foreman_hosts/syhostmodels/edit.html.erb +1 -0
- data/app/views/foreman_hosts/syhostmodels/index.html.erb +5 -0
- data/app/views/foreman_hosts/syhostmodels/new.html.erb +1 -0
- data/app/views/foreman_hosts/syhostmodels/show.html.erb +72 -0
- data/config/routes.rb +6 -3
- data/db/migrate/20151015022411_create_syhostmodels.rb +10 -0
- data/db/migrate/20151015050239_create_syhostmodeldetails.rb +13 -0
- data/lib/foreman_hosts/engine.rb +10 -11
- data/lib/foreman_hosts/version.rb +1 -1
- metadata +47 -2
data/lib/foreman_hosts/engine.rb
CHANGED
@@ -11,32 +11,31 @@ module ForemanHosts
|
|
11
11
|
|
12
12
|
# Add any db migrations
|
13
13
|
initializer 'foreman_hosts.load_app_instance_data' do |app|
|
14
|
-
|
14
|
+
app.config.paths['db/migrate'] += ForemanHosts::Engine.paths['db/migrate'].existent
|
15
15
|
end
|
16
16
|
|
17
17
|
initializer 'foreman_hosts.register_plugin', after: :finisher_hook do |_app|
|
18
18
|
Foreman::Plugin.register :foreman_hosts do
|
19
|
-
requires_foreman '>= 1.
|
19
|
+
requires_foreman '>= 1.4'
|
20
20
|
|
21
21
|
# Add permissions
|
22
22
|
security_block :foreman_hosts do
|
23
23
|
permission :view_foreman_hosts, :'foreman_hosts/hosts' => [:report_index]
|
24
|
+
|
25
|
+
permission :view_foreman_syhostmodels, :'foreman_hosts/syhostmodels' => [:index, :show, :auto_complete_search]
|
26
|
+
permission :new_foreman_syhostmodels, :'foreman_hosts/syhostmodels' => [:new, :create]
|
27
|
+
permission :edit_foreman_syhostmodels, :'foreman_hosts/syhostmodels' => [:edit, :update]
|
28
|
+
permission :delete_foreman_syhostmodels, :'foreman_hosts/syhostmodels' => [:destroy]
|
24
29
|
end
|
25
30
|
|
26
31
|
# Add a new role called 'Discovery' if it doesn't exist
|
27
|
-
role 'ForemanHosts', [:view_foreman_hosts]
|
32
|
+
role 'ForemanHosts', [:view_foreman_hosts, :view_foreman_syhostmodels, :new_foreman_syhostmodels, :edit_foreman_syhostmodels, :delete_foreman_syhostmodels]
|
28
33
|
|
29
34
|
# add menu entry
|
30
35
|
|
31
36
|
sub_menu :top_menu, :export_menu, :caption=> N_('Export'), :after=> :infrastructure_menu do
|
32
|
-
|
33
|
-
|
34
|
-
# menu :top_menu, :level3, :url_hash => {:controller=> :example, :action=>:index}
|
35
|
-
# sub_menu :top_menu, :inner_level, :caption=> N_('Inner level') do
|
36
|
-
# menu :top_menu, :level41, :url_hash => {:controller=> :example, :action=>:index}
|
37
|
-
# menu :top_menu, :level42, :url_hash => {:controller=> :example, :action=>:index}
|
38
|
-
# end
|
39
|
-
# menu :top_menu, :level5, :url_hash => {:controller=> :example, :action=>:index}
|
37
|
+
menu :top_menu, :level1, :caption=>N_('ExportTemplates'), :url_hash => { :controller => 'foreman_hosts/syhostmodels', :action => :index }
|
38
|
+
menu :top_menu, :level2, :caption=>N_('ExportHosts'), :url_hash => { :controller => 'foreman_hosts/hosts', :action => :report_index }
|
40
39
|
end
|
41
40
|
# menu :top_menu, :template,
|
42
41
|
# url_hash: { controller: :'foreman_hosts/hosts', action: :new_action },
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_hosts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,6 +11,22 @@ bindir: bin
|
|
11
11
|
cert_chain: []
|
12
12
|
date: 2015-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: nested_form
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
14
30
|
- !ruby/object:Gem::Dependency
|
15
31
|
name: rubocop
|
16
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,17 +67,46 @@ extensions: []
|
|
51
67
|
extra_rdoc_files: []
|
52
68
|
files:
|
53
69
|
- app/views/dashboard/_foreman_hosts_widget.html.erb
|
70
|
+
- app/views/foreman_hosts/syhostmodeldetails/edit.html.erb
|
71
|
+
- app/views/foreman_hosts/syhostmodeldetails/destroy.js.erb
|
72
|
+
- app/views/foreman_hosts/syhostmodeldetails/create.js.erb
|
73
|
+
- app/views/foreman_hosts/syhostmodeldetails/new.html.erb
|
74
|
+
- app/views/foreman_hosts/syhostmodeldetails/update.js.erb
|
75
|
+
- app/views/foreman_hosts/syhostmodeldetails/new.js.erb
|
76
|
+
- app/views/foreman_hosts/syhostmodeldetails/_sygroup_td.html.erb
|
77
|
+
- app/views/foreman_hosts/syhostmodeldetails/show.html.erb
|
78
|
+
- app/views/foreman_hosts/syhostmodeldetails/index.html.erb
|
79
|
+
- app/views/foreman_hosts/syhostmodeldetails/_list.html.erb
|
80
|
+
- app/views/foreman_hosts/syhostmodeldetails/_form.html.erb
|
81
|
+
- app/views/foreman_hosts/syhostmodeldetails/edit.js.erb
|
82
|
+
- app/views/foreman_hosts/syhostmodeldetails/_sygroup.html.erb
|
54
83
|
- app/views/foreman_hosts/layouts/layouts/new_layout.html.erb
|
55
84
|
- app/views/foreman_hosts/layouts/new_layout.html.erb
|
85
|
+
- app/views/foreman_hosts/syhostmodels/edit.html.erb
|
86
|
+
- app/views/foreman_hosts/syhostmodels/new.html.erb
|
87
|
+
- app/views/foreman_hosts/syhostmodels/_report.html.erb
|
88
|
+
- app/views/foreman_hosts/syhostmodels/show.html.erb
|
89
|
+
- app/views/foreman_hosts/syhostmodels/index.html.erb
|
90
|
+
- app/views/foreman_hosts/syhostmodels/_list.html.erb
|
91
|
+
- app/views/foreman_hosts/syhostmodels/_form.html.erb
|
92
|
+
- app/views/foreman_hosts/syhostmodels/_sub.html.erb
|
56
93
|
- app/views/foreman_hosts/hosts/export.xlsx.axlsx
|
57
94
|
- app/views/foreman_hosts/hosts/report_index.html.erb
|
58
95
|
- app/views/foreman_hosts/hosts/hosts/new_action.html.erb
|
96
|
+
- app/assets/javascripts/jquery.battatech.excelexport.js
|
97
|
+
- app/assets/javascripts/application.js
|
59
98
|
- app/overrides/dashboard/index/sample_override.html.erb.deface
|
99
|
+
- app/controllers/foreman_hosts/syhostmodeldetails_controller.rb
|
100
|
+
- app/controllers/foreman_hosts/syhostmodels_controller.rb
|
60
101
|
- app/controllers/foreman_hosts/hosts_controller.rb
|
61
102
|
- app/helpers/concerns/foreman_hosts/hosts_helper_extensions.rb
|
62
|
-
- app/models/concerns/foreman_hosts/
|
103
|
+
- app/models/concerns/foreman_hosts/hosts_extensions.rb
|
104
|
+
- app/models/foreman_hosts/syhostmodeldetail.rb
|
105
|
+
- app/models/foreman_hosts/syhostmodel.rb
|
63
106
|
- bin/foreman-hosts
|
64
107
|
- config/routes.rb
|
108
|
+
- db/migrate/20151015022411_create_syhostmodels.rb
|
109
|
+
- db/migrate/20151015050239_create_syhostmodeldetails.rb
|
65
110
|
- lib/tasks/foreman_hosts_tasks.rake
|
66
111
|
- lib/foreman_hosts.rb
|
67
112
|
- lib/foreman_hosts/version.rb
|