foreman_remote_execution 12.0.7 → 13.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/js_ci.yml +1 -1
  3. data/.github/workflows/ruby_ci.yml +16 -81
  4. data/.packit.yaml +8 -3
  5. data/app/assets/javascripts/foreman_remote_execution/locale/de/foreman_remote_execution.js +23 -14
  6. data/app/assets/javascripts/foreman_remote_execution/locale/en/foreman_remote_execution.js +22 -4
  7. data/app/assets/javascripts/foreman_remote_execution/locale/en_GB/foreman_remote_execution.js +23 -14
  8. data/app/assets/javascripts/foreman_remote_execution/locale/es/foreman_remote_execution.js +23 -14
  9. data/app/assets/javascripts/foreman_remote_execution/locale/fr/foreman_remote_execution.js +23 -14
  10. data/app/assets/javascripts/foreman_remote_execution/locale/ja/foreman_remote_execution.js +23 -14
  11. data/app/assets/javascripts/foreman_remote_execution/locale/ka/foreman_remote_execution.js +23 -14
  12. data/app/assets/javascripts/foreman_remote_execution/locale/ko/foreman_remote_execution.js +23 -14
  13. data/app/assets/javascripts/foreman_remote_execution/locale/pt_BR/foreman_remote_execution.js +23 -14
  14. data/app/assets/javascripts/foreman_remote_execution/locale/ru/foreman_remote_execution.js +23 -14
  15. data/app/assets/javascripts/foreman_remote_execution/locale/zh_CN/foreman_remote_execution.js +23 -14
  16. data/app/assets/javascripts/foreman_remote_execution/locale/zh_TW/foreman_remote_execution.js +23 -14
  17. data/app/controllers/ui_job_wizard_controller.rb +1 -1
  18. data/app/helpers/job_invocations_helper.rb +1 -1
  19. data/app/helpers/remote_execution_helper.rb +2 -2
  20. data/app/lib/actions/remote_execution/proxy_action.rb +1 -1
  21. data/app/lib/actions/remote_execution/run_host_job.rb +9 -3
  22. data/app/lib/actions/remote_execution/run_hosts_job.rb +0 -1
  23. data/app/models/host_status/execution_status.rb +2 -2
  24. data/app/views/job_invocations/_preview_hosts_list.html.erb +1 -1
  25. data/app/views/job_invocations/show.html.erb +12 -5
  26. data/app/views/job_invocations/show.js.erb +8 -1
  27. data/app/views/job_invocations/welcome.html.erb +1 -1
  28. data/app/views/template_invocations/_refresh.js.erb +10 -4
  29. data/app/views/template_invocations/show.html.erb +2 -2
  30. data/app/views/templates/script/convert2rhel_analyze.erb +12 -1
  31. data/lib/foreman_remote_execution/engine.rb +1 -1
  32. data/lib/foreman_remote_execution/version.rb +1 -1
  33. data/locale/de/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  34. data/locale/de/foreman_remote_execution.po +24 -6
  35. data/locale/en/foreman_remote_execution.po +24 -6
  36. data/locale/en_GB/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  37. data/locale/en_GB/foreman_remote_execution.po +24 -6
  38. data/locale/es/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  39. data/locale/es/foreman_remote_execution.po +24 -6
  40. data/locale/foreman_remote_execution.pot +170 -142
  41. data/locale/fr/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  42. data/locale/fr/foreman_remote_execution.po +24 -6
  43. data/locale/ja/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  44. data/locale/ja/foreman_remote_execution.po +24 -6
  45. data/locale/ka/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  46. data/locale/ka/foreman_remote_execution.po +24 -6
  47. data/locale/ko/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  48. data/locale/ko/foreman_remote_execution.po +24 -6
  49. data/locale/pt_BR/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  50. data/locale/pt_BR/foreman_remote_execution.po +24 -6
  51. data/locale/ru/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  52. data/locale/ru/foreman_remote_execution.po +24 -6
  53. data/locale/zh_CN/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  54. data/locale/zh_CN/foreman_remote_execution.po +24 -6
  55. data/locale/zh_TW/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  56. data/locale/zh_TW/foreman_remote_execution.po +24 -6
  57. data/package.json +1 -5
  58. data/test/functional/api/v2/job_invocations_controller_test.rb +7 -7
  59. data/test/functional/api/v2/template_invocations_controller_test.rb +3 -3
  60. data/test/helpers/remote_execution_helper_test.rb +8 -7
  61. data/test/unit/actions/run_host_job_test.rb +1 -1
  62. data/test/unit/actions/run_hosts_job_test.rb +11 -11
  63. data/test/unit/concerns/foreman_tasks_cleaner_extensions_test.rb +5 -5
  64. data/test/unit/concerns/host_extensions_test.rb +34 -34
  65. data/test/unit/concerns/nic_extensions_test.rb +1 -1
  66. data/test/unit/execution_task_status_mapper_test.rb +10 -10
  67. data/test/unit/input_template_renderer_test.rb +53 -49
  68. data/test/unit/job_invocation_composer_test.rb +78 -78
  69. data/test/unit/job_invocation_test.rb +25 -25
  70. data/test/unit/job_template_effective_user_test.rb +3 -3
  71. data/test/unit/job_template_test.rb +28 -28
  72. data/test/unit/remote_execution_feature_test.rb +14 -14
  73. data/test/unit/remote_execution_provider_test.rb +39 -39
  74. data/test/unit/renderer_scope_input_test.rb +6 -6
  75. data/test/unit/targeting_test.rb +32 -32
  76. data/webpack/JobWizard/JobWizardConstants.js +4 -0
  77. data/webpack/JobWizard/JobWizardSelectors.js +31 -3
  78. data/webpack/JobWizard/PermissionDenied.js +64 -0
  79. data/webpack/JobWizard/__tests__/fixtures.js +3 -3
  80. data/webpack/JobWizard/autofill.js +8 -4
  81. data/webpack/JobWizard/index.js +40 -1
  82. data/webpack/JobWizard/steps/CategoryAndTemplate/CategoryAndTemplate.js +26 -5
  83. data/webpack/JobWizard/steps/HostsAndInputs/HostPreviewModal.js +3 -3
  84. data/webpack/JobWizard/steps/HostsAndInputs/SelectGQL.js +1 -0
  85. data/webpack/JobWizard/steps/HostsAndInputs/SelectedChips.js +13 -6
  86. data/webpack/JobWizard/steps/HostsAndInputs/hosts.gql +1 -0
  87. data/webpack/JobWizard/steps/HostsAndInputs/index.js +21 -1
  88. data/webpack/JobWizard/steps/ReviewDetails/index.js +3 -2
  89. data/webpack/JobWizard/steps/form/SearchSelect.js +3 -1
  90. data/webpack/JobWizard/steps/form/__tests__/SelectSearch.test.js +2 -0
  91. metadata +7 -6
@@ -329,6 +329,9 @@
329
329
  "Any Location": [
330
330
  "모든 위치 "
331
331
  ],
332
+ "Awaiting start": [
333
+ ""
334
+ ],
332
335
  "error": [
333
336
  ""
334
337
  ],
@@ -509,9 +512,6 @@
509
512
  "Last execution succeeded": [
510
513
  "성공한 마지막 실행"
511
514
  ],
512
- "No execution finished yet": [
513
- "아직 완료된 실행이 없습니다."
514
- ],
515
515
  "Last execution cancelled": [
516
516
  ""
517
517
  ],
@@ -1227,6 +1227,18 @@
1227
1227
  "Current location %s is different from job's location %s. This job may run on different hosts than before.": [
1228
1228
  ""
1229
1229
  ],
1230
+ "You are not authorized to perform this action.": [
1231
+ ""
1232
+ ],
1233
+ "Please request the required permissions listed below from a Foreman administrator:": [
1234
+ ""
1235
+ ],
1236
+ "Permission Denied": [
1237
+ ""
1238
+ ],
1239
+ "Proceed Anyway": [
1240
+ ""
1241
+ ],
1230
1242
  "'Starts before' date must in the future": [
1231
1243
  ""
1232
1244
  ],
@@ -1257,8 +1269,14 @@
1257
1269
  "All fields are required.": [
1258
1270
  ""
1259
1271
  ],
1260
- "Error": [
1261
- "오류 "
1272
+ "Not available": [
1273
+ ""
1274
+ ],
1275
+ "Access denied": [
1276
+ ""
1277
+ ],
1278
+ "Missing the required permissions: ${missingPermissions.join( ', ' )}": [
1279
+ ""
1262
1280
  ],
1263
1281
  "Errors:": [
1264
1282
  ""
@@ -1571,15 +1589,6 @@
1571
1589
  ],
1572
1590
  "A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality.": [
1573
1591
  "Foreman으로 원격 실행을 가져오는 플러그인입니다. 원격 관리 기능으로 구성 관리 기능을 완료합니다."
1574
- ],
1575
- "Action with sub plans": [
1576
- "하위 계획이 있는 작업"
1577
- ],
1578
- "Import Puppet classes": [
1579
- "Puppet 클래스 가져오기"
1580
- ],
1581
- "Import facts": [
1582
- "팩트 불러오기"
1583
1592
  ]
1584
1593
  }
1585
1594
  }
@@ -329,6 +329,9 @@
329
329
  "Any Location": [
330
330
  "Qualquer localização"
331
331
  ],
332
+ "Awaiting start": [
333
+ ""
334
+ ],
332
335
  "error": [
333
336
  "erro"
334
337
  ],
@@ -511,9 +514,6 @@
511
514
  "Last execution succeeded": [
512
515
  "Última execução bem-sucedida "
513
516
  ],
514
- "No execution finished yet": [
515
- "Nenhuma execução concluída ainda "
516
- ],
517
517
  "Last execution cancelled": [
518
518
  "Última execução cancelada"
519
519
  ],
@@ -1229,6 +1229,18 @@
1229
1229
  "Current location %s is different from job's location %s. This job may run on different hosts than before.": [
1230
1230
  ""
1231
1231
  ],
1232
+ "You are not authorized to perform this action.": [
1233
+ ""
1234
+ ],
1235
+ "Please request the required permissions listed below from a Foreman administrator:": [
1236
+ ""
1237
+ ],
1238
+ "Permission Denied": [
1239
+ ""
1240
+ ],
1241
+ "Proceed Anyway": [
1242
+ ""
1243
+ ],
1232
1244
  "'Starts before' date must in the future": [
1233
1245
  ""
1234
1246
  ],
@@ -1259,8 +1271,14 @@
1259
1271
  "All fields are required.": [
1260
1272
  "Todos os campos são obrigatórios."
1261
1273
  ],
1262
- "Error": [
1263
- "Erro"
1274
+ "Not available": [
1275
+ ""
1276
+ ],
1277
+ "Access denied": [
1278
+ ""
1279
+ ],
1280
+ "Missing the required permissions: ${missingPermissions.join( ', ' )}": [
1281
+ ""
1264
1282
  ],
1265
1283
  "Errors:": [
1266
1284
  "Erros:"
@@ -1573,15 +1591,6 @@
1573
1591
  ],
1574
1592
  "A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality.": [
1575
1593
  "Um plugin trazendo execução remota ao Foreman, completando a funcionalidade de gerenciamento de configuração com a funcionalidade de gerenciamento remoto. "
1576
- ],
1577
- "Action with sub plans": [
1578
- "Ação com subplanos "
1579
- ],
1580
- "Import Puppet classes": [
1581
- "Importar classes de Puppet"
1582
- ],
1583
- "Import facts": [
1584
- "Importar fatos"
1585
1594
  ]
1586
1595
  }
1587
1596
  }
@@ -329,6 +329,9 @@
329
329
  "Any Location": [
330
330
  "Любое местонахождение"
331
331
  ],
332
+ "Awaiting start": [
333
+ ""
334
+ ],
332
335
  "error": [
333
336
  ""
334
337
  ],
@@ -512,9 +515,6 @@
512
515
  "Last execution succeeded": [
513
516
  "Выполнено успешно"
514
517
  ],
515
- "No execution finished yet": [
516
- "Ни один цикл выполнения не завершился"
517
- ],
518
518
  "Last execution cancelled": [
519
519
  ""
520
520
  ],
@@ -1230,6 +1230,18 @@
1230
1230
  "Current location %s is different from job's location %s. This job may run on different hosts than before.": [
1231
1231
  ""
1232
1232
  ],
1233
+ "You are not authorized to perform this action.": [
1234
+ ""
1235
+ ],
1236
+ "Please request the required permissions listed below from a Foreman administrator:": [
1237
+ ""
1238
+ ],
1239
+ "Permission Denied": [
1240
+ ""
1241
+ ],
1242
+ "Proceed Anyway": [
1243
+ ""
1244
+ ],
1233
1245
  "'Starts before' date must in the future": [
1234
1246
  ""
1235
1247
  ],
@@ -1260,8 +1272,14 @@
1260
1272
  "All fields are required.": [
1261
1273
  ""
1262
1274
  ],
1263
- "Error": [
1264
- "Ошибка"
1275
+ "Not available": [
1276
+ ""
1277
+ ],
1278
+ "Access denied": [
1279
+ ""
1280
+ ],
1281
+ "Missing the required permissions: ${missingPermissions.join( ', ' )}": [
1282
+ ""
1265
1283
  ],
1266
1284
  "Errors:": [
1267
1285
  ""
@@ -1574,15 +1592,6 @@
1574
1592
  ],
1575
1593
  "A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality.": [
1576
1594
  "Дополнительный модуль Foreman для удаленного выполнения заданий, объединяющий функции управления конфигурацией и удаленного контроля."
1577
- ],
1578
- "Action with sub plans": [
1579
- "Действия с подпланами"
1580
- ],
1581
- "Import Puppet classes": [
1582
- "Импорт классов Puppet"
1583
- ],
1584
- "Import facts": [
1585
- "Импорт фактов"
1586
1595
  ]
1587
1596
  }
1588
1597
  }
@@ -329,6 +329,9 @@
329
329
  "Any Location": [
330
330
  "任意位置"
331
331
  ],
332
+ "Awaiting start": [
333
+ ""
334
+ ],
332
335
  "error": [
333
336
  "错误"
334
337
  ],
@@ -509,9 +512,6 @@
509
512
  "Last execution succeeded": [
510
513
  "最后成功的执行"
511
514
  ],
512
- "No execution finished yet": [
513
- "尚未执行完毕"
514
- ],
515
515
  "Last execution cancelled": [
516
516
  "最后的执行已取消"
517
517
  ],
@@ -1226,6 +1226,18 @@
1226
1226
  "Current location %s is different from job's location %s. This job may run on different hosts than before.": [
1227
1227
  ""
1228
1228
  ],
1229
+ "You are not authorized to perform this action.": [
1230
+ ""
1231
+ ],
1232
+ "Please request the required permissions listed below from a Foreman administrator:": [
1233
+ ""
1234
+ ],
1235
+ "Permission Denied": [
1236
+ ""
1237
+ ],
1238
+ "Proceed Anyway": [
1239
+ ""
1240
+ ],
1229
1241
  "'Starts before' date must in the future": [
1230
1242
  ""
1231
1243
  ],
@@ -1256,8 +1268,14 @@
1256
1268
  "All fields are required.": [
1257
1269
  "各个项都需要。"
1258
1270
  ],
1259
- "Error": [
1260
- "错误"
1271
+ "Not available": [
1272
+ ""
1273
+ ],
1274
+ "Access denied": [
1275
+ ""
1276
+ ],
1277
+ "Missing the required permissions: ${missingPermissions.join( ', ' )}": [
1278
+ ""
1261
1279
  ],
1262
1280
  "Errors:": [
1263
1281
  "错误:"
@@ -1570,15 +1588,6 @@
1570
1588
  ],
1571
1589
  "A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality.": [
1572
1590
  "一个将远程执行带到 Foreman 的插件,通过远程管理功能来完成配置管理功能。"
1573
- ],
1574
- "Action with sub plans": [
1575
- "有子计划的操作"
1576
- ],
1577
- "Import Puppet classes": [
1578
- "导入 Puppet 类"
1579
- ],
1580
- "Import facts": [
1581
- "导入事实"
1582
1591
  ]
1583
1592
  }
1584
1593
  }
@@ -329,6 +329,9 @@
329
329
  "Any Location": [
330
330
  "任何位置"
331
331
  ],
332
+ "Awaiting start": [
333
+ ""
334
+ ],
332
335
  "error": [
333
336
  ""
334
337
  ],
@@ -510,9 +513,6 @@
510
513
  "Last execution succeeded": [
511
514
  "最後的執行成功"
512
515
  ],
513
- "No execution finished yet": [
514
- "尚無執行完成"
515
- ],
516
516
  "Last execution cancelled": [
517
517
  ""
518
518
  ],
@@ -1228,6 +1228,18 @@
1228
1228
  "Current location %s is different from job's location %s. This job may run on different hosts than before.": [
1229
1229
  ""
1230
1230
  ],
1231
+ "You are not authorized to perform this action.": [
1232
+ ""
1233
+ ],
1234
+ "Please request the required permissions listed below from a Foreman administrator:": [
1235
+ ""
1236
+ ],
1237
+ "Permission Denied": [
1238
+ ""
1239
+ ],
1240
+ "Proceed Anyway": [
1241
+ ""
1242
+ ],
1231
1243
  "'Starts before' date must in the future": [
1232
1244
  ""
1233
1245
  ],
@@ -1258,8 +1270,14 @@
1258
1270
  "All fields are required.": [
1259
1271
  ""
1260
1272
  ],
1261
- "Error": [
1262
- "錯誤"
1273
+ "Not available": [
1274
+ ""
1275
+ ],
1276
+ "Access denied": [
1277
+ ""
1278
+ ],
1279
+ "Missing the required permissions: ${missingPermissions.join( ', ' )}": [
1280
+ ""
1263
1281
  ],
1264
1282
  "Errors:": [
1265
1283
  ""
@@ -1572,15 +1590,6 @@
1572
1590
  ],
1573
1591
  "A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality.": [
1574
1592
  "將遠端執行帶入 Foreman 的外掛程式,搭配遠端管理功能來完成配置管理。"
1575
- ],
1576
- "Action with sub plans": [
1577
- "有子計畫的動作"
1578
- ],
1579
- "Import Puppet classes": [
1580
- "匯入 Puppet 類別"
1581
- ],
1582
- "Import facts": [
1583
- "匯入詳情"
1584
1593
  ]
1585
1594
  }
1586
1595
  }
@@ -1,4 +1,4 @@
1
- class UiJobWizardController < ApplicationController
1
+ class UiJobWizardController < Api::V2::BaseController
2
2
  include FiltersHelper
3
3
  def categories
4
4
  job_categories = resource_scope(permission: action_permission)
@@ -33,7 +33,7 @@ module JobInvocationsHelper
33
33
  end
34
34
 
35
35
  def collapsed_preview(target)
36
- title = target.try(:name) || 'N/A'
36
+ title = target || 'N/A'
37
37
  content_tag(:h5,
38
38
  :class => "expander collapsed out",
39
39
  :data => { :toggle => 'collapse',
@@ -34,7 +34,7 @@ module RemoteExecutionHelper
34
34
  action: { href: current_host_details_path(host), 'data-method': 'get', id: "#{host.name}-actions-detail" } }
35
35
  end
36
36
  if authorized_for(controller: :job_invocations, action: :create) && (!host.infrastructure_host? || User.current.can?(:execute_jobs_on_infrastructure_hosts))
37
- links << { title: (_('Rerun on %s') % host.name),
37
+ links << { title: (_('Rerun on %s') % host),
38
38
  action: { href: rerun_job_invocation_path(job_invocation, host_ids: [ host.id ]),
39
39
  'data-method': 'get', id: "#{host.name}-actions-rerun" } }
40
40
  end
@@ -274,7 +274,7 @@ module RemoteExecutionHelper
274
274
  task = template_invocation.try(:run_host_job_task)
275
275
  link_authorized = !task.nil? && authorized_for(hash_for_template_invocation_path(:id => template_invocation).merge(:auth_object => host, :permission => :view_hosts, :authorizer => job_hosts_authorizer))
276
276
 
277
- { name: host.name,
277
+ { name: host.to_label,
278
278
  link: link_authorized ? template_invocation_path(:id => template_invocation) : '',
279
279
  status: template_invocation_status(task, job_invocation.task),
280
280
  actions: template_invocation_actions(task, host, job_invocation, template_invocation) }
@@ -43,7 +43,7 @@ module Actions
43
43
  }
44
44
  end
45
45
  events.each_slice(1000) do |batch|
46
- TemplateInvocationEvent.upsert_all(batch, unique_by: [:template_invocation_id, :sequence_id]) # rubocop:disable Rails/SkipsModelValidations
46
+ TemplateInvocationEvent.insert_all(batch, unique_by: [:template_invocation_id, :sequence_id]) # rubocop:disable Rails/SkipsModelValidations
47
47
  end
48
48
  end
49
49
  end
@@ -28,6 +28,7 @@ module Actions
28
28
  raise _('Could not use any template used in the job invocation') if template_invocation.blank?
29
29
  features = template_invocation.template.remote_execution_features.pluck(:label).uniq
30
30
  action_subject(host,
31
+ :host_display_name => host.to_label,
31
32
  :job_category => job_invocation.job_category,
32
33
  :description => job_invocation.description,
33
34
  :job_invocation_id => job_invocation.id,
@@ -97,12 +98,15 @@ module Actions
97
98
 
98
99
  def live_output
99
100
  continuous_output.sort!
100
- continuous_output.raw_outputs
101
101
  end
102
102
 
103
103
  def humanized_input
104
- N_('%{description} on %{host}') % { :host => input[:host].try(:[], :name),
105
- :description => input[:description].try(:capitalize) || input[:job_category] }
104
+ return unless input.present?
105
+
106
+ N_('%{description} on %{host}') % {
107
+ host: input[:host_display_name],
108
+ description: input[:description].try(:capitalize) || input[:job_category],
109
+ }
106
110
  end
107
111
 
108
112
  def humanized_name
@@ -195,7 +199,9 @@ module Actions
195
199
  host = Host.find(input[:host][:id])
196
200
  status = host.execution_status_object || host.build_execution_status_object
197
201
  status.status = exit_status.to_s == "0" ? HostStatus::ExecutionStatus::OK : HostStatus::ExecutionStatus::ERROR
202
+ status.refresh unless status.new_record?
198
203
  status.save!
204
+ host.refresh_global_status!
199
205
  end
200
206
 
201
207
  def delegated_output
@@ -75,7 +75,6 @@ module Actions
75
75
  end
76
76
 
77
77
  def on_planning_finished
78
- trigger_remote_batch
79
78
  plan_event(Actions::TriggerProxyBatch::TriggerLastBatch, nil, step_id: input[:trigger_run_step_id])
80
79
  super
81
80
  end
@@ -13,7 +13,7 @@ class HostStatus::ExecutionStatus < HostStatus::Status
13
13
  STATUS_NAMES = { OK => 'succeeded', ERROR => 'failed', QUEUED => 'queued', RUNNING => 'running', CANCELLED => 'cancelled' }.freeze
14
14
 
15
15
  def relevant?(*args)
16
- execution_tasks.present?
16
+ host.get_status(HostStatus::ExecutionStatus).present?
17
17
  end
18
18
 
19
19
  def to_status(options = {})
@@ -39,7 +39,7 @@ class HostStatus::ExecutionStatus < HostStatus::Status
39
39
  def to_label(options = {})
40
40
  case to_status(options)
41
41
  when OK
42
- execution_tasks.present? ? N_('Last execution succeeded') : N_('No execution finished yet')
42
+ N_('Last execution succeeded')
43
43
  when CANCELLED
44
44
  N_('Last execution cancelled')
45
45
  when ERROR
@@ -7,7 +7,7 @@
7
7
  <% if @hosts.any? -%>
8
8
  <ul>
9
9
  <% @hosts.each do |host| -%>
10
- <li><%= link_to h(host.name), current_host_details_path(host), :target => '_blank' %></li>
10
+ <li><%= link_to h(host), current_host_details_path(host), :target => '_blank' %></li>
11
11
  <% end -%>
12
12
 
13
13
  <% if @additional > 0 -%>
@@ -1,9 +1,9 @@
1
1
  <% title @job_invocation.description %>
2
- <% stylesheet 'foreman_remote_execution/foreman_remote_execution' %>
3
- <% javascript 'foreman_remote_execution/template_invocation' %>
4
- <% javascript *webpack_asset_paths('foreman_remote_execution', :extension => 'js') %>
2
+ <%= webpacked_plugins_js_for :foreman_remote_execution %>
3
+ <% content_for(:javascripts) do -%>
4
+ <% javascript 'foreman_remote_execution/template_invocation' %><% end %>
5
5
  <% content_for(:stylesheets) do %>
6
- <%= webpacked_plugins_css_for :foreman_remote_execution %>
6
+ <% stylesheet 'foreman_remote_execution/foreman_remote_execution' %>
7
7
  <% end %>
8
8
 
9
9
  <%= breadcrumbs name_field: 'description' %>
@@ -47,6 +47,13 @@
47
47
 
48
48
  <script id="job_invocation_refresh" data-refresh-url="<%= job_invocation_path(@job_invocation) %>">
49
49
  <% if @auto_refresh %>
50
- delayed_refresh($('script#job_invocation_refresh').data('refresh-url'), {});
50
+ if(window.allJsLoaded){
51
+ delayed_refresh($('script#job_invocation_refresh').data('refresh-url'), {})
52
+ }
53
+ else {
54
+ $(document).on('loadJS', function() {
55
+ delayed_refresh($('script#job_invocation_refresh').data('refresh-url'), {})
56
+ });
57
+ }
51
58
  <% end %>
52
59
  </script>
@@ -1,5 +1,12 @@
1
1
  $('div#title_action div.btn-group').html('<%= button_group(job_invocation_task_buttons(@job_invocation.task)).html_safe %>');
2
2
 
3
3
  <% if @auto_refresh %>
4
- delayed_refresh($('script#job_invocation_refresh').data('refresh-url'), job_invocation_refresh_data());
4
+ if(window.allJsLoaded){
5
+ delayed_refresh($('script#job_invocation_refresh').data('refresh-url'), job_invocation_refresh_data())
6
+ }
7
+ else {
8
+ $(document).on('loadJS', function() {
9
+ delayed_refresh($('script#job_invocation_refresh').data('refresh-url'), job_invocation_refresh_data())
10
+ });
11
+ }
5
12
  <% end %>
@@ -7,7 +7,7 @@
7
7
  <%= _("Foreman can run arbitrary commands on remote hosts using different providers, such as SSH or Ansible. Communication goes through the Smart Proxy so Foreman does not have to have direct access to the target hosts and can scale to control many hosts.") %></br>
8
8
  </p>
9
9
  <p><%= link_to _('Learn more about this in the documentation.'),
10
- documentation_url('1.ForemanRemoteExecution1.3Manual', :root_url => 'https://www.theforeman.org/plugins/foreman_remote_execution/1.3/index.html#'), :rel => 'external' %></p>
10
+ external_link_path(type: 'docs', section: 'Managing_Hosts', chapter: 'Configuring_and_Setting_Up_Remote_Jobs_managing-hosts'), :rel => 'external' %></p>
11
11
  <div class="blank-slate-pf-main-action">
12
12
  <%= authorized_for(controller: :job_invocations, action: :create) ? link_to(_("Run Job"), { :action => :create }, { :class => "btn btn-primary btn-lg" }) : nil %>
13
13
  </div>
@@ -1,7 +1,13 @@
1
1
  <% if @auto_refresh %>
2
- $(function() {
3
- delayed_refresh($("div.terminal").data('refresh-url'),
4
- {"since": "<%= @line_sets.last.try(:[], 'timestamp') || @since %>", "line_counter": $("div.terminal div.line").size()});
5
- });
2
+ if(window.allJsLoaded){
3
+ delayed_refresh($("div.terminal").data('refresh-url'),
4
+ {"since": "<%= @line_sets.last.try(:[], 'timestamp') || @since %>", "line_counter": $("div.terminal div.line").size()})
5
+ }
6
+ else {
7
+ $(document).on('loadJS', function() {
8
+ delayed_refresh($("div.terminal").data('refresh-url'),
9
+ {"since": "<%= @line_sets.last.try(:[], 'timestamp') || @since %>", "line_counter": $("div.terminal div.line").size()})
10
+ });
11
+ }
6
12
  <% end %>
7
13
 
@@ -3,7 +3,7 @@
3
3
  :url => job_invocation_path(@template_invocation.job_invocation_id) }]
4
4
 
5
5
  if @host
6
- items << { :caption => _('Template Invocation for %s') % @host.name }
6
+ items << { :caption => _('Template Invocation for %s') % @host }
7
7
  breadcrumbs(:resource_url => template_invocations_api_job_invocation_path(@template_invocation.job_invocation_id),
8
8
  :name_field => 'host_name',
9
9
  :switcher_item_url => template_invocation_path(':id'),
@@ -30,7 +30,7 @@ end
30
30
  <% if @host %>
31
31
  <% proxy_id = @template_invocation_task.input[:proxy_id] %>
32
32
  <h3>
33
- <%= _('Target: ') %><%= link_to(@host.name, current_host_details_path(@host)) %>
33
+ <%= _('Target: ') %><%= link_to(@host, current_host_details_path(@host)) %>
34
34
  <% if proxy_id && proxy = SmartProxy.find_by(id: proxy_id) %>
35
35
  <%= _('using Smart Proxy') %> <%= link_to(proxy.name, smart_proxy_path(proxy)) %>
36
36
  <% end %>
@@ -1,6 +1,15 @@
1
1
  <%#
2
2
  name: Convert2RHEL analyze
3
3
  snippet: false
4
+ template_inputs:
5
+ - name: Data telemetry
6
+ required: false
7
+ input_type: user
8
+ options: "yes\r\nno"
9
+ advanced: false
10
+ value_type: plain
11
+ default: 'yes'
12
+ hidden_value: false
4
13
  model: JobTemplate
5
14
  job_category: Convert 2 RHEL
6
15
  provider_type: script
@@ -16,7 +25,9 @@ if ! rpm -q convert2rhel &> /dev/null; then
16
25
  yum install -y convert2rhel
17
26
  fi
18
27
 
19
- export CONVERT2RHEL_THROUGH_FOREMAN=1
28
+ <% if input('Data telemetry') != "yes" -%>
29
+ export CONVERT2RHEL_DISABLE_TELEMETRY=1
30
+ <% end -%>
20
31
 
21
32
  /usr/bin/convert2rhel analyze -y
22
33
 
@@ -47,7 +47,7 @@ module ForemanRemoteExecution
47
47
 
48
48
  initializer 'foreman_remote_execution.register_plugin', before: :finisher_hook do |_app|
49
49
  Foreman::Plugin.register :foreman_remote_execution do
50
- requires_foreman '>= 3.9'
50
+ requires_foreman '>= 3.10'
51
51
  register_global_js_file 'global'
52
52
  register_gettext
53
53
 
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecution
2
- VERSION = '12.0.7'.freeze
2
+ VERSION = '13.0.0'.freeze
3
3
  end