foreman_salt 12.0.0 → 13.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b93dcc3ed4cb4806ab2b58c7843ce90375ecaf98ad307f978d3f4c151be7854
4
- data.tar.gz: 3e8a71fd43af8e1b16dfb64a2c0450b5a0859a20f1642b639c326b4543ed4d66
3
+ metadata.gz: 36fe9df5ebf245a2e3d62f66a9368a16a71ad78bbf07ff4ac5dc6dada03ad515
4
+ data.tar.gz: 48f709a541f72c61e6fa5133f5b10e8de76fefc72e3c143a50e9b6e4069f92f8
5
5
  SHA512:
6
- metadata.gz: 02a60d1d5fcd0f83d345f41e69843312ed355f3afeefc1fba9d715335289774b36fc48a462816b3b7698df79ba3c090430f7f69b4aa0457300e07b0842bed468
7
- data.tar.gz: 348414476a5cb42f0b8d7999b49003775eaee02720f1a1488f9b8c84cb846d3bd7e50113768f75a3ff8545df8c5b17b9a5fdd13c262e2fd7240462425644f6ba
6
+ metadata.gz: 8bb26eeb33777bb1c8a763d2238d2c47ad613efc90090f562821344126a1c0df24e4b50669131902632b1a19958f322b243870b6cd5b59b182a5c4166cab6640
7
+ data.tar.gz: 6b11de698ddfa5bc6da7a8e1ce2ab839e092018b158179b2e56cb70ede9fdbb53f667b63ab81a53c4ce26bc2887555b963b229a8ec6ad622bd26bcec03e1e98b
@@ -4,6 +4,10 @@ module ForemanSalt
4
4
  # in the fact values table (/fact_values)
5
5
  class FactName < ::FactName
6
6
  def origin
7
+ 'Salt'
8
+ end
9
+
10
+ def icon_path
7
11
  'foreman_salt/Salt'
8
12
  end
9
13
  end
@@ -3,6 +3,7 @@ module ForemanSalt
3
3
  include Authorizable
4
4
  extend FriendlyId
5
5
  friendly_id :name
6
+ include Parameterizable::ByIdName
6
7
 
7
8
  has_many :hosts, :class_name => '::Host::Managed'
8
9
  has_many :hostgroups, :class_name => '::Hostgroup'
@@ -3,6 +3,7 @@ module ForemanSalt
3
3
  include Authorizable
4
4
  extend FriendlyId
5
5
  friendly_id :name
6
+ include Parameterizable::ByIdName
6
7
 
7
8
  has_many :host_salt_modules, :foreign_key => :salt_module_id
8
9
  has_many :hosts, :through => :host_salt_modules, :class_name => '::Host::Managed'
@@ -1,14 +1,13 @@
1
1
  class Setting::Salt < Setting
2
- def self.load_defaults
3
- return unless super
2
+ def self.default_settings
3
+ [
4
+ set('salt_namespace_pillars', N_("Namespace Foreman pillars under 'foreman' key"), false),
5
+ set('salt_hide_run_salt_button', N_("Hide the Run Salt state.highstate button on the host details page"), false)
6
+ ]
7
+ end
4
8
 
5
- transaction do
6
- [
7
- set('salt_namespace_pillars', N_("Namespace Foreman pillars under 'foreman' key"), false),
8
- set('salt_hide_run_salt_button', N_("Hide the Run Salt state.highstate button on the host details page"), false)
9
- ].each { |s| self.create! s.update(:category => 'Setting::Salt') }
10
- Setting['salt_hide_run_salt_button'] = true if ForemanSalt.with_remote_execution?
11
- end
12
- true
9
+ def self.load_defaults
10
+ super
11
+ Setting['salt_hide_run_salt_button'] = true if ForemanSalt.with_remote_execution?
13
12
  end
14
13
  end
@@ -4,5 +4,5 @@
4
4
  <%= selectable_f f, :id, [[_("Select salt environment"), "None"]] +
5
5
  [[_("*Clear environment*"), ""]] +
6
6
  ForemanSalt::SaltEnvironment.all.map{|e| [e.name, e.id]},{},
7
- :label => _("Salt Environment"), :onchange => "toggle_multiple_ok_button(this)" %>
7
+ :label => _("Salt Environment"), :onchange => "tfm.hosts.table.toggleMultipleOkButton(this)" %>
8
8
  <% end %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  # rubocop:disable BlockLength
4
4
  Foreman::Plugin.register :foreman_salt do
5
- requires_foreman '>= 1.19'
5
+ requires_foreman '>= 1.24'
6
6
 
7
7
  apipie_documented_controllers ["#{ForemanSalt::Engine.root}/app/controllers/foreman_salt/api/v2/*.rb"]
8
8
 
@@ -1,3 +1,3 @@
1
1
  module ForemanSalt
2
- VERSION = '12.0.0'
2
+ VERSION = '13.0.0'
3
3
  end
@@ -17,7 +17,8 @@ module ForemanSalt
17
17
  importer.import!
18
18
  imported_fact = FactName.find_by_name('a')
19
19
  assert_equal 'a', imported_fact.name
20
- assert_equal 'foreman_salt/Salt', imported_fact.origin
20
+ assert_equal 'Salt', imported_fact.origin
21
+ assert_equal 'foreman_salt/Salt', imported_fact.icon_path
21
22
  end
22
23
  end
23
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_salt
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.0.0
4
+ version: 13.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Benjamin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-02 00:00:00.000000000 Z
11
+ date: 2019-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.8.0
47
+ version: 2.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.8.0
54
+ version: 2.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement