foreman_remote_execution 8.1.2 → 8.2.1

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/app/controllers/api/v2/job_invocations_controller.rb +1 -0
  3. data/app/controllers/ui_job_wizard_controller.rb +6 -1
  4. data/app/models/job_invocation.rb +3 -2
  5. data/app/models/template_invocation.rb +1 -0
  6. data/app/views/api/v2/job_invocations/base.json.rabl +1 -1
  7. data/app/views/job_invocations/show.html.erb +1 -1
  8. data/app/views/job_invocations/welcome.html.erb +1 -1
  9. data/db/migrate/20210816100932_rex_setting_category_to_dsl.rb +1 -1
  10. data/lib/foreman_remote_execution/version.rb +1 -1
  11. data/locale/action_names.rb +2 -2
  12. data/locale/de/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  13. data/locale/de/foreman_remote_execution.po +266 -154
  14. data/locale/en/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  15. data/locale/en/foreman_remote_execution.po +132 -24
  16. data/locale/en_GB/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  17. data/locale/en_GB/foreman_remote_execution.po +149 -41
  18. data/locale/es/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  19. data/locale/es/foreman_remote_execution.po +320 -210
  20. data/locale/foreman_remote_execution.pot +394 -211
  21. data/locale/fr/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  22. data/locale/fr/foreman_remote_execution.po +353 -241
  23. data/locale/ja/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  24. data/locale/ja/foreman_remote_execution.po +368 -261
  25. data/locale/ko/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  26. data/locale/ko/foreman_remote_execution.po +161 -53
  27. data/locale/pt_BR/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  28. data/locale/pt_BR/foreman_remote_execution.po +335 -225
  29. data/locale/ru/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  30. data/locale/ru/foreman_remote_execution.po +161 -53
  31. data/locale/zh_CN/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  32. data/locale/zh_CN/foreman_remote_execution.po +465 -359
  33. data/locale/zh_TW/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  34. data/locale/zh_TW/foreman_remote_execution.po +162 -54
  35. data/test/unit/job_invocation_test.rb +1 -0
  36. data/webpack/JobWizard/JobWizard.js +52 -10
  37. data/webpack/JobWizard/__tests__/__snapshots__/integration.test.js.snap +8 -0
  38. data/webpack/JobWizard/__tests__/fixtures.js +5 -0
  39. data/webpack/JobWizard/__tests__/integration.test.js +15 -0
  40. data/webpack/JobWizard/__tests__/validation.test.js +27 -0
  41. data/webpack/JobWizard/autofill.js +1 -0
  42. data/webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js +19 -0
  43. data/webpack/JobWizard/steps/AdvancedFields/__tests__/__snapshots__/AdvancedFields.test.js.snap +8 -0
  44. data/webpack/JobWizard/steps/HostsAndInputs/HostPreviewModal.js +3 -0
  45. data/webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js +31 -1
  46. data/webpack/JobWizard/steps/HostsAndInputs/buildHostQuery.js +16 -10
  47. data/webpack/JobWizard/steps/HostsAndInputs/index.js +51 -3
  48. data/webpack/JobWizard/steps/Schedule/__tests__/Schedule.test.js +21 -1
  49. data/webpack/JobWizard/submit.js +13 -2
  50. data/webpack/react_app/components/TargetingHosts/TargetingHostsLabelsRow.js +45 -0
  51. data/webpack/react_app/components/TargetingHosts/TargetingHostsLabelsRow.scss +26 -0
  52. data/webpack/react_app/components/TargetingHosts/TargetingHostsPage.js +13 -1
  53. data/webpack/react_app/components/TargetingHosts/TargetingHostsSelectors.js +5 -0
  54. data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/TargetingHostsPage.test.js.snap +3 -0
  55. data/webpack/react_app/components/TargetingHosts/index.js +23 -3
  56. data/webpack/react_app/components/jobInvocations/AggregateStatus/index.js +25 -9
  57. data/webpack/react_app/components/jobInvocations/AggregateStatus/index.test.js +6 -2
  58. data/webpack/react_app/components/jobInvocations/index.js +19 -2
  59. data/webpack/react_app/redux/actions/jobInvocations/index.js +8 -0
  60. data/webpack/react_app/redux/reducers/jobInvocations/index.js +2 -0
  61. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e893a2f960dd325ecee23b756b471f36814aae3f9f902421b18635bb69b6323a
4
- data.tar.gz: d916b70de7e3419e6d546942b112adfb8733ab7b62fe168651404568e5489d35
3
+ metadata.gz: 6737da9f14dbea916b2e25a4584fabb33ae69c35bad16eb82d3cc88325996e2e
4
+ data.tar.gz: 9c122c05a61199b05fac84b4a2a46adece501bef4e003f8ae81ff83d0b351a5d
5
5
  SHA512:
6
- metadata.gz: 27b59e2db3824b75f8038f214e76dc5abbf941ae91ed188c4d6dae97351d189bba6502b2e71e7f4b41b6f21b46a8772e56ee5fc0ee5095d5a281333b7c86cec8
7
- data.tar.gz: 23231766b5d3f07590acc887d36da711b3859a3bbd581b5192a4bce3a3db45f263984a57993949768dab62cefcccc7d0dde75489f722ed3600732155407182cf
6
+ metadata.gz: f2732d87a947c80a8a39acaf8e2314e4833a6e83d76a77506e789467cb489ddcc3a2aacade6a56d91df04c5e54e762bfbc0e07c45c4c430587c998cae253d7f8
7
+ data.tar.gz: 872b21b191c597db3789442cc327768f83ea861b718b7a678b83c5964d6a894170454143c5cfd6e43e639239b34613ab09bf158eefdc24756ea07d32a02ce7d2
@@ -71,6 +71,7 @@ module Api
71
71
  param :description_format, String, :required => false, :desc => N_('Override the description format from the template for this invocation only')
72
72
  param :execution_timeout_interval, Integer, :required => false, :desc => N_('Override the timeout interval from the template for this invocation only')
73
73
  param :feature, String, :required => false, :desc => N_('Remote execution feature label that should be triggered, job template assigned to this feature will be used')
74
+ param :time_to_pickup, Integer, :required => false, :desc => N_('Override the global time to pickup interval for this invocation only')
74
75
 
75
76
  RemoteExecutionProvider.providers.each_value do |provider|
76
77
  next if !provider.respond_to?(:provider_inputs_doc) || provider.provider_inputs_doc.empty?
@@ -13,11 +13,13 @@ class UiJobWizardController < ApplicationController
13
13
  def template
14
14
  job_template = JobTemplate.authorized.find(params[:id])
15
15
  advanced_template_inputs, template_inputs = map_template_inputs(job_template.template_inputs_with_foreign).partition { |x| x["advanced"] }
16
+ provider_inputs = job_template.provider.provider_inputs.map { |input| input.instance_values.merge({:provider_input => true, default: input.value }) }
16
17
  render :json => {
17
18
  :job_template => job_template,
18
19
  :effective_user => job_template.effective_user,
19
20
  :template_inputs => template_inputs,
20
- :advanced_template_inputs => advanced_template_inputs,
21
+ :provider_name => job_template.provider.provider_input_namespace,
22
+ :advanced_template_inputs => advanced_template_inputs+provider_inputs,
21
23
  }
22
24
  end
23
25
 
@@ -66,6 +68,9 @@ class UiJobWizardController < ApplicationController
66
68
  job_organization = Taxonomy.find_by(id: job.task.input[:current_organization_id])
67
69
  job_location = Taxonomy.find_by(id: job.task.input[:current_location_id])
68
70
  render :json => {
71
+ :provider_input_values => composer[:template_invocations][0][:provider_input_values],
72
+ :provider_input_values1 => job[:provider_input_values],
73
+ :job2 => composer[:template_invocations][0],
69
74
  :job => composer,
70
75
  :job_organization => job_organization,
71
76
  :job_location => job_location,
@@ -253,8 +253,9 @@ class JobInvocation < ApplicationRecord
253
253
  acc.merge(key => 0)
254
254
  end
255
255
  else
256
- counts = task.sub_tasks_counts
257
- done = counts.values_at(*map.results).reduce(:+)
256
+ counts = task.sub_tasks_counts
257
+ counts.default = 0
258
+ done = counts.values_at(*map.results).reduce(:+)
258
259
  percent = progress(counts[:total], done)
259
260
  counts.merge(:progress => percent, :failed => counts.values_at(*map.status_to_task_result(:failed)).reduce(:+))
260
261
  end
@@ -34,6 +34,7 @@ class TemplateInvocation < ApplicationRecord
34
34
  :cancelled => :cancelled,
35
35
  :error => :failed,
36
36
  :pending => :pending,
37
+ :running => :pending,
37
38
  :success => :success,
38
39
  :warning => :failed,
39
40
  }.with_indifferent_access
@@ -1,6 +1,6 @@
1
1
  object @job_invocation
2
2
 
3
- attributes :id, :description, :job_category, :targeting_id, :status, :start_at, :status_label, :ssh_user
3
+ attributes :id, :description, :job_category, :targeting_id, :status, :start_at, :status_label, :ssh_user, :time_to_pickup
4
4
 
5
5
  node do |invocation|
6
6
  {
@@ -1,6 +1,6 @@
1
1
  <% title @job_invocation.description %>
2
2
  <% stylesheet 'foreman_remote_execution/foreman_remote_execution' %>
3
- <% javascript 'charts', 'foreman_remote_execution/template_invocation' %>
3
+ <% javascript 'foreman_remote_execution/template_invocation' %>
4
4
  <% javascript *webpack_asset_paths('foreman_remote_execution', :extension => 'js') %>
5
5
  <% content_for(:stylesheets) do %>
6
6
  <%= webpacked_plugins_css_for :foreman_remote_execution %>
@@ -9,6 +9,6 @@
9
9
  <p><%= link_to _('Learn more about this in the documentation.'),
10
10
  documentation_url('1.ForemanRemoteExecution1.3Manual', :root_url => 'https://www.theforeman.org/plugins/foreman_remote_execution/1.3/index.html#'), :rel => 'external' %></p>
11
11
  <div class="blank-slate-pf-main-action">
12
- <%= new_link(_("Run Job"), {}, { :class => "btn-lg" }) %>
12
+ <%= display_link_if_authorized(_("Run Job"), { :action => :create }, { :class => "btn btn-primary btn-lg" }) %>
13
13
  </div>
14
14
  </div>
@@ -1,5 +1,5 @@
1
1
  class RexSettingCategoryToDsl < ActiveRecord::Migration[6.0]
2
2
  def up
3
- Setting.where(category: 'Setting::RemoteExecution').update_all(category: 'Setting')
3
+ Setting.where(category: 'Setting::RemoteExecution').update_all(category: 'Setting') if column_exists?(:settings, :category)
4
4
  end
5
5
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecution
2
- VERSION = '8.1.2'.freeze
2
+ VERSION = '8.2.1'.freeze
3
3
  end
@@ -1,5 +1,5 @@
1
1
  # Autogenerated!
2
- _("Remote action:")
2
+ _("Action with sub plans")
3
3
  _("Import Puppet classes")
4
4
  _("Import facts")
5
- _("Action with sub plans")
5
+ _("Remote action:")