foreman_puppet 2.0.2 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/foreman_puppet/environments_helper.rb +1 -1
- data/app/helpers/foreman_puppet/puppetclass_lookup_keys_helper.rb +1 -1
- data/app/views/foreman_puppet/config_groups/index.html.erb +3 -1
- data/db/migrate/20220201205305_migrate_host_class_permission.foreman_puppet.rb +9 -0
- data/db/migrate/20220208135305_migrate_environment_ignore_type.foreman_puppet.rb +15 -0
- data/db/migrate_foreman/20090905150132_create_hostgroups_puppetclasses.foreman_puppet.rb +3 -1
- data/lib/foreman_puppet/register.rb +2 -1
- data/lib/foreman_puppet/version.rb +1 -1
- data/locale/ca/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/ca/foreman_puppet.edit.po +1095 -0
- data/locale/ca/foreman_puppet.po +70 -1
- data/locale/ca/foreman_puppet.po.time_stamp +0 -0
- data/locale/cs_CZ/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/cs_CZ/foreman_puppet.edit.po +199 -184
- data/locale/cs_CZ/foreman_puppet.po +13 -2
- data/locale/de/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/de/foreman_puppet.edit.po +1122 -0
- data/locale/de/foreman_puppet.po +25 -13
- data/locale/de/foreman_puppet.po.time_stamp +0 -0
- data/locale/en/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/en/foreman_puppet.edit.po +33 -25
- data/locale/en/foreman_puppet.po +13 -1
- data/locale/en_GB/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/en_GB/foreman_puppet.edit.po +1097 -0
- data/locale/en_GB/foreman_puppet.po +13 -2
- data/locale/en_GB/foreman_puppet.po.time_stamp +0 -0
- data/locale/es/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/es/foreman_puppet.edit.po +1104 -0
- data/locale/es/foreman_puppet.po +13 -2
- data/locale/es/foreman_puppet.po.time_stamp +0 -0
- data/locale/foreman_puppet.pot +48 -25
- data/locale/fr/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/fr/foreman_puppet.edit.po +1112 -0
- data/locale/fr/foreman_puppet.po +13 -2
- data/locale/fr/foreman_puppet.po.time_stamp +0 -0
- data/locale/gl/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/gl/foreman_puppet.edit.po +1095 -0
- data/locale/gl/foreman_puppet.po +13 -2
- data/locale/gl/foreman_puppet.po.time_stamp +0 -0
- data/locale/it/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/it/foreman_puppet.edit.po +1099 -0
- data/locale/it/foreman_puppet.po +13 -2
- data/locale/it/foreman_puppet.po.time_stamp +0 -0
- data/locale/ja/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/ja/foreman_puppet.edit.po +1107 -0
- data/locale/ja/foreman_puppet.po +15 -4
- data/locale/ja/foreman_puppet.po.time_stamp +0 -0
- data/locale/ko/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/ko/foreman_puppet.edit.po +1096 -0
- data/locale/ko/foreman_puppet.po +13 -2
- data/locale/ko/foreman_puppet.po.time_stamp +0 -0
- data/locale/nl_NL/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/nl_NL/foreman_puppet.edit.po +1100 -0
- data/locale/nl_NL/foreman_puppet.po +13 -2
- data/locale/nl_NL/foreman_puppet.po.time_stamp +0 -0
- data/locale/pl/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/pl/foreman_puppet.edit.po +1099 -0
- data/locale/pl/foreman_puppet.po +13 -2
- data/locale/pl/foreman_puppet.po.time_stamp +0 -0
- data/locale/pt_BR/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/pt_BR/foreman_puppet.edit.po +1103 -0
- data/locale/pt_BR/foreman_puppet.po +13 -2
- data/locale/pt_BR/foreman_puppet.po.time_stamp +0 -0
- data/locale/ru/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/ru/foreman_puppet.edit.po +1104 -0
- data/locale/ru/foreman_puppet.po +15 -4
- data/locale/ru/foreman_puppet.po.time_stamp +0 -0
- data/locale/sv_SE/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/sv_SE/foreman_puppet.edit.po +1099 -0
- data/locale/sv_SE/foreman_puppet.po +13 -2
- data/locale/sv_SE/foreman_puppet.po.time_stamp +0 -0
- data/locale/zh_CN/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/zh_CN/foreman_puppet.edit.po +1108 -0
- data/locale/zh_CN/foreman_puppet.po +16 -5
- data/locale/zh_CN/foreman_puppet.po.time_stamp +0 -0
- data/locale/zh_TW/LC_MESSAGES/foreman_puppet.mo +0 -0
- data/locale/zh_TW/foreman_puppet.edit.po +1098 -0
- data/locale/zh_TW/foreman_puppet.po +13 -2
- data/locale/zh_TW/foreman_puppet.po.time_stamp +0 -0
- data/test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb +34 -0
- metadata +39 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f100007c8385b76f68835195d0ed1390e4096ba73ca576d5c971452769b1402
|
4
|
+
data.tar.gz: 3e2e6e9c84153e7be459a237b430eebd4d03f87ac33ee858bc84923a50ddaa2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 509c941bb930c98c91451bb23f298734e7999038e912a1d3bee7664bdf9bb4367509c0097b427330e420209cdffe2a49c3375050c6a76271f6fa131c2cbe4b53
|
7
|
+
data.tar.gz: 93c89dee2564fda4e143161b17c1c43d4afd43b1ee9eb78f24585bed6bfafe4dd401cd0ad91e71eda7899466cd6d89a8d4de0cedb356bd60ebea436a28683772
|
@@ -11,7 +11,7 @@ module ForemanPuppet
|
|
11
11
|
def environments_title_actions
|
12
12
|
title_actions import_proxy_select(hash_for_import_environments_environments_path.merge(engine: foreman_puppet)),
|
13
13
|
button_group(new_link(_('Create Puppet Environment'), { engine: foreman_puppet }, id: 'new_environment')),
|
14
|
-
button_group(
|
14
|
+
button_group(link_to(_('Help'), { action: 'welcome' }, { class: 'btn btn-default' }))
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -9,7 +9,7 @@ module ForemanPuppet
|
|
9
9
|
# ------ Host(group) Form Helpers -----
|
10
10
|
|
11
11
|
def overridable_puppet_lookup_keys(klass, obj)
|
12
|
-
klass.class_params.override.where(environment_classes: { environment_id: obj.
|
12
|
+
klass.class_params.override.where(environment_classes: { environment_id: obj.environment })
|
13
13
|
end
|
14
14
|
|
15
15
|
def hidden_puppet_lookup_value_fields(lookup_key, lookup_value, disabled)
|
@@ -2,7 +2,9 @@
|
|
2
2
|
<% content_for(:search_bar) { } %>
|
3
3
|
<% title _('Config Groups') %>
|
4
4
|
|
5
|
-
<% title_actions
|
5
|
+
<% title_actions(
|
6
|
+
new_link(_('Create Config Group'), { engine: foreman_puppet }, id: 'new_config_group'),
|
7
|
+
link_to(_('Help'), { action: 'welcome' }, { class: 'btn btn-default' })) %>
|
6
8
|
|
7
9
|
<table class="<%= table_css_classes 'table-fixed' %>">
|
8
10
|
<thead>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class MigrateEnvironmentIgnoreType < ActiveRecord::Migration[6.0]
|
2
|
+
def up
|
3
|
+
taxonomies = Taxonomy.unscoped.where("ignore_types LIKE '%Environment%'")
|
4
|
+
environment_ids = ForemanPuppet::Environment.unscoped.pluck(:id)
|
5
|
+
|
6
|
+
taxonomies.each do |tax|
|
7
|
+
new_types = tax.ignore_types.reject { |type| type == 'Environment' }
|
8
|
+
tax.update_columns(ignore_types: new_types)
|
9
|
+
taxable_rows = environment_ids.map do |env_id|
|
10
|
+
{ taxable_id: env_id, taxable_type: 'ForemanPuppet::Environment', taxonomy_id: tax.id }
|
11
|
+
end
|
12
|
+
TaxableTaxonomy.insert_all(taxable_rows) if taxable_rows.any?
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
class CreateHostgroupsPuppetclasses < ActiveRecord::Migration[6.0]
|
2
2
|
def up
|
3
|
-
|
3
|
+
# this table is later renamed into hostgroup_classes and thus we don't want to create it if it exists under the later name
|
4
|
+
return if table_exists?(:hostgroups_puppetclasses) || table_exists?(:hostgroup_classes)
|
5
|
+
create_table :hostgroups_puppetclasses, id: false do |t|
|
4
6
|
t.references :hostgroup, foreign_key: true, null: false
|
5
7
|
t.references :puppetclass, foreign_key: true, null: false
|
6
8
|
end
|
@@ -147,7 +147,8 @@ Foreman::Plugin.register :foreman_puppet do
|
|
147
147
|
permission :import_puppetclasses, { 'foreman_puppet/puppetclasses' => %i[import_environments obsolete_and_new],
|
148
148
|
'foreman_puppet/api/v2/environments' => [:import_puppetclasses] },
|
149
149
|
resource_type: 'ForemanPuppet::Puppetclass'
|
150
|
-
permission :edit_classes, {
|
150
|
+
permission :edit_classes, { :host_editing => [:edit_classes],
|
151
|
+
'foreman_puppet/api/v2/host_classes' => %i[index create destroy] },
|
151
152
|
resource_type: 'ForemanPuppet::HostClass'
|
152
153
|
end
|
153
154
|
|
Binary file
|