foreman_remote_execution 2.0.5 → 2.0.6

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
  SHA256:
3
- metadata.gz: 4aba9a7fccd6e4e3833bd7b102ea464e7266947d2b661ed23665588b969ce848
4
- data.tar.gz: 037e1902f40fa780a090aca7f0141be58e0a10805afef0ca0ae5ebc3f7675e2a
3
+ metadata.gz: 539d13cffc47ca8655fbb368020cd86f5305ed97da5825acc49ce1e671badfc2
4
+ data.tar.gz: e5798eee85ad923d0e17fdf87e663ca2b64eac28df3c44aab4c8ae670f2d92f6
5
5
  SHA512:
6
- metadata.gz: a79d209933c9b81a4f0276e20602241147e442f4060d62afd0eab6ccc1d22a65c5b8e95025abfcb0be013ac5d7857f4ccc3cddbea2abf7b67bc2174d6a572406
7
- data.tar.gz: 19e249a6a63c909a36fb89e7f614d0db5224d4c14b6dbff92fc078a5259eba9f9cf8d6d9e852f81bb73e32cd9a773dff5b95c48b21223406a6040e4474639802
6
+ metadata.gz: b59f442d45cc2e8868fc503baaec204bcf9d6caaa297ad54c09d7c130c34ea0f74379d31d585e280d5503021748b9fe7eaae2562b916eb24f5aa18a407e0c5a8
7
+ data.tar.gz: 7518ada3ae3501683b39a4afeb08748574dbd323db1c40e1ea1f1b6d58200cb9454f4589023246324a12f2f96e11a3122129a7a4fb84478c0da57fc6aa5d7d1d
@@ -23,7 +23,7 @@ module ForemanRemoteExecution
23
23
  def web_console_button(host, *args)
24
24
  return unless authorized_for(permission: 'cockpit_hosts', auth_object: host)
25
25
  url = SSHExecutionProvider.cockpit_url_for_host(host.name)
26
- url ? link_to(_('Web Console'), url, :class => 'btn btn-default') : nil
26
+ url ? link_to(_('Web Console'), url, :class => 'btn btn-default', :id => :'web-console-button') : nil
27
27
  end
28
28
 
29
29
  def host_title_actions(*args)
@@ -50,7 +50,8 @@ module ForemanRemoteExecution
50
50
  keys = remote_execution_ssh_keys
51
51
  source = 'global'
52
52
  if keys.present?
53
- params['remote_execution_ssh_keys'] = {:value => keys, :safe_value => keys, :source => source}
53
+ value, safe_value = params.fetch('remote_execution_ssh_keys', {}).values_at(:value, :safe_value).map { |v| v || [] }
54
+ params['remote_execution_ssh_keys'] = {:value => value + keys, :safe_value => safe_value + keys, :source => source}
54
55
  end
55
56
  [:remote_execution_ssh_user, :remote_execution_effective_user_method,
56
57
  :remote_execution_connect_by_ip].each do |key|
@@ -33,7 +33,7 @@
33
33
  <% end %>
34
34
  </span>
35
35
  <%= selectable_f targeting_fields, :bookmark_id, @composer.available_bookmarks.map { |b| [b.name, b.id] }, :selected => @composer.targeting.bookmark_id, :include_blank => true %>
36
- <%= autocomplete_f targeting_fields, :search_query, :search_query => @composer.displayed_search_query, :full_path => auto_complete_search_hosts_path %>
36
+ <%= textarea_f targeting_fields, :search_query, :value => @composer.displayed_search_query, :rows => 5, :class => 'autocomplete-input form-control', :'data-url' => auto_complete_search_hosts_path %>
37
37
 
38
38
  <div class="form-group ">
39
39
  <label class="col-md-2 control-label"><%= _('Resolves to') %></label>
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecution
2
- VERSION = '2.0.5'.freeze
2
+ VERSION = '2.0.6'.freeze
3
3
  end
@@ -41,6 +41,13 @@ class ForemanRemoteExecutionHostExtensionsTest < ActiveSupport::TestCase
41
41
  host.remote_execution_ssh_keys.must_include sshkey
42
42
  end
43
43
 
44
+ it 'merges ssh keys from host parameters and proxies' do
45
+ key = 'ssh-rsa not-even-a-key something@somewhere.com'
46
+ host.host_parameters << FactoryBot.create(:host_parameter, :host => host, :name => 'remote_execution_ssh_keys', :value => [key])
47
+ host.host_param('remote_execution_ssh_keys').must_include key
48
+ host.host_param('remote_execution_ssh_keys').must_include sshkey
49
+ end
50
+
44
51
  it 'has ssh keys in the parameters even when no user specified' do
45
52
  # this is a case, when using the helper in provisioning templates
46
53
  FactoryBot.create(:smart_proxy, :ssh)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_remote_execution
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Remote Execution team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-10 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface