foreman_puppet 4.1.0 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -5
  3. data/Rakefile +0 -5
  4. data/app/graphgl/concerns/foreman_puppet/mutations/hosts/create_extensions.rb +9 -5
  5. data/app/graphgl/foreman_puppet/types/environment.rb +1 -4
  6. data/app/graphgl/foreman_puppet/types/puppetclass.rb +1 -4
  7. data/lib/foreman_puppet/register.rb +6 -4
  8. data/lib/foreman_puppet/version.rb +1 -1
  9. data/locale/ca/LC_MESSAGES/foreman_puppet.mo +0 -0
  10. data/locale/ca/foreman_puppet.edit.po +1221 -0
  11. data/locale/ca/foreman_puppet.po +41 -7
  12. data/locale/ca/foreman_puppet.po.time_stamp +0 -0
  13. data/locale/cs_CZ/LC_MESSAGES/foreman_puppet.mo +0 -0
  14. data/locale/cs_CZ/foreman_puppet.edit.po +1208 -0
  15. data/locale/cs_CZ/foreman_puppet.po +42 -8
  16. data/locale/cs_CZ/foreman_puppet.po.time_stamp +0 -0
  17. data/locale/de/LC_MESSAGES/foreman_puppet.mo +0 -0
  18. data/locale/de/foreman_puppet.edit.po +1300 -0
  19. data/locale/de/foreman_puppet.po +46 -12
  20. data/locale/de/foreman_puppet.po.time_stamp +0 -0
  21. data/locale/en/LC_MESSAGES/foreman_puppet.mo +0 -0
  22. data/locale/en/foreman_puppet.edit.po +998 -0
  23. data/locale/en/foreman_puppet.po +38 -5
  24. data/locale/en/foreman_puppet.po.time_stamp +0 -0
  25. data/locale/en/foreman_puppet.pox +0 -0
  26. data/locale/en_GB/LC_MESSAGES/foreman_puppet.mo +0 -0
  27. data/locale/en_GB/foreman_puppet.edit.po +1197 -0
  28. data/locale/en_GB/foreman_puppet.po +41 -7
  29. data/locale/en_GB/foreman_puppet.po.time_stamp +0 -0
  30. data/locale/es/LC_MESSAGES/foreman_puppet.mo +0 -0
  31. data/locale/es/foreman_puppet.edit.po +1275 -0
  32. data/locale/es/foreman_puppet.po +74 -38
  33. data/locale/es/foreman_puppet.po.time_stamp +0 -0
  34. data/locale/foreman_puppet.pot +71 -18
  35. data/locale/fr/LC_MESSAGES/foreman_puppet.mo +0 -0
  36. data/locale/fr/foreman_puppet.edit.po +1290 -0
  37. data/locale/fr/foreman_puppet.po +65 -28
  38. data/locale/fr/foreman_puppet.po.time_stamp +0 -0
  39. data/locale/gl/LC_MESSAGES/foreman_puppet.mo +0 -0
  40. data/locale/gl/foreman_puppet.edit.po +1203 -0
  41. data/locale/gl/foreman_puppet.po +41 -7
  42. data/locale/gl/foreman_puppet.po.time_stamp +0 -0
  43. data/locale/it/LC_MESSAGES/foreman_puppet.mo +0 -0
  44. data/locale/it/foreman_puppet.edit.po +1233 -0
  45. data/locale/it/foreman_puppet.po +44 -9
  46. data/locale/it/foreman_puppet.po.time_stamp +0 -0
  47. data/locale/ja/LC_MESSAGES/foreman_puppet.mo +0 -0
  48. data/locale/ja/foreman_puppet.edit.po +1223 -0
  49. data/locale/ja/foreman_puppet.po +58 -24
  50. data/locale/ja/foreman_puppet.po.time_stamp +0 -0
  51. data/locale/ka/LC_MESSAGES/foreman_puppet.mo +0 -0
  52. data/locale/ka/foreman_puppet.po +873 -0
  53. data/locale/ko/LC_MESSAGES/foreman_puppet.mo +0 -0
  54. data/locale/ko/foreman_puppet.edit.po +1197 -0
  55. data/locale/ko/foreman_puppet.po +42 -8
  56. data/locale/ko/foreman_puppet.po.time_stamp +0 -0
  57. data/locale/messages.mo +0 -0
  58. data/locale/nl_NL/LC_MESSAGES/foreman_puppet.mo +0 -0
  59. data/locale/nl_NL/foreman_puppet.edit.po +1228 -0
  60. data/locale/nl_NL/foreman_puppet.po +41 -7
  61. data/locale/nl_NL/foreman_puppet.po.time_stamp +0 -0
  62. data/locale/pl/LC_MESSAGES/foreman_puppet.mo +0 -0
  63. data/locale/pl/foreman_puppet.edit.po +1238 -0
  64. data/locale/pl/foreman_puppet.po +42 -8
  65. data/locale/pl/foreman_puppet.po.time_stamp +0 -0
  66. data/locale/pt_BR/LC_MESSAGES/foreman_puppet.mo +0 -0
  67. data/locale/pt_BR/foreman_puppet.edit.po +1281 -0
  68. data/locale/pt_BR/foreman_puppet.po +75 -40
  69. data/locale/pt_BR/foreman_puppet.po.time_stamp +0 -0
  70. data/locale/ru/LC_MESSAGES/foreman_puppet.mo +0 -0
  71. data/locale/ru/foreman_puppet.edit.po +1240 -0
  72. data/locale/ru/foreman_puppet.po +42 -8
  73. data/locale/ru/foreman_puppet.po.time_stamp +0 -0
  74. data/locale/sv_SE/LC_MESSAGES/foreman_puppet.mo +0 -0
  75. data/locale/sv_SE/foreman_puppet.edit.po +1205 -0
  76. data/locale/sv_SE/foreman_puppet.po +41 -7
  77. data/locale/sv_SE/foreman_puppet.po.time_stamp +0 -0
  78. data/locale/zh_CN/LC_MESSAGES/foreman_puppet.mo +0 -0
  79. data/locale/zh_CN/foreman_puppet.edit.po +1212 -0
  80. data/locale/zh_CN/foreman_puppet.po +63 -29
  81. data/locale/zh_CN/foreman_puppet.po.time_stamp +0 -0
  82. data/locale/zh_TW/LC_MESSAGES/foreman_puppet.mo +0 -0
  83. data/locale/zh_TW/foreman_puppet.edit.po +1197 -0
  84. data/locale/zh_TW/foreman_puppet.po +42 -8
  85. data/locale/zh_TW/foreman_puppet.po.time_stamp +0 -0
  86. data/test/graphql/mutations/hosts/create_mutation_test.rb +38 -1
  87. data/test/unit/foreman_puppet/global_id_test.rb +13 -0
  88. data/webpack/src/Components/Environments/Welcome.js +24 -5
  89. data/webpack/src/Extends/Host/PuppetTab/Routes.js +2 -4
  90. data/webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/components/DescriptionCard.js +48 -72
  91. data/webpack/src/Extends/Host/PuppetTab/constants.js +4 -2
  92. data/webpack/src/Extends/Host/PuppetTab/index.js +2 -0
  93. metadata +100 -58
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 745a9b5da4d9e341965da09876aea703a9a9e40f2bfc989f002e1263aa67547b
4
- data.tar.gz: 2e80676582c1105c5839682d076f2e03ae6240721e46daf04a7c76e0721aafca
3
+ metadata.gz: e2d266777270f646110ea8caf84b754adbb7ff030cbf0b7770c903c0dcebda07
4
+ data.tar.gz: 64a320d05f07a4c9162b940b64b7cce83116b21138f66aed721a4ca2c5b5701a
5
5
  SHA512:
6
- metadata.gz: a246077d90bf3e91c5963bb603680354ee18c94a0e523067d85683ebd48ee4cd4757e88a8438a456438abd6086a3db88087099e69520bdf79f1213ddddb0b282
7
- data.tar.gz: 58f460b97fad16c5d4ca45850d58baf059e70fd72b7ab898369c64200bfe5a3dd3b472d3b52dfdc0f2650061c49604e59a6cafec5b97933ad996d9aed9332640
6
+ metadata.gz: '0755581750978e000fcfa59d3a92e3557f515fad48220189000deca9168dee7e2dd12076ce1c96773bf53e931674c1e07b419f631ce760243f7b74c5aebe414a'
7
+ data.tar.gz: 687891997eb4c629b533235a80cd9077b8548f6d48058b042c71bb854650029632bead4cbdfa01295a1fe1ba6a368bf3f4ccc2ddcec5605d35570557c235dc8c
data/README.md CHANGED
@@ -31,18 +31,15 @@ Some features will remain in core:
31
31
 
32
32
  ## Compatibility
33
33
 
34
- Foreman 3.0 will be the first release where the Puppet functionality is mostly extracted.
35
- Therefore, this plugin is only required for 3.0 and onwards.
36
- You can install it on Foreman 2.5 to prepare for the Foreman update.
37
-
38
34
  |Foreman version|Plugin version|Notes |
39
35
  |---------------|--------------|------------------------------------------|
36
+ | >= 3.5 | ~> 5.0 | Required |
40
37
  | ~> 3.4 | ~> 4.1 | Required |
41
38
  | ~> 3.3 | ~> 4.0 | Required |
42
39
  | ~> 3.2 | ~> 3.0 | Required |
43
40
  | ~> 3.1 | ~> 2.0 | Required |
44
41
  | ~> 3.0 | ~> 1.0 | Required |
45
- | >= 2.5 | ~> 0.1 | Optional; replaces Core features |
42
+ | ~> 2.5 | ~> 0.1 | Optional; replaces Core features |
46
43
  | < 2.5 | - | Not supported (functionality is in Core) |
