foreman_remote_execution 3.2.2 → 3.3.4

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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc +5 -30
  3. data/.github/workflows/ci.yml +101 -0
  4. data/.gitignore +1 -0
  5. data/.rubocop_todo.yml +3 -0
  6. data/Gemfile +1 -0
  7. data/app/assets/stylesheets/foreman_remote_execution/job_invocations.scss +6 -5
  8. data/app/controllers/api/v2/job_invocations_controller.rb +17 -0
  9. data/app/helpers/remote_execution_helper.rb +38 -33
  10. data/app/lib/actions/remote_execution/run_host_job.rb +3 -2
  11. data/app/models/remote_execution_provider.rb +5 -0
  12. data/app/services/default_proxy_proxy_selector.rb +20 -0
  13. data/app/views/api/v2/job_invocations/main.json.rabl +6 -0
  14. data/app/views/job_invocations/_card_target_hosts.html.erb +1 -1
  15. data/app/views/job_invocations/_tab_hosts.html.erb +3 -23
  16. data/app/views/job_invocations/index.html.erb +2 -1
  17. data/app/views/job_invocations/show.html.erb +0 -6
  18. data/app/views/job_invocations/show.json.erb +4 -0
  19. data/app/views/templates/ssh/package_action.erb +1 -0
  20. data/app/views/templates/ssh/puppet_agent_disable.erb +3 -0
  21. data/app/views/templates/ssh/puppet_agent_enable.erb +3 -0
  22. data/app/views/templates/ssh/puppet_install_modules_from_forge.erb +3 -0
  23. data/app/views/templates/ssh/puppet_run_once.erb +3 -0
  24. data/db/seeds.d/70-job_templates.rb +1 -1
  25. data/foreman_remote_execution.gemspec +4 -5
  26. data/lib/foreman_remote_execution/version.rb +1 -1
  27. data/locale/action_names.rb +0 -1
  28. data/package.json +16 -33
  29. data/webpack/__mocks__/foremanReact/common/I18n.js +1 -0
  30. data/webpack/__mocks__/foremanReact/components/common/ActionButtons/ActionButtons.js +3 -0
  31. data/webpack/__mocks__/foremanReact/constants.js +3 -0
  32. data/webpack/index.js +9 -7
  33. data/webpack/react_app/components/TargetingHosts/TargetingHosts.js +52 -0
  34. data/webpack/react_app/components/TargetingHosts/TargetingHostsActions.js +8 -0
  35. data/webpack/react_app/components/TargetingHosts/TargetingHostsConsts.js +1 -0
  36. data/webpack/react_app/components/TargetingHosts/TargetingHostsSelectors.js +12 -0
  37. data/webpack/react_app/components/TargetingHosts/__tests__/HostItem.test.js +6 -0
  38. data/webpack/react_app/components/TargetingHosts/__tests__/HostStatus.test.js +6 -0
  39. data/webpack/react_app/components/TargetingHosts/__tests__/TargetingHosts.test.js +6 -0
  40. data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/HostItem.test.js.snap +31 -0
  41. data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/HostStatus.test.js.snap +12 -0
  42. data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/TargetingHosts.test.js.snap +81 -0
  43. data/webpack/react_app/components/TargetingHosts/__tests__/fixtures.js +43 -0
  44. data/webpack/react_app/components/TargetingHosts/components/HostItem.js +39 -0
  45. data/webpack/react_app/components/TargetingHosts/components/HostStatus.js +54 -0
  46. data/webpack/react_app/components/TargetingHosts/index.js +37 -0
  47. data/webpack/react_app/components/jobInvocations/AggregateStatus/index.js +10 -0
  48. data/webpack/react_app/components/jobInvocations/AggregateStatus/index.test.js +6 -3
  49. data/webpack/react_app/components/jobInvocations/index.js +19 -7
  50. data/webpack/react_app/redux/actions/jobInvocations/index.js +12 -8
  51. data/webpack/react_app/redux/consts.js +1 -2
  52. data/webpack/react_app/redux/reducers/jobInvocations/index.fixtures.js +8 -40
  53. data/webpack/react_app/redux/reducers/jobInvocations/index.test.js +17 -11
  54. data/webpack/test_setup.js +2 -1
  55. metadata +26 -12
  56. data/.hound.yml +0 -19
  57. data/.travis.yml +0 -6
  58. data/app/views/job_invocations/_host_actions_td.html.erb +0 -3
  59. data/app/views/job_invocations/_host_name_td.html.erb +0 -8
  60. data/app/views/job_invocations/_host_status_td.html.erb +0 -1
  61. data/app/views/job_invocations/show.js.erb +0 -23
data/.hound.yml DELETED
@@ -1,19 +0,0 @@
1
- scss:
2
- enabled: false
3
-
4
- stylelint:
5
- enabled: true
6
-
7
- rubocop:
8
- config_file: .rubocop.yml
9
- version: 0.80.0
10
-
11
- jshint:
12
- enabled: false
13
-
14
- eslint:
15
- enabled: true
16
- config_file: .eslintrc
17
- ignore_file: .eslintignore
18
-
19
- fail_on_violations: true
@@ -1,6 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - '6.10' # current EPEL 7
4
- - '6' # previous LTS
5
- - '8' # current LTS
6
- script: ./scripts/travis_run_js_tests.sh
@@ -1,3 +0,0 @@
1
- <td class="host_actions" id="<%= dom_id(host) %>-actions" data-refresh_required="" data-id="<%= host.id %>">
2
- <%= action_buttons(template_invocation_actions(task, host, job_invocation, template_invocation)) %>
3
- </td>
@@ -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, job_invocation.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 %>