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 +4 -4
- data/app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb +1 -1
- data/app/models/concerns/foreman_remote_execution/host_extensions.rb +2 -1
- data/app/views/job_invocations/_form.html.erb +1 -1
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/test/unit/concerns/host_extensions_test.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 539d13cffc47ca8655fbb368020cd86f5305ed97da5825acc49ce1e671badfc2
|
4
|
+
data.tar.gz: e5798eee85ad923d0e17fdf87e663ca2b64eac28df3c44aab4c8ae670f2d92f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
<%=
|
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>
|
@@ -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.
|
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-
|
11
|
+
date: 2019-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|