47
44
 
48
45
  ## Installation
data/Rakefile CHANGED
@@ -14,8 +14,6 @@ load 'rails/tasks/engine.rake'
14
14
  Bundler::GemHelper.install_tasks
15
15
 
16
16
  require 'rake/testtask'
17
- require 'rspec/core'
18
- require 'rspec/core/rake_task'
19
17
 
20
18
  Rake::TestTask.new(test: 'app:db:test:prepare') do |t|
21
19
  t.libs << 'test'
@@ -25,7 +23,4 @@ Rake::TestTask.new(test: 'app:db:test:prepare') do |t|
25
23
  t.verbose = false
26
24
  end
27
25
 
28
- desc 'Run all specs in spec directory (excluding plugin specs)'
29
- RSpec::Core::RakeTask.new(spec: 'app:db:test:prepare')
30
-
31
26
  task default: :test
@@ -4,16 +4,20 @@ module ForemanPuppet
4
4
  module Mutations
5
5
  module Hosts
6
6
  module CreateExtensions
7
- PUPPET_PARAMS = %i[
8
- environment
9
- puppetclasses
10
- ].freeze
11
-
12
7
  extend ActiveSupport::Concern
13
8
 
14
9
  included do
10
+ prepend PatchMethods
11
+
15
12
  argument :environment_id, GraphQL::Types::ID, loads: ForemanPuppet::Types::Environment
16
13
  argument :puppetclass_ids, [GraphQL::Types::ID], loads: ForemanPuppet::Types::Puppetclass, as: :puppetclasses
14
+ end
15
+
16
+ module PatchMethods
17
+ PUPPET_PARAMS = %i[
18
+ environment
19
+ puppetclasses
20
+ ].freeze
17
21
 
18
22
  private
19
23
 
@@ -1,6 +1,7 @@
1
1
  module ForemanPuppet
2
2
  module Types
3
3
  class Environment < ::Types::BaseObject
4
+ graphql_name 'ForemanPuppet_Environment'
4
5
  model_class ForemanPuppet::Environment
5
6
  description 'An Environment'
6
7
 
@@ -11,10 +12,6 @@ module ForemanPuppet
11
12
  has_many :locations, ::Types::Location
12
13
  has_many :organizations, ::Types::Organization
13
14
  has_many :puppetclasses, ForemanPuppet::Types::Puppetclass
14
-
15
- def self.graphql_definition
16
- super.tap { |type| type.instance_variable_set(:@name, 'ForemanPuppet::Environment') }
17
- end
18
15
  end
19
16
  end
20
17
  end
@@ -1,6 +1,7 @@
1
1
  module ForemanPuppet
2
2
  module Types
3
3
  class Puppetclass < ::Types::BaseObject
4
+ graphql_name 'ForemanPuppet_Puppetclass'
4
5
  model_class ForemanPuppet::Puppetclass
5
6
  description 'A Puppetclass'
6
7
 
@@ -11,10 +12,6 @@ module ForemanPuppet
11
12
  has_many :environments, ForemanPuppet::Types::Environment
12
13
  has_many :locations, ::Types::Location
13
14
  has_many :organizations, ::Types::Organization
14
-
15
- def self.graphql_definition
16
- super.tap { |type| type.instance_variable_set(:@name, 'ForemanPuppet::Puppetclass') }
17
- end
18
15
  end
19
16
  end
20
17
  end
@@ -1,5 +1,5 @@
1
1
  Foreman::Plugin.register :foreman_puppet do
2
- requires_foreman '>= 3.3.0'
2
+ requires_foreman '>= 3.5.0'
3
3
  # Add Global JS file for extending foreman-core components and routes
4
4
  register_global_js_file 'global'
5
5
 
@@ -225,8 +225,10 @@ Foreman::Plugin.register :foreman_puppet do
225
225
  priority: 100
226
226
  end
227
227
  end
228
- extend_page 'hosts/_list' do |cx|
229
- cx.add_pagelet :hosts_table_column_header, resource_type: 'host', partial: 'hosts/foreman_puppet/form_list_env_field_header', priority: 100
230
- cx.add_pagelet :hosts_table_column_content, resource_type: 'host', partial: 'hosts/foreman_puppet/form_list_env_field_content', priority: 100
228
+ extend_page 'hosts/_list' do |context|
229
+ context.with_profile :puppet, _('Puppet'), default: true do
230
+ add_pagelet :hosts_table_column_header, key: :environment, label: s_('Puppet env'), sortable: true, width: '10%', class: 'hidden-xs'
231
+ add_pagelet :hosts_table_column_content, key: :environment, callback: ->(host) { host.environment }, class: 'hidden-xs ellipsis'
232
+ end
231
233
  end
232
234
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanPuppet
2
- VERSION = '4.1.0'.freeze
2
+ VERSION = '5.1.0'.freeze
3
3
  end