foreman_remote_execution 4.2.2 → 4.2.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a9f5c20b58b5911c612164cc806d63b3096c81506b18cd11423fb4b073bdec4
|
4
|
+
data.tar.gz: 2c8615b8ef06bf5d5adc3e62ab2a36906714ebe9e99adbf13dfb3eaa742819d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 549daa0a07ac47a7ed596187fd86943d9e1e517dab1d653af8f454ccee9e2b83fa85b6e2ec188201e5f849978b50b69108a0dbf6a6c67844b909de3b1b1e846f
|
7
|
+
data.tar.gz: b6e71fedfb385b05aa488fd65b68c2c242eba84783da007e26a6cf5f5b1b837de7bcbcfeecc72459b4c48cee93513f45948aa14318bbc548a52f159f2ae967cd
|
@@ -1,12 +1,16 @@
|
|
1
1
|
<% items = [{ :caption => _('Job invocations'), :url => job_invocations_path },
|
2
2
|
{ :caption => @template_invocation.job_invocation.description,
|
3
|
-
:url => job_invocation_path(@template_invocation.job_invocation_id) }
|
4
|
-
{ :caption => _('Template Invocation for %s') % @template_invocation.host.name }] %>
|
3
|
+
:url => job_invocation_path(@template_invocation.job_invocation_id) }]
|
5
4
|
|
6
|
-
|
5
|
+
if @host
|
6
|
+
items << { :caption => _('Template Invocation for %s') % @host.name }
|
7
|
+
breadcrumbs(:resource_url => template_invocations_api_job_invocation_path(@template_invocation.job_invocation_id),
|
7
8
|
:name_field => 'host_name',
|
8
9
|
:switcher_item_url => template_invocation_path(':id'),
|
9
10
|
:items => items)
|
11
|
+
else
|
12
|
+
breadcrumbs(items: items, switchable: false)
|
13
|
+
end
|
10
14
|
%>
|
11
15
|
|
12
16
|
<% stylesheet 'foreman_remote_execution/foreman_remote_execution' %>
|
@@ -18,31 +22,34 @@
|
|
18
22
|
<%= button_group(link_to_function(_('Toggle command'), '$("div.preview").toggle()', :class => 'btn btn-default'),
|
19
23
|
link_to_function(_('Toggle STDERR'), '$("div.line.stderr").toggle()', :class => 'btn btn-default'),
|
20
24
|
link_to_function(_('Toggle STDOUT'), '$("div.line.stdout").toggle()', :class => 'btn btn-default'),
|
21
|
-
link_to_function(_('Toggle DEBUG'), '$("div.line.debug").toggle()', :class => 'btn btn-default')) %>
|
25
|
+
link_to_function(_('Toggle DEBUG'), '$("div.line.debug").toggle()', :class => 'btn btn-default')) if @host %>
|
22
26
|
<%= button_group(template_invocation_task_buttons(@template_invocation_task, @template_invocation.job_invocation)) %>
|
23
27
|
</div>
|
24
28
|
</div>
|
29
|
+
<% if @host %>
|
30
|
+
<h3><%= _('Target: ') %><%= link_to(@host.name, host_path(@host)) %></h3>
|
25
31
|
|
26
|
-
<
|
27
|
-
|
28
|
-
|
29
|
-
<%= preview_box(@template_invocation, @host) %>
|
30
|
-
</div>
|
32
|
+
<div class="preview hidden">
|
33
|
+
<%= preview_box(@template_invocation, @host) %>
|
34
|
+
</div>
|
31
35
|
|
32
|
-
<div class="terminal" data-refresh-url="<%= template_invocation_path(@template_invocation) %>">
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
36
|
+
<div class="terminal" data-refresh-url="<%= template_invocation_path(@template_invocation) %>">
|
37
|
+
<% if @error %>
|
38
|
+
<div class="line error"><%= @error %></div>
|
39
|
+
<% else %>
|
40
|
+
<%= link_to_function(_('Scroll to bottom'), '$("html, body").animate({ scrollTop: $(document).height() }, "slow");', :class => 'pull-right scroll-link-bottom') %>
|
37
41
|
|
38
|
-
|
39
|
-
|
40
|
-
|
42
|
+
<div class="printable">
|
43
|
+
<%= render :partial => 'output_line_set', :collection => normalize_line_sets(@line_sets) %>
|
44
|
+
</div>
|
41
45
|
|
42
|
-
|
43
|
-
|
44
|
-
</div>
|
46
|
+
<%= link_to_function(_('Scroll to top'), '$("html, body").animate({ scrollTop: 0 }, "slow");', :class => 'pull-right scroll-link-top') %>
|
47
|
+
<% end %>
|
48
|
+
</div>
|
45
49
|
|
46
|
-
<script>
|
47
|
-
|
48
|
-
</script>
|
50
|
+
<script>
|
51
|
+
<%= render :partial => 'refresh.js' %>
|
52
|
+
</script>
|
53
|
+
<% else %>
|
54
|
+
<%= _("Could not display data for job invocation.") %>
|
55
|
+
<% end %>
|
data/config/routes.rb
CHANGED
@@ -171,6 +171,16 @@ module Api
|
|
171
171
|
assert_response :success
|
172
172
|
end
|
173
173
|
|
174
|
+
test 'should provide outputs for selected hosts in the job' do
|
175
|
+
post :outputs, params: { :id => @invocation.id, :search_query => "id = #{@invocation.targeting.host_ids.first}" }, as: :json
|
176
|
+
result = ActiveSupport::JSON.decode(@response.body)
|
177
|
+
host_output = result['outputs'].first
|
178
|
+
assert_equal host_output['host_id'], @invocation.targeting.host_ids.first
|
179
|
+
assert_equal host_output['refresh'], true
|
180
|
+
assert_equal host_output['output'], []
|
181
|
+
assert_response :success
|
182
|
+
end
|
183
|
+
|
174
184
|
test 'should provide outputs for hosts in the job matching a search query' do
|
175
185
|
get :outputs, params: { :id => @invocation.id, :search_query => "name = definitely_not_in_the_job" }
|
176
186
|
result = ActiveSupport::JSON.decode(@response.body)
|
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: 4.2.
|
4
|
+
version: 4.2.3
|
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: 2021-
|
11
|
+
date: 2021-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|