foreman_remote_execution 3.1.0 → 3.3.2
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 +4 -4
- data/.eslintrc +5 -30
- data/.github/workflows/ci.yml +100 -0
- data/.gitignore +1 -0
- data/.rubocop_todo.yml +3 -0
- data/Gemfile +1 -0
- data/app/controllers/api/v2/job_invocations_controller.rb +22 -1
- data/app/controllers/api/v2/template_invocations_controller.rb +4 -1
- data/app/helpers/job_invocations_chart_helper.rb +2 -0
- data/app/helpers/job_invocations_helper.rb +6 -1
- data/app/helpers/remote_execution_helper.rb +39 -30
- data/app/lib/actions/remote_execution/run_host_job.rb +3 -2
- data/app/lib/proxy_api/remote_execution_ssh.rb +6 -0
- data/app/models/concerns/foreman_remote_execution/host_extensions.rb +1 -1
- data/app/models/concerns/foreman_remote_execution/orchestration/ssh.rb +63 -0
- data/app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb +4 -0
- data/app/models/host_status/execution_status.rb +9 -1
- data/app/models/remote_execution_provider.rb +5 -0
- data/app/services/default_proxy_proxy_selector.rb +18 -0
- data/app/views/api/v2/job_invocations/main.json.rabl +8 -2
- data/app/views/job_invocations/_card_results.html.erb +1 -0
- data/app/views/job_invocations/_card_user_input.html.erb +1 -1
- data/app/views/job_invocations/_tab_hosts.html.erb +3 -23
- data/app/views/job_invocations/_tab_overview.html.erb +1 -1
- data/app/views/job_invocations/_user_input.html.erb +1 -1
- data/app/views/job_invocations/show.html.erb +1 -7
- data/app/views/job_invocations/show.json.erb +4 -0
- data/config/routes.rb +2 -1
- data/db/seeds.d/70-job_templates.rb +1 -1
- data/foreman_remote_execution.gemspec +5 -6
- data/lib/foreman_remote_execution/engine.rb +2 -0
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/locale/action_names.rb +3 -3
- data/locale/de/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/de/foreman_remote_execution.po +65 -16
- data/locale/en/foreman_remote_execution.po +63 -15
- data/locale/en_GB/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/en_GB/foreman_remote_execution.po +64 -15
- data/locale/es/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/es/foreman_remote_execution.po +66 -17
- data/locale/foreman_remote_execution.pot +193 -148
- data/locale/fr/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/fr/foreman_remote_execution.po +66 -17
- data/locale/ja/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ja/foreman_remote_execution.po +66 -17
- data/locale/ko/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ko/foreman_remote_execution.po +65 -15
- data/locale/pt_BR/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/pt_BR/foreman_remote_execution.po +66 -17
- data/locale/ru/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ru/foreman_remote_execution.po +65 -18
- data/locale/zh_CN/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/zh_CN/foreman_remote_execution.po +66 -17
- data/locale/zh_TW/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/zh_TW/foreman_remote_execution.po +65 -16
- data/package.json +16 -33
- data/test/functional/api/v2/job_invocations_controller_test.rb +42 -14
- data/test/functional/job_invocations_controller_test.rb +12 -0
- data/test/models/orchestration/ssh_test.rb +56 -0
- data/test/unit/concerns/host_extensions_test.rb +7 -0
- data/test/unit/remote_execution_provider_test.rb +4 -1
- data/webpack/__mocks__/foremanReact/common/I18n.js +1 -0
- data/webpack/__mocks__/foremanReact/components/common/ActionButtons/ActionButtons.js +3 -0
- data/webpack/__mocks__/foremanReact/constants.js +3 -0
- data/webpack/index.js +9 -22
- data/webpack/react_app/components/TargetingHosts/TargetingHosts.js +52 -0
- data/webpack/react_app/components/TargetingHosts/TargetingHostsActions.js +8 -0
- data/webpack/react_app/components/TargetingHosts/TargetingHostsConsts.js +1 -0
- data/webpack/react_app/components/TargetingHosts/TargetingHostsSelectors.js +12 -0
- data/webpack/react_app/components/TargetingHosts/__tests__/HostItem.test.js +6 -0
- data/webpack/react_app/components/TargetingHosts/__tests__/HostStatus.test.js +6 -0
- data/webpack/react_app/components/TargetingHosts/__tests__/TargetingHosts.test.js +6 -0
- data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/HostItem.test.js.snap +31 -0
- data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/HostStatus.test.js.snap +12 -0
- data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/TargetingHosts.test.js.snap +81 -0
- data/webpack/react_app/components/TargetingHosts/__tests__/fixtures.js +43 -0
- data/webpack/react_app/components/TargetingHosts/components/HostItem.js +39 -0
- data/webpack/react_app/components/TargetingHosts/components/HostStatus.js +54 -0
- data/webpack/react_app/components/TargetingHosts/index.js +37 -0
- data/webpack/react_app/components/jobInvocations/AggregateStatus/index.js +10 -0
- data/webpack/react_app/components/jobInvocations/AggregateStatus/index.test.js +6 -3
- data/webpack/react_app/components/jobInvocations/index.js +19 -7
- data/webpack/react_app/redux/actions/jobInvocations/index.js +12 -8
- data/webpack/react_app/redux/consts.js +1 -2
- data/webpack/react_app/redux/reducers/jobInvocations/index.fixtures.js +8 -40
- data/webpack/react_app/redux/reducers/jobInvocations/index.test.js +17 -11
- data/webpack/test_setup.js +2 -1
- metadata +31 -14
- data/.hound.yml +0 -19
- data/.travis.yml +0 -6
- data/app/views/job_invocations/_host_actions_td.html.erb +0 -3
- data/app/views/job_invocations/_host_name_td.html.erb +0 -8
- data/app/views/job_invocations/_host_status_td.html.erb +0 -1
- data/app/views/job_invocations/show.js.erb +0 -23
data/.travis.yml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<td class="host_name" id="<%= dom_id(host) %>-name" data-refresh_required="<%= task.nil? ? 'true' : '' %>" data-id="<%= host.id %>">
|
|
2
|
-
<% if task %>
|
|
3
|
-
<%= link_to_if_authorized host.name, hash_for_template_invocation_path(:id => template_invocation).merge(:auth_object => host, :permission => :view_hosts, :authorizer => job_hosts_authorizer) %>
|
|
4
|
-
|
|
5
|
-
<% else %>
|
|
6
|
-
<%= host.name %>
|
|
7
|
-
<% end %>
|
|
8
|
-
</td>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<td class="host_status" id="<%= dom_id(host) %>-status" data-refresh_required="<%= task.nil? || task.pending? ? 'true' : '' %>" data-id="<%= host.id %>"><%= template_invocation_status(task) %></td>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
$('div#title_action div.btn-group').html('<%= button_group(job_invocation_task_buttons(@job_invocation.task)).html_safe %>');
|
|
2
|
-
<% if params[:hosts_needs_refresh] == 'true' && @job_invocation.resolved? %>
|
|
3
|
-
var hosts_table = $('div#hosts');
|
|
4
|
-
hosts_table.html('<%=j render('tab_hosts', :job_invocation => @job_invocation, :hosts => @hosts) %>');
|
|
5
|
-
hosts_table.data('refresh_required', '');
|
|
6
|
-
<% end %>
|
|
7
|
-
|
|
8
|
-
<% ['name', 'status', 'actions', 'provider'].each do |attribute| %>
|
|
9
|
-
<% if params["host_ids_needing_#{attribute}_update"].present? %>
|
|
10
|
-
var td_element;
|
|
11
|
-
<% Host.authorized(:view_hosts, Host).where(:id => params["host_ids_needing_#{attribute}_update"]).each do |host| %>
|
|
12
|
-
<% template_invocation = @job_invocation.template_invocations.find { |template_invocation| template_invocation.host_id == host.id } %>
|
|
13
|
-
<% task = template_invocation.try(:run_host_job_task) %>
|
|
14
|
-
<% options = { :host => host, :task => task, :job_invocation => @job_invocation, :template_invocation => template_invocation } %>
|
|
15
|
-
td_element= $('#<%= dom_id(host) %>-<%= attribute %>');
|
|
16
|
-
td_element.replaceWith('<%=j render("host_#{attribute}_td", options) %>');
|
|
17
|
-
<% end %>
|
|
18
|
-
<% end %>
|
|
19
|
-
<% end %>
|
|
20
|
-
|
|
21
|
-
<% if @auto_refresh %>
|
|
22
|
-
delayed_refresh($('script#job_invocation_refresh').data('refresh-url'), job_invocation_refresh_data());
|
|
23
|
-
<% end %>
|