foreman_virt_who_configure 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f67a089084c8f494463d27020a510a6141d32aa
4
- data.tar.gz: 79cda417d8d80bcdedfe3a0709c2758d7c083d92
3
+ metadata.gz: 555249a1ed520837554c1f8802032999a22f4b0a
4
+ data.tar.gz: '069195e8ac45be12a1ba9e81a6275b7136890027'
5
5
  SHA512:
6
- metadata.gz: 3ef1c22a5a6fc2dff642e15c293309ad0f04ede5d5e7f29fef0b2cf12563b4fe802c3288a7c6bd31d7d3abbcd49c403a5e8892a8490073d3ff1fe79249e14cd0
7
- data.tar.gz: 37bba004933053195c22693a4b8d12220b7c8e751e6dadedf849749280352bc06a0774ba1df49838d80b378acdd3494b006ba87d3e95fe361fdcd3761191046d
6
+ metadata.gz: '098fdd4be89d11e006df34dce29781c5fbc2b95da9bc07970f44b107d0f3e2f56d1fe58a59d769ec29c8ea1450f7014d4956f2829a6cec5801570829282469d5'
7
+ data.tar.gz: 2ed13a393d1a829bcac562d659e0f752629af89589fe31220ec2d079b4d08c9037e8e071023bba05b538afc530d96358577cd33f91d0c7320b414758f36c505f
@@ -1,4 +1,5 @@
1
1
  function virt_who_update_listing_mode() {
2
+ var hypervisor_type = $('#foreman_virt_who_configure_config_hypervisor_type').val();
2
3
  var filtering_mode = $('#foreman_virt_who_configure_config_listing_mode').val();
3
4
  var whitelist = $('#foreman_virt_who_configure_config_whitelist').parents('div.form-group');
4
5
  var blacklist = $('#foreman_virt_who_configure_config_blacklist').parents('div.form-group');
@@ -13,14 +14,14 @@ function virt_who_update_listing_mode() {
13
14
  blacklist_parent.hide();
14
15
  } else if (filtering_mode == '1') {
15
16
  whitelist.show();
16
- whitelist_parent.show();
17
+ if (hypervisor_type == 'esx') { whitelist_parent.show(); } else { whitelist_parent.hide(); }
17
18
  blacklist.hide();
18
19
  blacklist_parent.hide();
19
20
  } else if (filtering_mode == '2') {
20
21
  whitelist.hide();
21
22
  whitelist_parent.hide();
22
23
  blacklist.show();
23
- blacklist_parent.show();
24
+ if (hypervisor_type == 'esx') { blacklist_parent.show(); } else { blacklist_parent.hide(); }
24
25
  }
25
26
  }
26
27
 
@@ -32,6 +33,7 @@ function virt_who_update_hypervisor_fields() {
32
33
  element.closest('.form-group').toggle(selected_type != 'libvirt' && selected_type != 'kubevirt');
33
34
  var element = $('#foreman_virt_who_configure_config_kubeconfig_path');
34
35
  element.closest('.form-group').toggle(selected_type == 'kubevirt');
36
+ virt_who_update_listing_mode();
35
37
  }
36
38
 
37
39
  function virt_who_update_credentials_help() {
@@ -39,8 +39,14 @@
39
39
  <%= config_attribute :satellite_url, @config.satellite_url, _('Satellite server FQDN')%>
40
40
  <%= config_attribute :hypervisor_id, @config.hypervisor_id, _('Hypervisor ID') %>
41
41
  <%= config_attribute :listing_mode, _(ForemanVirtWhoConfigure::Config::FILTERING_MODES[@config.listing_mode.to_s]), _('Filtering') %>
42
- <%= config_attribute :whitelist, @config.whitelist if @config.whitelist.present? %>
43
- <%= config_attribute :blacklist, @config.blacklist if @config.blacklist.present? %>
42
+ <% if @config.listing_mode == ForemanVirtWhoConfigure::Config::WHITELIST %>
43
+ <%= config_attribute :whitelist, @config.whitelist, _('Filter Hosts') if @config.whitelist.present? %>
44
+ <%= config_attribute :filter_host_parents, @config.filter_host_parents if @config.filter_host_parents.present? %>
45
+ <% end %>
46
+ <% if @config.listing_mode == ForemanVirtWhoConfigure::Config::BLACKLIST %>
47
+ <%= config_attribute :blacklist, @config.blacklist, _('Exclude Hosts') if @config.blacklist.present? %>
48
+ <%= config_attribute :exclude_host_parents, @config.exclude_host_parents if @config.exclude_host_parents.present? %>
49
+ <% end %>
44
50
  <%= config_attribute :debug, checked_icon(@config.debug), _('Enable debugging output?') %>
45
51
  <%= config_attribute :proxy, @config.proxy if @config.proxy.present? %>
46
52
  <%= config_attribute :no_proxy, @config.no_proxy if @config.no_proxy.present? %>
@@ -1,3 +1,3 @@
1
1
  module ForemanVirtWhoConfigure
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_virt_who_configure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman virt-who-configure team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-27 00:00:00.000000000 Z
11
+ date: 2019-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello