foreman_remote_execution 12.0.5 → 13.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.eslintrc +4 -1
- data/.github/workflows/js_ci.yml +1 -1
- data/.github/workflows/release.yml +4 -2
- data/.github/workflows/ruby_ci.yml +16 -81
- data/.packit.yaml +8 -3
- data/app/assets/javascripts/foreman_remote_execution/locale/de/foreman_remote_execution.js +23 -14
- data/app/assets/javascripts/foreman_remote_execution/locale/en/foreman_remote_execution.js +22 -4
- data/app/assets/javascripts/foreman_remote_execution/locale/en_GB/foreman_remote_execution.js +23 -14
- data/app/assets/javascripts/foreman_remote_execution/locale/es/foreman_remote_execution.js +23 -14
- data/app/assets/javascripts/foreman_remote_execution/locale/fr/foreman_remote_execution.js +23 -14
- data/app/assets/javascripts/foreman_remote_execution/locale/ja/foreman_remote_execution.js +23 -14
- data/app/assets/javascripts/foreman_remote_execution/locale/ka/foreman_remote_execution.js +23 -14
- data/app/assets/javascripts/foreman_remote_execution/locale/ko/foreman_remote_execution.js +23 -14
- data/app/assets/javascripts/foreman_remote_execution/locale/pt_BR/foreman_remote_execution.js +23 -14
- data/app/assets/javascripts/foreman_remote_execution/locale/ru/foreman_remote_execution.js +23 -14
- data/app/assets/javascripts/foreman_remote_execution/locale/zh_CN/foreman_remote_execution.js +23 -14
- data/app/assets/javascripts/foreman_remote_execution/locale/zh_TW/foreman_remote_execution.js +23 -14
- data/app/controllers/ui_job_wizard_controller.rb +1 -1
- data/app/helpers/job_invocations_helper.rb +1 -1
- data/app/helpers/remote_execution_helper.rb +2 -2
- data/app/lib/actions/remote_execution/proxy_action.rb +1 -1
- data/app/lib/actions/remote_execution/run_host_job.rb +9 -17
- data/app/models/concerns/foreman_remote_execution/host_extensions.rb +8 -0
- data/app/models/host_status/execution_status.rb +2 -2
- data/app/models/job_invocation_composer.rb +4 -3
- data/app/views/api/v2/job_invocations/base.json.rabl +5 -3
- data/app/views/job_invocations/_preview_hosts_list.html.erb +1 -1
- data/app/views/job_invocations/show.html.erb +12 -5
- data/app/views/job_invocations/show.js.erb +8 -1
- data/app/views/job_invocations/welcome.html.erb +1 -1
- data/app/views/template_invocations/_refresh.js.erb +10 -4
- data/app/views/template_invocations/show.html.erb +2 -2
- data/app/views/templates/script/convert2rhel_analyze.erb +1 -12
- data/app/views/templates/script/package_action.erb +11 -1
- data/app/views/templates/script/puppet_run_once.erb +3 -3
- data/lib/foreman_remote_execution/engine.rb +1 -1
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/locale/de/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/de/foreman_remote_execution.po +24 -6
- data/locale/en/foreman_remote_execution.po +24 -6
- data/locale/en_GB/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/en_GB/foreman_remote_execution.po +24 -6
- data/locale/es/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/es/foreman_remote_execution.po +24 -6
- data/locale/foreman_remote_execution.pot +170 -142
- data/locale/fr/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/fr/foreman_remote_execution.po +24 -6
- data/locale/ja/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ja/foreman_remote_execution.po +24 -6
- data/locale/ka/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ka/foreman_remote_execution.po +24 -6
- data/locale/ko/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ko/foreman_remote_execution.po +24 -6
- data/locale/pt_BR/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/pt_BR/foreman_remote_execution.po +24 -6
- data/locale/ru/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ru/foreman_remote_execution.po +24 -6
- data/locale/zh_CN/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/zh_CN/foreman_remote_execution.po +24 -6
- data/locale/zh_TW/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/zh_TW/foreman_remote_execution.po +24 -6
- data/package.json +7 -11
- data/test/functional/api/v2/job_invocations_controller_test.rb +7 -7
- data/test/functional/api/v2/template_invocations_controller_test.rb +3 -3
- data/test/helpers/remote_execution_helper_test.rb +8 -7
- data/test/unit/actions/run_host_job_test.rb +1 -1
- data/test/unit/actions/run_hosts_job_test.rb +11 -11
- data/test/unit/concerns/foreman_tasks_cleaner_extensions_test.rb +5 -5
- data/test/unit/concerns/host_extensions_test.rb +34 -34
- data/test/unit/concerns/nic_extensions_test.rb +1 -1
- data/test/unit/execution_task_status_mapper_test.rb +10 -10
- data/test/unit/input_template_renderer_test.rb +53 -49
- data/test/unit/job_invocation_composer_test.rb +109 -81
- data/test/unit/job_invocation_test.rb +25 -25
- data/test/unit/job_template_effective_user_test.rb +3 -3
- data/test/unit/job_template_test.rb +28 -28
- data/test/unit/remote_execution_feature_test.rb +14 -14
- data/test/unit/remote_execution_provider_test.rb +39 -39
- data/test/unit/renderer_scope_input_test.rb +6 -6
- data/test/unit/targeting_test.rb +32 -32
- data/webpack/JobInvocationDetail/JobInvocationConstants.js +10 -0
- data/webpack/JobInvocationDetail/JobInvocationDetail.scss +38 -0
- data/webpack/JobInvocationDetail/JobInvocationOverview.js +13 -25
- data/webpack/JobInvocationDetail/JobInvocationSystemStatusChart.js +153 -0
- data/webpack/JobInvocationDetail/index.js +48 -10
- data/webpack/JobWizard/Footer.js +5 -1
- data/webpack/JobWizard/JobWizardConstants.js +4 -0
- data/webpack/JobWizard/JobWizardPageRerun.js +3 -0
- data/webpack/JobWizard/JobWizardSelectors.js +31 -3
- data/webpack/JobWizard/PermissionDenied.js +64 -0
- data/webpack/JobWizard/StartsBeforeErrorAlert.js +1 -0
- data/webpack/JobWizard/__tests__/fixtures.js +3 -3
- data/webpack/JobWizard/autofill.js +8 -4
- data/webpack/JobWizard/index.js +41 -1
- data/webpack/JobWizard/steps/AdvancedFields/DescriptionField.js +8 -1
- data/webpack/JobWizard/steps/AdvancedFields/Fields.js +7 -0
- data/webpack/JobWizard/steps/CategoryAndTemplate/CategoryAndTemplate.js +41 -7
- data/webpack/JobWizard/steps/HostsAndInputs/HostPreviewModal.js +7 -3
- data/webpack/JobWizard/steps/HostsAndInputs/SelectGQL.js +1 -0
- data/webpack/JobWizard/steps/HostsAndInputs/SelectedChips.js +21 -7
- data/webpack/JobWizard/steps/HostsAndInputs/hosts.gql +1 -0
- data/webpack/JobWizard/steps/HostsAndInputs/index.js +27 -2
- data/webpack/JobWizard/steps/ReviewDetails/index.js +7 -2
- data/webpack/JobWizard/steps/Schedule/PurposeField.js +1 -0
- data/webpack/JobWizard/steps/Schedule/QueryType.js +2 -0
- data/webpack/JobWizard/steps/Schedule/RepeatCron.js +1 -0
- data/webpack/JobWizard/steps/Schedule/RepeatHour.js +2 -0
- data/webpack/JobWizard/steps/Schedule/RepeatMonth.js +1 -0
- data/webpack/JobWizard/steps/Schedule/RepeatWeek.js +1 -0
- data/webpack/JobWizard/steps/Schedule/ScheduleFuture.js +2 -0
- data/webpack/JobWizard/steps/Schedule/ScheduleRecurring.js +6 -0
- data/webpack/JobWizard/steps/Schedule/ScheduleType.js +3 -0
- data/webpack/JobWizard/steps/form/FormHelpers.js +1 -0
- data/webpack/JobWizard/steps/form/GroupedSelectField.js +1 -0
- data/webpack/JobWizard/steps/form/NumberInput.js +1 -0
- data/webpack/JobWizard/steps/form/ResourceSelect.js +1 -0
- data/webpack/JobWizard/steps/form/SearchSelect.js +4 -1
- data/webpack/JobWizard/steps/form/SelectField.js +1 -0
- data/webpack/JobWizard/steps/form/WizardTitle.js +6 -1
- data/webpack/JobWizard/steps/form/__tests__/SelectSearch.test.js +2 -0
- data/webpack/__mocks__/foremanReact/routes/Hosts/constants.js +1 -0
- data/webpack/react_app/components/FeaturesDropdown/index.js +1 -0
- data/webpack/react_app/components/RecentJobsCard/RecentJobsCard.js +3 -0
- data/webpack/react_app/components/RecentJobsCard/RecentJobsTable.js +2 -1
- data/webpack/react_app/components/RegistrationExtension/RexInterface.js +1 -0
- data/webpack/react_app/components/RegistrationExtension/RexPull.js +1 -0
- data/webpack/react_app/components/RegistrationExtension/__tests__/__snapshots__/RexInterface.test.js.snap +1 -0
- metadata +10 -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
|
-
"
|
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
|
}
|
data/app/assets/javascripts/foreman_remote_execution/locale/pt_BR/foreman_remote_execution.js
CHANGED
@@ -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
|
-
"
|
1263
|
-
"
|
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
|
-
"
|
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
|
}
|
data/app/assets/javascripts/foreman_remote_execution/locale/zh_CN/foreman_remote_execution.js
CHANGED
@@ -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
|
-
"
|
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
|
}
|
data/app/assets/javascripts/foreman_remote_execution/locale/zh_TW/foreman_remote_execution.js
CHANGED
@@ -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
|
-
"
|
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
|
}
|
@@ -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
|
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.
|
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.
|
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
|
-
|
105
|
-
|
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,21 +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!
|
199
|
-
|
200
|
-
|
201
|
-
def delegated_output
|
202
|
-
if input[:delegated_action_id]
|
203
|
-
super
|
204
|
-
elsif phase?(Present)
|
205
|
-
# for compatibility with old actions
|
206
|
-
old_action = all_planned_actions.first
|
207
|
-
if old_action
|
208
|
-
old_action.output.fetch('proxy_output', {})
|
209
|
-
else
|
210
|
-
{}
|
211
|
-
end
|
212
|
-
end
|
204
|
+
host.refresh_global_status!
|
213
205
|
end
|
214
206
|
|
215
207
|
def verify_permissions(host, template_invocation)
|
@@ -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
|
-
|
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
|
-
|
42
|
+
N_('Last execution succeeded')
|
43
43
|
when CANCELLED
|
44
44
|
N_('Last execution cancelled')
|
45
45
|
when ERROR
|
@@ -569,9 +569,10 @@ class JobInvocationComposer
|
|
569
569
|
# builds input values for a given templates id based on params
|
570
570
|
# omits inputs that belongs to unavailable templates
|
571
571
|
def build_input_values_for(template_invocation, job_template_base)
|
572
|
-
template_invocation.input_values =
|
573
|
-
|
574
|
-
input
|
572
|
+
template_invocation.input_values = template_invocation.template.template_inputs_with_foreign.map do |input|
|
573
|
+
attributes = job_template_base.fetch('input_values', {}).find { |i| i[:template_input_id].to_s == input.id.to_s }
|
574
|
+
attributes = { "template_input_id" => input.id, "value" => input.default } if attributes.nil? && input.default
|
575
|
+
attributes ? input.template_invocation_input_values.build(attributes) : nil
|
575
576
|
end.compact
|
576
577
|
template_invocation.provider_input_values.build job_template_base.fetch('provider_input_values', [])
|
577
578
|
end
|
@@ -8,11 +8,13 @@ node do |invocation|
|
|
8
8
|
:template_id => pattern_template&.template_id,
|
9
9
|
:template_name => pattern_template&.template_name,
|
10
10
|
:effective_user => pattern_template&.effective_user,
|
11
|
-
:succeeded =>
|
12
|
-
:failed =>
|
13
|
-
:pending =>
|
11
|
+
:succeeded => invocation.progress_report[:success],
|
12
|
+
:failed => invocation.progress_report[:error],
|
13
|
+
:pending => invocation.progress_report[:pending],
|
14
|
+
:cancelled => invocation.progress_report[:cancelled],
|
14
15
|
:total => invocation_count(invocation, :output_key => :total_count),
|
15
16
|
:missing => invocation.missing_hosts_count,
|
17
|
+
:total_hosts => invocation.total_hosts_count,
|
16
18
|
}
|
17
19
|
end
|
18
20
|
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% if @hosts.any? -%>
|
8
8
|
<ul>
|
9
9
|
<% @hosts.each do |host| -%>
|
10
|
-
<li><%= link_to h(host
|
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
|
-
|
3
|
-
<%
|
4
|
-
<% javascript
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
3
|
-
|
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
|
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
|
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,15 +1,6 @@
|
|
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
|
13
4
|
model: JobTemplate
|
14
5
|
job_category: Convert 2 RHEL
|
15
6
|
provider_type: script
|
@@ -25,9 +16,7 @@ if ! rpm -q convert2rhel &> /dev/null; then
|
|
25
16
|
yum install -y convert2rhel
|
26
17
|
fi
|
27
18
|
|
28
|
-
|
29
|
-
export CONVERT2RHEL_DISABLE_TELEMETRY=1
|
30
|
-
<% end -%>
|
19
|
+
export CONVERT2RHEL_THROUGH_FOREMAN=1
|
31
20
|
|
32
21
|
/usr/bin/convert2rhel analyze -y
|
33
22
|
|
@@ -115,9 +115,19 @@ handle_zypp_res_codes () {
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
-%>
|
118
|
+
OUTFILE=$(mktemp)
|
119
|
+
trap "rm -f $OUTFILE" EXIT
|
120
|
+
set -o pipefail
|
118
121
|
export DEBIAN_FRONTEND=noninteractive
|
119
122
|
apt-get -y update
|
120
|
-
apt-get -o APT::Get::Upgrade-Allow-New="true" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y <%= input("options") %> <%= action %> <%= input("package") %>
|
123
|
+
LANG=C apt-get -o APT::Get::Upgrade-Allow-New="true" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y <%= input("options") %> <%= action %> <%= input("package") %> 2>&1 | tee $OUTFILE
|
124
|
+
RETVAL=$?
|
125
|
+
if grep -q "Unable to locate" $OUTFILE; then
|
126
|
+
true
|
127
|
+
else
|
128
|
+
setReturnValue() { RETVAL=$1; return $RETVAL; }
|
129
|
+
setReturnValue $RETVAL
|
130
|
+
fi
|
121
131
|
<% elsif package_manager == 'zypper' -%>
|
122
132
|
<%-
|
123
133
|
if action == "group install"
|