foreman_salt 2.0.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/app/assets/javascripts/foreman_salt/states.js +33 -0
- data/app/controllers/foreman_salt/api/v2/salt_states_controller.rb +53 -2
- data/app/controllers/foreman_salt/concerns/hostgroups_controller_extensions.rb +23 -2
- data/app/controllers/foreman_salt/concerns/hosts_controller_extensions.rb +7 -3
- data/app/controllers/foreman_salt/minions_controller.rb +33 -1
- data/app/controllers/foreman_salt/salt_modules_controller.rb +45 -1
- data/app/controllers/foreman_salt/state_importer.rb +72 -0
- data/app/helpers/foreman_salt/salt_modules_helper.rb +19 -0
- data/app/lib/proxy_api/salt.rb +18 -0
- data/app/models/foreman_salt/concerns/host_managed_extensions.rb +23 -8
- data/app/models/foreman_salt/concerns/hostgroup_extensions.rb +12 -9
- data/app/models/foreman_salt/host_salt_module.rb +6 -0
- data/app/models/foreman_salt/hostgroup_salt_module.rb +6 -0
- data/app/models/foreman_salt/salt_environment.rb +13 -6
- data/app/models/foreman_salt/salt_module.rb +27 -5
- data/app/models/foreman_salt/salt_module_environment.rb +14 -0
- data/app/overrides/salt_environment_host_selector.rb +9 -0
- data/app/overrides/{salt_environment_selector.rb → salt_environment_hostgroup_selector.rb} +2 -6
- data/app/overrides/salt_modules_selector.rb +4 -4
- data/app/services/foreman_salt/fact_importer.rb +1 -1
- data/app/services/foreman_salt/report_importer.rb +9 -7
- data/app/services/foreman_salt/smart_proxies/salt_keys.rb +1 -1
- data/app/views/foreman_salt/salt_environments/index.html.erb +8 -2
- data/app/views/foreman_salt/salt_modules/_form.html.erb +7 -1
- data/app/{overrides/foreman → views/foreman_salt}/salt_modules/_host_tab.html.erb +0 -0
- data/app/views/foreman_salt/salt_modules/_host_tab_pane.html.erb +33 -0
- data/app/views/foreman_salt/salt_modules/import.html.erb +43 -0
- data/app/views/foreman_salt/salt_modules/index.html.erb +17 -5
- data/config/routes.rb +23 -3
- data/db/migrate/20150411003302_add_environments_to_modules.rb +17 -0
- data/db/migrate/20150509094409_rename_join_tables.rb +11 -0
- data/db/migrate/20150509101505_add_primary_keys.rb +6 -0
- data/lib/foreman_salt/engine.rb +21 -1
- data/lib/foreman_salt/version.rb +1 -1
- data/lib/tasks/foreman_salt_tasks.rake +0 -1
- data/test/unit/host_extensions_test.rb +15 -1
- data/test/unit/hostgroup_extensions_test.rb +2 -2
- metadata +35 -24
- data/app/overrides/foreman/salt_modules/_host_tab_pane.html.erb +0 -22
@@ -1,22 +0,0 @@
|
|
1
|
-
<% @inherited_salt_modules = [] if @inherited_salt_modules.blank? %>
|
2
|
-
<div class="tab-pane" id="salt_modules">
|
3
|
-
<div class="row">
|
4
|
-
<div class="col-md-4">
|
5
|
-
<h3>Inherited States</h3>
|
6
|
-
<ul>
|
7
|
-
<% @inherited_salt_modules.sort.each do |salt_module| -%>
|
8
|
-
<li title="Inherited from hostgroup"><%= salt_module.name -%></li>
|
9
|
-
<% end -%>
|
10
|
-
</ul>
|
11
|
-
</div>
|
12
|
-
<div class="col-md-8">
|
13
|
-
<h3>Salt States</h3>
|
14
|
-
<% if @inherited_salt_modules.blank? -%>
|
15
|
-
<%= multiple_selects f, :salt_module, ::ForemanSalt::SaltModule, @salt_modules.try(:map, &:id), :label => '' %>
|
16
|
-
<% else -%>
|
17
|
-
<%= multiple_selects f, :salt_module, ::ForemanSalt::SaltModule.where('id NOT IN (?)', @inherited_salt_modules.map(&:id)), @salt_modules.try(:map, &:id), :label => '' %>
|
18
|
-
<% end -%>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
|