foreman_puppet 3.0.5 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/db/migrate/20220421204325_drop_environment_from_host_and_hg.foreman_puppet.rb +8 -0
  4. data/lib/foreman_puppet/register.rb +4 -4
  5. data/lib/foreman_puppet/version.rb +1 -1
  6. data/locale/ca/foreman_puppet.edit.po +237 -111
  7. data/locale/cs_CZ/foreman_puppet.edit.po +213 -105
  8. data/locale/de/foreman_puppet.edit.po +326 -148
  9. data/locale/en/foreman_puppet.edit.po +80 -172
  10. data/locale/en_GB/foreman_puppet.edit.po +200 -100
  11. data/locale/es/foreman_puppet.edit.po +304 -133
  12. data/locale/fr/foreman_puppet.edit.po +313 -135
  13. data/locale/gl/foreman_puppet.edit.po +210 -102
  14. data/locale/it/foreman_puppet.edit.po +250 -116
  15. data/locale/ja/foreman_puppet.edit.po +223 -107
  16. data/locale/ko/foreman_puppet.edit.po +202 -101
  17. data/locale/messages.mo +0 -0
  18. data/locale/nl_NL/foreman_puppet.edit.po +243 -115
  19. data/locale/pl/foreman_puppet.edit.po +260 -121
  20. data/locale/pt_BR/foreman_puppet.edit.po +317 -139
  21. data/locale/ru/foreman_puppet.edit.po +258 -122
  22. data/locale/sv_SE/foreman_puppet.edit.po +209 -103
  23. data/locale/zh_CN/foreman_puppet.edit.po +209 -105
  24. data/locale/zh_TW/foreman_puppet.edit.po +202 -103
  25. data/package.json +7 -7
  26. data/test/controllers/foreman_puppet/api/v2/override_values_controller_test.rb +6 -2
  27. data/test/models/foreman_puppet/host_test.rb +6 -0
  28. data/webpack/global_index.js +11 -0
  29. data/webpack/index.js +0 -7
  30. data/webpack/legacy.js +31 -0
  31. data/webpack/src/Extends/Fills/index.js +26 -0
  32. data/webpack/src/Extends/Host/PuppetTab/Routes.js +47 -0
  33. data/webpack/src/Extends/Host/PuppetTab/SubTabs/ENCPreview/ENCTab.js +61 -0
  34. data/webpack/src/Extends/Host/PuppetTab/SubTabs/ENCPreview/index.js +53 -0
  35. data/webpack/src/Extends/Host/PuppetTab/SubTabs/EmptyPage.js +19 -0
  36. data/webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/components/DescriptionCard.js +71 -0
  37. data/webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/index.js +45 -0
  38. data/webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/styles.scss +7 -0
  39. data/webpack/src/Extends/Host/PuppetTab/constants.js +8 -0
  40. data/webpack/src/Extends/Host/PuppetTab/helpers.js +3 -0
  41. data/webpack/src/Extends/Host/PuppetTab/index.js +51 -0
  42. metadata +67 -55
  43. data/app/views/smart_proxies/plugins/_puppet_ca.html.erb +0 -44
  44. data/webpack/fills_index.js +0 -30
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
8
8
  - Shira Maximov
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-03-03 00:00:00.000000000 Z
12
+ date: 2022-06-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Allow assigning Puppet environments and classes to the Foreman Hosts.
15
15
  email:
@@ -176,7 +176,6 @@ files:
176
176
  - app/views/provisioning_templates/_combination.html.erb
177
177
  - app/views/provisioning_templates/_combinations.html.erb
178
178
  - app/views/smart_proxies/plugins/_puppet.html.erb
179
- - app/views/smart_proxies/plugins/_puppet_ca.html.erb
180
179
  - config/api_routes.rb
181
180
  - config/initializers/api_reroute.rb
182
181
  - config/routes.rb
@@ -192,6 +191,7 @@ files:
192
191
  - db/migrate/20211112130803_cleanup_environment_from_core_tables.foreman_puppet.rb
193
192
  - db/migrate/20220201205305_migrate_host_class_permission.foreman_puppet.rb
194
193
  - db/migrate/20220208135305_migrate_environment_ignore_type.foreman_puppet.rb
194
+ - db/migrate/20220421204325_drop_environment_from_host_and_hg.foreman_puppet.rb
195
195
  - db/migrate_foreman/20090722141107_create_environments.foreman_puppet.rb
196
196
  - db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
197
197
  - db/migrate_foreman/20090905150132_create_hostgroups_puppetclasses.foreman_puppet.rb
@@ -369,9 +369,21 @@ files:
369
369
  - webpack/__mocks__/foremanReact/redux/actions/toasts.js
370
370
  - webpack/__mocks__/foremanReact/redux/index.js
371
371
  - webpack/__mocks__/foremanReact/redux/middlewares/IntervalMiddleware.js
372
- - webpack/fills_index.js
372
+ - webpack/global_index.js
373
373
  - webpack/index.js
374
+ - webpack/legacy.js
374
375
  - webpack/src/Components/Environments/Welcome.js
376
+ - webpack/src/Extends/Fills/index.js
377
+ - webpack/src/Extends/Host/PuppetTab/Routes.js
378
+ - webpack/src/Extends/Host/PuppetTab/SubTabs/ENCPreview/ENCTab.js
379
+ - webpack/src/Extends/Host/PuppetTab/SubTabs/ENCPreview/index.js
380
+ - webpack/src/Extends/Host/PuppetTab/SubTabs/EmptyPage.js
381
+ - webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/components/DescriptionCard.js
382
+ - webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/index.js
383
+ - webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/styles.scss
384
+ - webpack/src/Extends/Host/PuppetTab/constants.js
385
+ - webpack/src/Extends/Host/PuppetTab/helpers.js
386
+ - webpack/src/Extends/Host/PuppetTab/index.js
375
387
  - webpack/src/ForemanPuppet.js
376
388
  - webpack/src/Router/__snapshots__/routes.test.js.snap
377
389
  - webpack/src/Router/index.js
@@ -386,7 +398,7 @@ homepage: https://github.com/theforeman/foreman_puppet
386
398
  licenses:
387
399
  - GPL-3.0
388
400
  metadata: {}
389
- post_install_message:
401
+ post_install_message:
390
402
  rdoc_options: []
391
403
  require_paths:
392
404
  - lib
@@ -401,75 +413,75 @@ required_rubygems_version: !ruby/object:Gem::Requirement
401
413
  - !ruby/object:Gem::Version
402
414
  version: '0'
403
415
  requirements: []
404
- rubygems_version: 3.3.4
405
- signing_key:
416
+ rubygems_version: 3.1.2
417
+ signing_key:
406
418
  specification_version: 4
407
419
  summary: Add Puppet features to Foreman
408
420
  test_files:
409
- - test/services/foreman_puppet/host_info_providers/config_groups_info_test.rb
410
- - test/services/foreman_puppet/host_info_providers/puppet_info_test.rb
411
- - test/services/foreman_puppet/input_type/puppet_parameter_input_test.rb
412
- - test/services/foreman_puppet/host_counter_test.rb
421
+ - test/unit/foreman_puppet_test.rb
422
+ - test/unit/foreman_puppet/puppet_class_importer_test.rb
423
+ - test/unit/foreman_puppet/template_rendering_test.rb
424
+ - test/unit/foreman_puppet/access_permissions_test.rb
425
+ - test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
426
+ - test/helpers/foreman_puppet/hosts_and_hostgroups_helper_test.rb
427
+ - test/helpers/foreman_puppet/puppetclasses_helper_test.rb
428
+ - test/integration/foreman_puppet/dashboard_js_test.rb
429
+ - test/integration/foreman_puppet/host_js_test.rb
430
+ - test/integration/foreman_puppet/hostgroup_js_test.rb
413
431
  - test/integration/foreman_puppet/smartclass_parameter_js_test.rb
414
432
  - test/integration/foreman_puppet/puppetclass_js_test.rb
415
- - test/integration/foreman_puppet/hostgroup_js_test.rb
416
433
  - test/integration/foreman_puppet/environment_js_test.rb
417
- - test/integration/foreman_puppet/dashboard_js_test.rb
418
- - test/integration/foreman_puppet/host_js_test.rb
419
- - test/graphql/mutations/hosts/create_mutation_test.rb
420
- - test/graphql/queries/puppetclasses_query_test.rb
421
- - test/graphql/queries/host_puppet_query_test.rb
422
- - test/graphql/queries/puppetclass_query_test.rb
423
- - test/graphql/queries/organization_query_test.rb
424
- - test/graphql/queries/location_query_test.rb
425
- - test/graphql/queries/environment_query_test.rb
426
- - test/graphql/queries/hostgroup_puppet_query_test.rb
427
- - test/graphql/queries/environments_query_test.rb
434
+ - test/factories/foreman_puppet_factories.rb
435
+ - test/factories/host_puppet_enhancements.rb
436
+ - test/factories/proxy_puppet_enhancements.rb
428
437
  - test/integration_puppet_helper.rb
429
- - test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
430
- - test/helpers/foreman_puppet/puppetclasses_helper_test.rb
431
- - test/helpers/foreman_puppet/hosts_and_hostgroups_helper_test.rb
432
- - test/models/foreman_puppet/config_group_class_test.rb
433
- - test/models/foreman_puppet/report_test.rb
434
- - test/models/foreman_puppet/puppetclass_lookup_key_test.rb
435
- - test/models/foreman_puppet/hostgroup_test.rb
436
438
  - test/models/foreman_puppet/config_group_test.rb
437
- - test/models/foreman_puppet/puppetclass_test.rb
439
+ - test/models/foreman_puppet/report_test.rb
438
440
  - test/models/foreman_puppet/host_puppet_facet_test.rb
441
+ - test/models/foreman_puppet/host_test.rb
442
+ - test/models/foreman_puppet/user_test.rb
443
+ - test/models/foreman_puppet/provisioning_template_test.rb
439
444
  - test/models/foreman_puppet/host_config_group_test.rb
440
445
  - test/models/foreman_puppet/lookup_value_test.rb
441
- - test/models/foreman_puppet/host_test.rb
446
+ - test/models/foreman_puppet/hostgroup_test.rb
442
447
  - test/models/foreman_puppet/hostgroup_puppet_facet_test.rb
443
- - test/models/foreman_puppet/smart_proxy_test.rb
448
+ - test/models/foreman_puppet/puppetclass_lookup_key_test.rb
444
449
  - test/models/foreman_puppet/environment_test.rb
445
- - test/models/foreman_puppet/provisioning_template_test.rb
446
- - test/models/foreman_puppet/user_test.rb
447
- - test/unit/foreman_puppet_test.rb
448
- - test/unit/foreman_puppet/puppet_class_importer_test.rb
449
- - test/unit/foreman_puppet/access_permissions_test.rb
450
- - test/unit/foreman_puppet/template_rendering_test.rb
451
- - test/factories/foreman_puppet_factories.rb
452
- - test/factories/proxy_puppet_enhancements.rb
453
- - test/factories/host_puppet_enhancements.rb
450
+ - test/models/foreman_puppet/puppetclass_test.rb
451
+ - test/models/foreman_puppet/config_group_class_test.rb
452
+ - test/models/foreman_puppet/smart_proxy_test.rb
453
+ - test/graphql/queries/hostgroup_puppet_query_test.rb
454
+ - test/graphql/queries/puppetclass_query_test.rb
455
+ - test/graphql/queries/location_query_test.rb
456
+ - test/graphql/queries/organization_query_test.rb
457
+ - test/graphql/queries/puppetclasses_query_test.rb
458
+ - test/graphql/queries/environment_query_test.rb
459
+ - test/graphql/queries/environments_query_test.rb
460
+ - test/graphql/queries/host_puppet_query_test.rb
461
+ - test/graphql/mutations/hosts/create_mutation_test.rb
454
462
  - test/test_puppet_helper.rb
463
+ - test/controllers/provisioning_templates_controller_test.rb
464
+ - test/controllers/foreman_puppet/hostgroups_controller_test.rb
465
+ - test/controllers/foreman_puppet/puppetclass_lookup_keys_controller_test.rb
455
466
  - test/controllers/foreman_puppet/environments_controller_test.rb
456
467
  - test/controllers/foreman_puppet/puppet_smart_proxies_controller_test.rb
457
- - test/controllers/foreman_puppet/puppetclass_lookup_keys_controller_test.rb
458
- - test/controllers/foreman_puppet/hostgroups_controller_test.rb
459
- - test/controllers/foreman_puppet/config_groups_controller_test.rb
468
+ - test/controllers/foreman_puppet/hosts_controller_test.rb
460
469
  - test/controllers/foreman_puppet/api/v2/template_combinations_controller_test.rb
470
+ - test/controllers/foreman_puppet/api/v2/smart_class_parameters_controller_test.rb
471
+ - test/controllers/foreman_puppet/api/v2/host_classes_controller_test.rb
472
+ - test/controllers/foreman_puppet/api/v2/hostgroups_controller_test.rb
473
+ - test/controllers/foreman_puppet/api/v2/lookups_common_controller_test.rb
461
474
  - test/controllers/foreman_puppet/api/v2/environments_controller_test.rb
475
+ - test/controllers/foreman_puppet/api/v2/hosts_controller_test.rb
462
476
  - test/controllers/foreman_puppet/api/v2/hostgroup_classes_controller_test.rb
477
+ - test/controllers/foreman_puppet/api/v2/puppetclasses_controller_test.rb
478
+ - test/controllers/foreman_puppet/api/v2/smart_proxies_controller_test.rb
463
479
  - test/controllers/foreman_puppet/api/v2/override_values_controller_test.rb
464
- - test/controllers/foreman_puppet/api/v2/smart_class_parameters_controller_test.rb
465
- - test/controllers/foreman_puppet/api/v2/hostgroups_controller_test.rb
466
480
  - test/controllers/foreman_puppet/api/v2/config_groups_controller_test.rb
467
- - test/controllers/foreman_puppet/api/v2/lookups_common_controller_test.rb
468
- - test/controllers/foreman_puppet/api/v2/host_classes_controller_test.rb
469
481
  - test/controllers/foreman_puppet/api/v2/provisioning_templates_controller_test.rb
470
- - test/controllers/foreman_puppet/api/v2/smart_proxies_controller_test.rb
471
- - test/controllers/foreman_puppet/api/v2/puppetclasses_controller_test.rb
472
- - test/controllers/foreman_puppet/api/v2/hosts_controller_test.rb
473
482
  - test/controllers/foreman_puppet/puppetclasses_controller_test.rb
