foreman_remote_execution 12.0.5 → 13.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) 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/models/host_status/execution_status.rb +2 -2
  23. data/app/views/job_invocations/_preview_hosts_list.html.erb +1 -1
  24. data/app/views/job_invocations/show.html.erb +12 -5
  25. data/app/views/job_invocations/show.js.erb +8 -1
  26. data/app/views/job_invocations/welcome.html.erb +1 -1
  27. data/app/views/template_invocations/_refresh.js.erb +10 -4
  28. data/app/views/template_invocations/show.html.erb +2 -2
  29. data/lib/foreman_remote_execution/engine.rb +1 -1
  30. data/lib/foreman_remote_execution/version.rb +1 -1
  31. data/locale/de/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  32. data/locale/de/foreman_remote_execution.po +24 -6
  33. data/locale/en/foreman_remote_execution.po +24 -6
  34. data/locale/en_GB/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  35. data/locale/en_GB/foreman_remote_execution.po +24 -6
  36. data/locale/es/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  37. data/locale/es/foreman_remote_execution.po +24 -6
  38. data/locale/foreman_remote_execution.pot +170 -142
  39. data/locale/fr/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  40. data/locale/fr/foreman_remote_execution.po +24 -6
  41. data/locale/ja/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  42. data/locale/ja/foreman_remote_execution.po +24 -6
  43. data/locale/ka/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  44. data/locale/ka/foreman_remote_execution.po +24 -6
  45. data/locale/ko/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  46. data/locale/ko/foreman_remote_execution.po +24 -6
  47. data/locale/pt_BR/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  48. data/locale/pt_BR/foreman_remote_execution.po +24 -6
  49. data/locale/ru/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  50. data/locale/ru/foreman_remote_execution.po +24 -6
  51. data/locale/zh_CN/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  52. data/locale/zh_CN/foreman_remote_execution.po +24 -6
  53. data/locale/zh_TW/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  54. data/locale/zh_TW/foreman_remote_execution.po +24 -6
  55. data/package.json +1 -5
  56. data/test/functional/api/v2/job_invocations_controller_test.rb +7 -7
  57. data/test/functional/api/v2/template_invocations_controller_test.rb +3 -3
  58. data/test/helpers/remote_execution_helper_test.rb +8 -7
  59. data/test/unit/actions/run_host_job_test.rb +1 -1
  60. data/test/unit/actions/run_hosts_job_test.rb +11 -11
  61. data/test/unit/concerns/foreman_tasks_cleaner_extensions_test.rb +5 -5
  62. data/test/unit/concerns/host_extensions_test.rb +34 -34
  63. data/test/unit/concerns/nic_extensions_test.rb +1 -1
  64. data/test/unit/execution_task_status_mapper_test.rb +10 -10
  65. data/test/unit/input_template_renderer_test.rb +53 -49
  66. data/test/unit/job_invocation_composer_test.rb +78 -78
  67. data/test/unit/job_invocation_test.rb +25 -25
  68. data/test/unit/job_template_effective_user_test.rb +3 -3
  69. data/test/unit/job_template_test.rb +28 -28
  70. data/test/unit/remote_execution_feature_test.rb +14 -14
  71. data/test/unit/remote_execution_provider_test.rb +39 -39
  72. data/test/unit/renderer_scope_input_test.rb +6 -6
  73. data/test/unit/targeting_test.rb +32 -32
  74. data/webpack/JobWizard/JobWizardConstants.js +4 -0
  75. data/webpack/JobWizard/JobWizardSelectors.js +31 -3
  76. data/webpack/JobWizard/PermissionDenied.js +64 -0
  77. data/webpack/JobWizard/__tests__/fixtures.js +3 -3
  78. data/webpack/JobWizard/autofill.js +8 -4
  79. data/webpack/JobWizard/index.js +40 -1
  80. data/webpack/JobWizard/steps/CategoryAndTemplate/CategoryAndTemplate.js +26 -5
  81. data/webpack/JobWizard/steps/HostsAndInputs/HostPreviewModal.js +3 -3
  82. data/webpack/JobWizard/steps/HostsAndInputs/SelectGQL.js +1 -0
  83. data/webpack/JobWizard/steps/HostsAndInputs/SelectedChips.js +13 -6
  84. data/webpack/JobWizard/steps/HostsAndInputs/hosts.gql +1 -0
  85. data/webpack/JobWizard/steps/HostsAndInputs/index.js +21 -1
  86. data/webpack/JobWizard/steps/ReviewDetails/index.js +3 -2
  87. data/webpack/JobWizard/steps/form/SearchSelect.js +3 -1
  88. data/webpack/JobWizard/steps/form/__tests__/SelectSearch.test.js +2 -0
  89. metadata +3 -2
@@ -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
@@ -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 %>
@@ -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.5'.freeze
2
+ VERSION = '13.0.0'.freeze
3
3
  end
@@ -84,6 +84,9 @@ msgstr "Ein Benutzer, der für die Ausführung des Skripts verwendet werden soll
84
84
  msgid "Abort Job"
85
85
  msgstr "Job abbrechen"
86
86
 
87
+ msgid "Access denied"
88
+ msgstr ""
89
+
87
90
  msgid "Actions"
88
91
  msgstr "Aktionen"
89
92
 
@@ -129,6 +132,9 @@ msgstr "Um"
129
132
  msgid "At minute"
130
133
  msgstr ""
131
134
 
135
+ msgid "Awaiting start"
136
+ msgstr ""
137
+
132
138
  msgid "Back"
133
139
  msgstr ""
134
140
 
@@ -375,9 +381,6 @@ msgstr ""
375
381
  msgid "Ends"
376
382
  msgstr "Endet"
377
383
 
378
- msgid "Error"
379
- msgstr "Fehler"
380
-
381
384
  msgid "Error loading data from proxy"
382
385
  msgstr "Fehler die Daten vom Proxy zu laden."
383
386
 
@@ -708,6 +711,9 @@ msgstr "Manuelle Auswahl"
708
711
  msgid "Minute can only be a number between 0-59"
709
712
  msgstr ""
710
713
 
714
+ msgid "Missing the required permissions: ${missingPermissions.join( ', ' )}"
715
+ msgstr ""
716
+
711
717
  msgid "Monthly"
712
718
  msgstr "Monatlich"
713
719
 
@@ -738,9 +744,6 @@ msgstr "Nein (Überschreiben)"
738
744
  msgid "No Target Hosts"
739
745
  msgstr ""
740
746
 
741
- msgid "No execution finished yet"
742
- msgstr "Noch keine Ausführung abgeschlossen"
743
-
744
747
  msgid "No hosts found."
745
748
  msgstr "Keine Hosts gefunden"
746
749
 
@@ -756,6 +759,9 @@ msgstr "Der Funktion %{feature_name} wurde keine Vorlage zugewiesen"
756
759
  msgid "Not all required inputs have values. Missing inputs: %s"
757
760
  msgstr "Nicht alle erforderlichen Eingaben haben Werte. Fehlende Eingaben: %s"
758
761
 
762
+ msgid "Not available"
763
+ msgstr ""
764
+
759
765
  msgid "Not yet"
760
766
  msgstr ""
761
767
 
@@ -807,6 +813,9 @@ msgstr "Führe einen einzelnen Puppet-Lauf aus"
807
813
  msgid "Perform no more executions after this time"
808
814
  msgstr "Danach nicht mehr ausführen"
809
815
 
816
+ msgid "Permission Denied"
817
+ msgstr ""
818
+
810
819
  msgid "Please enter a search query"
811
820
  msgstr ""
812
821
 
@@ -816,6 +825,9 @@ msgstr ""
816
825
  msgid "Please refine your search."
817
826
  msgstr ""
818
827
 
828
+ msgid "Please request the required permissions listed below from a Foreman administrator:"
829
+ msgstr ""
830
+
819
831
  msgid "Please select at least one host"
820
832
  msgstr ""
821
833
 
@@ -851,6 +863,9 @@ msgstr "Privat-Key Kennwort"
851
863
  msgid "Problem with previewing the template: %{error}. Note that you must save template input changes before you try to preview it."
852
864
  msgstr "Problem bei Vorlagen-Vorschau: %{error}. Beachten Sie, dass Sie die Änderungen an der Vorlageneingabe speichern müssen, bevor eine Vorschau angezeigt werden kann."
853
865
 
866
+ msgid "Proceed Anyway"
867
+ msgstr ""
868
+
854
869
  msgid "Provider type"
855
870
  msgstr "Providertyp"
856
871
 
@@ -1465,6 +1480,9 @@ msgstr "Ja (überschreiben)"
1465
1480
  msgid "You are not allowed to see the currently assigned template. Saving the form now would unassign the template."
1466
1481
  msgstr "Sie haben nicht die Genehmigung, die aktuell zugewiesenen Vorlagen einzusehen. Wenn Sie das Formular jetzt speichern, wird die Zuweisung der Vorlage aufgehoben."
1467
1482
 
1483
+ msgid "You are not authorized to perform this action."
1484
+ msgstr ""
1485
+
1468
1486
  msgid "You have %s results to display. Showing first %s results"
1469
1487
  msgstr ""
1470
1488