474
- - test/controllers/foreman_puppet/hosts_controller_test.rb
475
- - test/controllers/provisioning_templates_controller_test.rb
483
+ - test/controllers/foreman_puppet/config_groups_controller_test.rb
484
+ - test/services/foreman_puppet/input_type/puppet_parameter_input_test.rb
485
+ - test/services/foreman_puppet/host_counter_test.rb
486
+ - test/services/foreman_puppet/host_info_providers/config_groups_info_test.rb
487
+ - test/services/foreman_puppet/host_info_providers/puppet_info_test.rb
@@ -1,44 +0,0 @@
1
- <ul id="proxy-puppetca-tab" class="nav nav-tabs nav-tabs-pf">
2
- <li class="active"><a href="#ca_general" data-toggle="tab"><%= _("General") %></a></li>
3
- <% if authorized_for(:permission => :view_smart_proxies_puppetca, :auth_object => @smart_proxy, :authorizer => authorizer) %>
4
- <li><a href="#certificates" data-toggle="tab"><%= _("Certificates") %></a></li>
5
- <% end %>
6
- <% if authorized_for(:permission => :view_smart_proxies_autosign, :auth_object => @smart_proxy, :authorizer => authorizer) %>
7
- <li><a href="#autosign" data-toggle="tab"><%= _("Autosign entries") %></a></li>
8
- <% end %>
9
- </ul>
10
- <div id="proxy-puppetca-tab-content" class="tab-content">
11
- <div class="tab-pane active in" id="ca_general">
12
- <div class="row">
13
- <div class="col-md-6">
14
- <%= show_feature_version('puppetca') %>
15
- <div class="row">
16
- <div class="col-md-4"><strong><%= _('Hosts managed:') %></strong></div>
17
- <div class="col-md-8">
18
- <%= link_to Host::Managed.where(:puppet_ca_proxy_id => @smart_proxy.id).count, hosts_path(:search => "puppet_ca = \"#{@smart_proxy.name}\"") %>
19
- </div>
20
- </div>
21
- </div>
22
- </div>
23
- <div class="container-fluid container-cards-pf">
24
- <div class="row row-cards-pf">
25
- <% if authorized_for(:permission => :view_smart_proxies_puppetca, :auth_object => @smart_proxy) %>
26
- <span data-ajax-url="<%= counts_smart_proxy_puppetca_path(:smart_proxy_id => @smart_proxy) %>"><%= spinner%></span>
27
- <span data-ajax-url="<%= expiry_smart_proxy_puppetca_path(:smart_proxy_id => @smart_proxy) %>"><%= spinner%></span>
28
- <% end %>
29
- <% if authorized_for(:permission => :view_smart_proxies_autosign, :auth_object => @smart_proxy, :authorizer => authorizer) %>
30
- <span data-ajax-url="<%= counts_smart_proxy_autosign_path(:smart_proxy_id => @smart_proxy) %>"><%= spinner%></span>
31
- <% end %>
32
- </div>
33
- </div>
34
- </div>
35
- <% if authorized_for(:permission => :view_smart_proxies_puppetca, :auth_object => @smart_proxy, :authorizer => authorizer) %>
36
- <div class="tab-pane" id="certificates" data-ajax-url="<%= smart_proxy_puppetca_index_path(:smart_proxy_id => @smart_proxy) %>" data-on-complete="certTable"><%= spinner %></div>
37
- <% end %>
38
- <% if authorized_for(:permission => :view_smart_proxies_autosign, :auth_object => @smart_proxy, :authorizer => authorizer) %>
39
- <div class="tab-pane" id="autosign" data-ajax-url="<%= smart_proxy_autosign_index_path(:smart_proxy_id => @smart_proxy) %>" data-on-complete="tfm.tools.activateDatatables"><%= spinner %></div>
40
- <% if authorized_for(:permission => :create_smart_proxies_autosign, :auth_object => @smart_proxy, :authorizer => authorizer) %>
41
- <div data-ajax-url=<%= new_smart_proxy_autosign_path(:smart_proxy_id => @smart_proxy) %>></div>
42
- <% end %>
43
- <% end %>
44
- </div>
@@ -1,30 +0,0 @@
1
- import $ from 'jquery';
2
-
3
- import * as classEditor from './src/foreman_class_edit';
4
- import * as hostForm from './src/foreman_puppet_host_form';
5
-
6
- window.tfm = Object.assign(window.tfm || {}, {
7
- classEditor,
8
- puppetEnc: {
9
- hostForm,
10
- },
11
- });
12
-
13
- // TODO: the checkForUnavailablePuppetclasses is very nasty
14
- $(document)
15
- .on('change', '.hostgroup-select', evt => {
16
- const form = $('form.host-form')[0];
17
- if (form && form.dataset.id) hostForm.updatePuppetclasses(evt.target);
18
- })
19
- .on('change', '.interface_domain', evt => {
20
- hostForm.reloadPuppetclassParams();
21
- })
22
- .on('change', '.host-architecture-os-select', evt => {
23
- hostForm.reloadPuppetclassParams();
24
- })
25
- .on('ContentLoad', evt => {
26
- hostForm.checkForUnavailablePuppetclasses();
27
- });
28
- $(window).on('load', evt => {
29
- hostForm.checkForUnavailablePuppetclasses();
30
- });