foreman_remote_execution 18.0.0 → 18.1.0

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 (121) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_remote_execution/locale/de/foreman_remote_execution.js +54 -9
  3. data/app/assets/javascripts/foreman_remote_execution/locale/en_GB/foreman_remote_execution.js +54 -9
  4. data/app/assets/javascripts/foreman_remote_execution/locale/es/foreman_remote_execution.js +54 -9
  5. data/app/assets/javascripts/foreman_remote_execution/locale/fr/foreman_remote_execution.js +66 -21
  6. data/app/assets/javascripts/foreman_remote_execution/locale/ja/foreman_remote_execution.js +86 -41
  7. data/app/assets/javascripts/foreman_remote_execution/locale/ka/foreman_remote_execution.js +111 -66
  8. data/app/assets/javascripts/foreman_remote_execution/locale/ko/foreman_remote_execution.js +67 -22
  9. data/app/assets/javascripts/foreman_remote_execution/locale/pt_BR/foreman_remote_execution.js +54 -9
  10. data/app/assets/javascripts/foreman_remote_execution/locale/ru/foreman_remote_execution.js +54 -9
  11. data/app/assets/javascripts/foreman_remote_execution/locale/zh_CN/foreman_remote_execution.js +60 -15
  12. data/app/assets/javascripts/foreman_remote_execution/locale/zh_TW/foreman_remote_execution.js +54 -9
  13. data/app/assets/javascripts/foreman_remote_execution/template_invocation.js +0 -170
  14. data/app/assets/stylesheets/foreman_remote_execution/job_invocations.scss +0 -6
  15. data/app/controllers/job_invocations_controller.rb +1 -98
  16. data/app/helpers/job_invocations_helper.rb +0 -49
  17. data/app/helpers/remote_execution_helper.rb +23 -123
  18. data/app/models/remote_execution_provider.rb +1 -1
  19. data/config/routes.rb +0 -6
  20. data/lib/foreman_remote_execution/plugin.rb +2 -2
  21. data/lib/foreman_remote_execution/version.rb +1 -1
  22. data/locale/de/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  23. data/locale/de/foreman_remote_execution.po +54 -9
  24. data/locale/en_GB/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  25. data/locale/en_GB/foreman_remote_execution.po +54 -9
  26. data/locale/es/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  27. data/locale/es/foreman_remote_execution.po +54 -9
  28. data/locale/foreman_remote_execution.pot +296 -230
  29. data/locale/fr/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  30. data/locale/fr/foreman_remote_execution.po +66 -21
  31. data/locale/ja/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  32. data/locale/ja/foreman_remote_execution.po +86 -41
  33. data/locale/ka/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  34. data/locale/ka/foreman_remote_execution.po +111 -66
  35. data/locale/ko/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  36. data/locale/ko/foreman_remote_execution.po +67 -22
  37. data/locale/pt_BR/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  38. data/locale/pt_BR/foreman_remote_execution.po +54 -9
  39. data/locale/ru/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  40. data/locale/ru/foreman_remote_execution.po +54 -9
  41. data/locale/zh_CN/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  42. data/locale/zh_CN/foreman_remote_execution.po +60 -15
  43. data/locale/zh_TW/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  44. data/locale/zh_TW/foreman_remote_execution.po +54 -9
  45. data/package.json +1 -14
  46. data/test/functional/job_invocations_controller_test.rb +0 -77
  47. data/test/unit/remote_execution_provider_test.rb +1 -1
  48. data/webpack/JobInvocationDetail/JobInvocationConstants.js +5 -0
  49. data/webpack/JobInvocationDetail/JobInvocationToolbarButtons.js +0 -10
  50. data/webpack/JobInvocationDetail/TemplateInvocation.js +12 -69
  51. data/webpack/JobInvocationDetail/TemplateInvocationComponents/OutputCodeBlock.js +94 -72
  52. data/webpack/JobInvocationDetail/TemplateInvocationHelpers.js +33 -0
  53. data/webpack/JobInvocationDetail/__tests__/JobInvocationDetailEmptyState.test.js +1 -1
  54. data/webpack/JobInvocationDetail/__tests__/MainInformation.test.js +0 -6
  55. data/webpack/JobInvocationDetail/__tests__/OutputCodeBlock.test.js +1 -1
  56. data/webpack/JobInvocationDetail/__tests__/TableToolbarActions.test.js +1 -1
  57. data/webpack/JobInvocationDetail/__tests__/TemplateInvocation.test.js +5 -1
  58. data/webpack/JobInvocationDetail/__tests__/TemplateInvocationHelpers.test.js +94 -0
  59. data/webpack/JobInvocationDetail/__tests__/TemplateInvocationPolling.test.js +338 -139
  60. data/webpack/JobInvocationDetail/useTemplateInvocationOutputPolling.js +185 -0
  61. data/webpack/JobWizard/JobWizardPageRerun.js +0 -10
  62. data/webpack/JobWizard/__tests__/autofill.test.js +23 -0
  63. data/webpack/JobWizard/__tests__/integration.test.js +1 -1
  64. data/webpack/JobWizard/autofill.js +18 -4
  65. data/webpack/JobWizard/index.js +1 -18
  66. data/webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js +49 -1
  67. data/webpack/global_index.js +0 -2
  68. data/webpack/index.js +0 -15
  69. data/webpack/react_app/components/RegistrationExtension/__tests__/RexInterface.test.js +1 -1
  70. metadata +6 -53
  71. data/app/assets/stylesheets/foreman_remote_execution/modal_window.scss +0 -4
  72. data/app/helpers/job_invocations_chart_helper.rb +0 -80
  73. data/app/views/job_invocations/_card_results.html.erb +0 -12
  74. data/app/views/job_invocations/_card_schedule.html.erb +0 -33
  75. data/app/views/job_invocations/_card_target_hosts.html.erb +0 -57
  76. data/app/views/job_invocations/_card_user_input.html.erb +0 -16
  77. data/app/views/job_invocations/_description_fields.html.erb +0 -4
  78. data/app/views/job_invocations/_form.html.erb +0 -144
  79. data/app/views/job_invocations/_preview_hosts_modal.html.erb +0 -15
  80. data/app/views/job_invocations/_rerun_taxonomies.html.erb +0 -22
  81. data/app/views/job_invocations/_tab_hosts.html.erb +0 -11
  82. data/app/views/job_invocations/_tab_overview.html.erb +0 -41
  83. data/app/views/job_invocations/_tab_preview_templates.html.erb +0 -20
  84. data/app/views/job_invocations/_user_input.html.erb +0 -21
  85. data/app/views/job_invocations/new.html.erb +0 -9
  86. data/app/views/job_invocations/refresh.js.erb +0 -4
  87. data/app/views/job_invocations/show.html.erb +0 -59
  88. data/app/views/job_invocations/show.js.erb +0 -12
  89. data/app/views/job_invocations/show.json.erb +0 -5
  90. data/test/support/remote_execution_helper.rb +0 -5
  91. data/webpack/react_app/components/TargetingHosts/TargetingHosts.js +0 -62
  92. data/webpack/react_app/components/TargetingHosts/TargetingHostsConsts.js +0 -2
  93. data/webpack/react_app/components/TargetingHosts/TargetingHostsHelpers.js +0 -10
  94. data/webpack/react_app/components/TargetingHosts/TargetingHostsLabelsRow.js +0 -45
  95. data/webpack/react_app/components/TargetingHosts/TargetingHostsLabelsRow.scss +0 -30
  96. data/webpack/react_app/components/TargetingHosts/TargetingHostsPage.js +0 -78
  97. data/webpack/react_app/components/TargetingHosts/TargetingHostsPage.scss +0 -3
  98. data/webpack/react_app/components/TargetingHosts/TargetingHostsSelectors.js +0 -25
  99. data/webpack/react_app/components/TargetingHosts/__tests__/HostItem.test.js +0 -76
  100. data/webpack/react_app/components/TargetingHosts/__tests__/HostStatus.test.js +0 -6
  101. data/webpack/react_app/components/TargetingHosts/__tests__/TargetingHosts.test.js +0 -6
  102. data/webpack/react_app/components/TargetingHosts/__tests__/TargetingHostsPage.test.js +0 -9
  103. data/webpack/react_app/components/TargetingHosts/__tests__/TargetingHostsSelectors.test.js +0 -31
  104. data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/HostStatus.test.js.snap +0 -12
  105. data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/TargetingHosts.test.js.snap +0 -96
  106. data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/TargetingHostsPage.test.js.snap +0 -75
  107. data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/TargetingHostsSelectors.test.js.snap +0 -16
  108. data/webpack/react_app/components/TargetingHosts/__tests__/fixtures.js +0 -56
  109. data/webpack/react_app/components/TargetingHosts/components/HostItem.js +0 -39
  110. data/webpack/react_app/components/TargetingHosts/components/HostStatus.js +0 -54
  111. data/webpack/react_app/components/TargetingHosts/index.js +0 -150
  112. data/webpack/react_app/components/jobInvocations/AggregateStatus/index.js +0 -60
  113. data/webpack/react_app/components/jobInvocations/AggregateStatus/index.test.js +0 -76
  114. data/webpack/react_app/components/jobInvocations/index.js +0 -94
  115. data/webpack/react_app/extend/reducers.js +0 -5
  116. data/webpack/react_app/redux/actions/jobInvocations/index.js +0 -87
  117. data/webpack/react_app/redux/consts.js +0 -5
  118. data/webpack/react_app/redux/reducers/index.js +0 -6
  119. data/webpack/react_app/redux/reducers/jobInvocations/index.fixtures.js +0 -46
  120. data/webpack/react_app/redux/reducers/jobInvocations/index.js +0 -34
  121. data/webpack/react_app/redux/reducers/jobInvocations/index.test.js +0 -43
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_remote_execution": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_remote_execution 16.5.1",
6
+ "Project-Id-Version": "foreman_remote_execution 18.0.0",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2016-02-15 13:54+0000",
9
9
  "Last-Translator": "Ewoud Kohl van Wijngaarden <ewoud+transifex@kohlvanwijngaarden.nl>, 2024",
@@ -131,6 +131,9 @@
131
131
  "Alphabetical": [
132
132
  "按字母"
133
133
  ],
134
+ "Already on the review step": [
135
+ "已在审阅步骤中"
136
+ ],
134
137
  "An error occurred while fetching the template invocation details.": [
135
138
  "在获取模板调用详情时出错。"
136
139
  ],
@@ -260,29 +263,29 @@
260
263
  "Copy to clipboard": [
261
264
  "复制到剪贴板"
262
265
  ],
263
- "Could not abort the job %s: ${response}": [
264
- "无法中止作业 %s: ${response}"
266
+ "Could not abort the job %s: %s": [
267
+ "无法中止作业 %s: %s"
265
268
  ],
266
269
  "Could not abort the task": [
267
270
  "无法中止作业"
268
271
  ],
269
- "Could not cancel recurring logic %s: ${response}": [
270
- "无法取消重复逻辑 %s:${response}"
272
+ "Could not cancel recurring logic %s: %s": [
273
+ "无法取消循环逻辑 %s:%s"
271
274
  ],
272
- "Could not cancel the job %s: ${response}": [
273
- "无法取消作业 %s: ${response}"
275
+ "Could not cancel the job %s: %s": [
276
+ "无法取消作业 %s: %s"
274
277
  ],
275
278
  "Could not cancel the task": [
276
279
  "无法取消作业"
277
280
  ],
278
- "Could not disable recurring logic %s: ${response}": [
279
- "无法禁用重复逻辑 %s:${response}"
281
+ "Could not disable recurring logic %s: %s": [
282
+ "无法禁用重复逻辑 %s:%s"
280
283
  ],
281
284
  "Could not display data for job invocation.": [
282
285
  "无法显示用于作业调用的数据。"
283
286
  ],
284
- "Could not enable recurring logic %s: ${response}": [
285
- "无法启用重复逻辑 %s:${response}"
287
+ "Could not enable recurring logic %s: %s": [
288
+ "无法启用重复逻辑 %s:%s"
286
289
  ],
287
290
  "Could not find any suitable interface for execution": [
288
291
  "无法找到适合执行的接口"
@@ -314,6 +317,9 @@
314
317
  "Create a job template": [
315
318
  "创建作业模板"
316
319
  ],
320
+ "Create a new job invocation": [
321
+ "创建新作业调用"
322
+ ],
317
323
  "Create a recurring job": [
318
324
  "创建一个重复运行的作业"
319
325
  ],
@@ -404,6 +410,9 @@
404
410
  "Designation of a special purpose": [
405
411
  "设计特殊目的"
406
412
  ],
413
+ "Directory on the host where remote execution jobs in push mode place and run their scripts. You can override this setting per host with the `remote_execution_remote_working_dir` host parameter.": [
414
+ "主机上以推送模式运行的远程执行作业存放并运行其脚本的目录。。您可以使用 'remote_execution_remote_working_dir' 主机参数覆盖每个主机的设置。"
415
+ ],
407
416
  "Disable recurring": [
408
417
  "禁用重复"
409
418
  ],
@@ -539,6 +548,9 @@
539
548
  "Failed rendering template: %s": [
540
549
  "呈现模板失败:%s"
541
550
  ],
551
+ "Failed to load host invocation data": [
552
+ "加载主机调用数据失败"
553
+ ],
542
554
  "Failed:": [
543
555
  "失败:"
544
556
  ],
@@ -593,6 +605,9 @@
593
605
  "Get raw output for a host": [
594
606
  "获取主机的原始输出"
595
607
  ],
608
+ "Go to job invocations": [
609
+ "返回到作业调用"
610
+ ],
596
611
  "Has to be a positive number": [
597
612
  "必须为一个正数"
598
613
  ],
@@ -659,6 +674,12 @@
659
674
  "Include all inputs from the foreign template": [
660
675
  "在外部模板中包含所有输入格式"
661
676
  ],
677
+ "Include hosts and template invocations in the response. Defaults to true for backwards compatibility. Pass false to skip serializing all hosts.": [
678
+ "在响应中包含主机和模板调用。为了向后兼容,默认为 true。设置为 false 来跳过所有主机的序列化。"
679
+ ],
680
+ "Include per-host task and permission data in the response": [
681
+ "在响应中包含每个主机的任务和权限数据"
682
+ ],
662
683
  "Indicates that the action should be cancelled if it cannot be started before this time.": [
663
684
  "这代表,如果操作无法在这个时间前开始则操作应该被取消。"
664
685
  ],
@@ -827,6 +848,9 @@
827
848
  "Minute can only be a number between 0-59": [
828
849
  "分钟只能是一个 0-59 之间的数字"
829
850
  ],
851
+ "Missing permissions to generate report templates": [
852
+ "缺少生成报告模板的权限"
853
+ ],
830
854
  "Missing the required permissions: ${missingPermissions.join( ', ' )}": [
831
855
  "缺少所需的权限:${missingPermissions.join( ', ' )}"
832
856
  ],
@@ -1071,7 +1095,7 @@
1071
1095
  "重复逻辑"
1072
1096
  ],
1073
1097
  "Recurring logic %s cancelled successfully.": [
1074
- "成功取消重复逻辑 %s。"
1098
+ "成功取消循环逻辑 %s。"
1075
1099
  ],
1076
1100
  "Recurring logic %s disabled successfully.": [
1077
1101
  "成功禁用重复逻辑 %s。"
@@ -1106,6 +1130,12 @@
1106
1130
  "Remote execution job": [
1107
1131
  "远程执行作业"
1108
1132
  ],
1133
+ "Remote working directory": [
1134
+ "远程工作目录"
1135
+ ],
1136
+ "Remote working directory \\\"%{current_value}\\\" is not an absolute path": [
1137
+ "远程工作目录 \\\"%{current_value}\\\" 不是绝对路径"
1138
+ ],
1109
1139
  "Repeat a maximum of N times": [
1110
1140
  "最多重复 N 次"
1111
1141
  ],
@@ -1118,6 +1148,9 @@
1118
1148
  "Repeats": [
1119
1149
  "重复"
1120
1150
  ],
1151
+ "Report template not found or not configured properly": [
1152
+ "报告模板未找到或未正确配置"
1153
+ ],
1121
1154
  "Rerun": [
1122
1155
  "重新运行"
1123
1156
  ],
@@ -1313,9 +1346,6 @@
1313
1346
  "Should this interface be used for remote execution?": [
1314
1347
  "该接口应该用于远程执行吗?"
1315
1348
  ],
1316
- "Show Job status for the hosts": [
1317
- "显示主机的作业状态"
1318
- ],
1319
1349
  "Show all advanced fields": [
1320
1350
  "现实所有高级字段"
1321
1351
  ],
@@ -1325,6 +1355,9 @@
1325
1355
  "Show job invocation": [
1326
1356
  "显示作业调用"
1327
1357
  ],
1358
+ "Show job status for each host, only applicable when include_hosts is true": [
1359
+ "显示每个主机的作业状态,仅在 include_hosts 为 true 时才适用"
1360
+ ],
1328
1361
  "Show job template details": [
1329
1362
  "显示作业模板详情"
1330
1363
  ],
@@ -1637,6 +1670,9 @@
1637
1670
  "Unknown": [
1638
1671
  "未知"
1639
1672
  ],
1673
+ "Unknown error.": [
1674
+ "未知错误"
1675
+ ],
1640
1676
  "Unknown execution status": [
1641
1677
  "未知的执行状态"
1642
1678
  ],
@@ -1784,6 +1820,9 @@
1784
1820
  "host already has an execution interface": [
1785
1821
  "主机已有一个执行接口"
1786
1822
  ],
1823
+ "host method": [
1824
+ "主机方法"
1825
+ ],
1787
1826
  "hosts": [
1788
1827
  "主机"
1789
1828
  ],
@@ -1811,6 +1850,12 @@
1811
1850
  "is month (range: 1-12)": [
1812
1851
  "月份(范围:1-12)"
1813
1852
  ],
1853
+ "job invocation": [
1854
+ "工作调用"
1855
+ ],
1856
+ "must be an absolute path": [
1857
+ "必须是绝对路径"
1858
+ ],
1814
1859
  "no": [
1815
1860
  "否"
1816
1861
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_remote_execution": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_remote_execution 16.5.1",
6
+ "Project-Id-Version": "foreman_remote_execution 18.0.0",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2016-02-15 13:54+0000",
9
9
  "Last-Translator": "FULL NAME <EMAIL@ADDRESS>",
@@ -132,6 +132,9 @@
132
132
  "Alphabetical": [
133
133
  ""
134
134
  ],
135
+ "Already on the review step": [
136
+ ""
137
+ ],
135
138
  "An error occurred while fetching the template invocation details.": [
136
139
  ""
137
140
  ],
@@ -261,28 +264,28 @@
261
264
  "Copy to clipboard": [
262
265
  ""
263
266
  ],
264
- "Could not abort the job %s: ${response}": [
267
+ "Could not abort the job %s: %s": [
265
268
  ""
266
269
  ],
267
270
  "Could not abort the task": [
268
271
  ""
269
272
  ],
270
- "Could not cancel recurring logic %s: ${response}": [
273
+ "Could not cancel recurring logic %s: %s": [
271
274
  ""
272
275
  ],
273
- "Could not cancel the job %s: ${response}": [
276
+ "Could not cancel the job %s: %s": [
274
277
  ""
275
278
  ],
276
279
  "Could not cancel the task": [
277
280
  ""
278
281
  ],
279
- "Could not disable recurring logic %s: ${response}": [
282
+ "Could not disable recurring logic %s: %s": [
280
283
  ""
281
284
  ],
282
285
  "Could not display data for job invocation.": [
283
286
  ""
284
287
  ],
285
- "Could not enable recurring logic %s: ${response}": [
288
+ "Could not enable recurring logic %s: %s": [
286
289
  ""
287
290
  ],
288
291
  "Could not find any suitable interface for execution": [
@@ -315,6 +318,9 @@
315
318
  "Create a job template": [
316
319
  "建立工作範本"
317
320
  ],
321
+ "Create a new job invocation": [
322
+ ""
323
+ ],
318
324
  "Create a recurring job": [
319
325
  "建立週期性工作"
320
326
  ],
@@ -405,6 +411,9 @@
405
411
  "Designation of a special purpose": [
406
412
  ""
407
413
  ],
414
+ "Directory on the host where remote execution jobs in push mode place and run their scripts. You can override this setting per host with the `remote_execution_remote_working_dir` host parameter.": [
415
+ ""
416
+ ],
408
417
  "Disable recurring": [
409
418
  ""
410
419
  ],
@@ -540,6 +549,9 @@
540
549
  "Failed rendering template: %s": [
541
550
  "無法生成範本:%s"
542
551
  ],
552
+ "Failed to load host invocation data": [
553
+ ""
554
+ ],
543
555
  "Failed:": [
544
556
  ""
545
557
  ],
@@ -594,6 +606,9 @@
594
606
  "Get raw output for a host": [
595
607
  ""
596
608
  ],
609
+ "Go to job invocations": [
610
+ ""
611
+ ],
597
612
  "Has to be a positive number": [
598
613
  ""
599
614
  ],
@@ -660,6 +675,12 @@
660
675
  "Include all inputs from the foreign template": [
661
676
  ""
662
677
  ],
678
+ "Include hosts and template invocations in the response. Defaults to true for backwards compatibility. Pass false to skip serializing all hosts.": [
679
+ ""
680
+ ],
681
+ "Include per-host task and permission data in the response": [
682
+ ""
683
+ ],
663
684
  "Indicates that the action should be cancelled if it cannot be started before this time.": [
664
685
  "這表示如果不能在這時間之前開始,就應該取消動作。"
665
686
  ],
@@ -828,6 +849,9 @@
828
849
  "Minute can only be a number between 0-59": [
829
850
  ""
830
851
  ],
852
+ "Missing permissions to generate report templates": [
853
+ ""
854
+ ],
831
855
  "Missing the required permissions: ${missingPermissions.join( ', ' )}": [
832
856
  ""
833
857
  ],
@@ -1107,6 +1131,12 @@
1107
1131
  "Remote execution job": [
1108
1132
  ""
1109
1133
  ],
1134
+ "Remote working directory": [
1135
+ ""
1136
+ ],
1137
+ "Remote working directory \\\"%{current_value}\\\" is not an absolute path": [
1138
+ ""
1139
+ ],
1110
1140
  "Repeat a maximum of N times": [
1111
1141
  "重複最多 N 次"
1112
1142
  ],
@@ -1119,6 +1149,9 @@
1119
1149
  "Repeats": [
1120
1150
  "重複"
1121
1151
  ],
1152
+ "Report template not found or not configured properly": [
1153
+ ""
1154
+ ],
1122
1155
  "Rerun": [
1123
1156
  "重新執行"
1124
1157
  ],
@@ -1314,9 +1347,6 @@
1314
1347
  "Should this interface be used for remote execution?": [
1315
1348
  ""
1316
1349
  ],
1317
- "Show Job status for the hosts": [
1318
- ""
1319
- ],
1320
1350
  "Show all advanced fields": [
1321
1351
  ""
1322
1352
  ],
@@ -1326,6 +1356,9 @@
1326
1356
  "Show job invocation": [
1327
1357
  "顯示工作祈願"
1328
1358
  ],
1359
+ "Show job status for each host, only applicable when include_hosts is true": [
1360
+ ""
1361
+ ],
1329
1362
  "Show job template details": [
1330
1363
  "顯示工作範本的詳情"
1331
1364
  ],
@@ -1639,6 +1672,9 @@
1639
1672
  "Unknown": [
1640
1673
  "不明"
1641
1674
  ],
1675
+ "Unknown error.": [
1676
+ ""
1677
+ ],
1642
1678
  "Unknown execution status": [
1643
1679
  "未知的執行狀態"
1644
1680
  ],
@@ -1786,6 +1822,9 @@
1786
1822
  "host already has an execution interface": [
1787
1823
  "主機已有執行介面"
1788
1824
  ],
1825
+ "host method": [
1826
+ ""
1827
+ ],
1789
1828
  "hosts": [
1790
1829
  "主機"
1791
1830
  ],
@@ -1813,6 +1852,12 @@
1813
1852
  "is month (range: 1-12)": [
1814
1853
  "是月份(範圍:1-12)"
1815
1854
  ],
1855
+ "job invocation": [
1856
+ ""
1857
+ ],
1858
+ "must be an absolute path": [
1859
+ ""
1860
+ ],
1816
1861
  "no": [
1817
1862
  "否"
1818
1863
  ],
@@ -1,87 +1,3 @@
1
- $(function() { job_invocation_form_binds() });
2
-
3
- function refresh_execution_form(perform_description_reset) {
4
- var form = $('form#job_invocation_form');
5
- var data = form.serializeArray();
6
-
7
- request = $.ajax({
8
- data: data,
9
- type: 'POST',
10
- url: form.attr('data-refresh-url'),
11
- dataType: 'script'
12
- });
13
-
14
- request.done(function () {
15
- password_caps_lock_hint();
16
- form.find('a[rel="popover-modal"]').popover({html: true});
17
- form.find('select').select2({allowClear: true});
18
- if(perform_description_reset == true) {
19
- var fieldset = $('fieldset#job_template_' + $('select.job_template_selector').val());
20
- reset_description(fieldset);
21
- }
22
- template_change($('select.job_template_selector'));
23
- job_invocation_form_binds();
24
- });
25
- }
26
-
27
- function refresh_search_query(value){
28
- id = value.val;
29
- $('textarea#targeting_search_query').val($('span#bookmark_query_map span#bookmark-' + id).data('query'));
30
- }
31
-
32
- function show_preview_hosts_modal() {
33
- var form = $('form#job_invocation_form');
34
- var data = form
35
- .serializeArray()
36
- .filter(function(item) {
37
- return [
38
- 'targeting[search_query]',
39
- 'targeting[bookmark_id]',
40
- 'targeting[targeting_type]',
41
- 'targeting[randomized_ordering]',
42
- ].includes(item.name)
43
- });
44
- request = $.ajax({
45
- data: data,
46
- type: 'GET',
47
- url: $('#previewHostsModal').attr('data-url')
48
- }).then(function(result){
49
- var modal_window = $('#previewHostsModal');
50
- modal_window.find('.modal-body').html(result);
51
- modal_window.modal({'show': true});
52
- modal_window.find('a[rel="popover-modal"]').popover();
53
- });
54
- }
55
-
56
- function close_preview_hosts_modal() {
57
- var modal_window = $('#previewHostsModal');
58
- modal_window.modal('hide');
59
- modal_window.removeData();
60
- modal_window.find('.modal-body').html('');
61
- }
62
-
63
- function job_invocation_form_binds() {
64
- $('select.job_template_selector').on('click', function () {
65
- provider_fieldset = $('#provider_' + $(this).data('providerType'));
66
- $(provider_fieldset).find('fieldset.job_template_form').hide();
67
- $('#job_template_' + $(this).val()).show();
68
- });
69
-
70
- $('select#job_invocation_job_category').on('change', function() {
71
- refresh_execution_form(true);
72
- });
73
-
74
- $('button#refresh_execution_form').on('click', refresh_execution_form);
75
-
76
- $('button#preview_hosts').on('click', show_preview_hosts_modal);
77
-
78
- $('textarea#targeting_search_query').on('change', refresh_execution_form);
79
-
80
- $('select#targeting_bookmark_id').on('change', refresh_search_query);
81
-
82
- tfm.advancedFields.initAdvancedFields()
83
- }
84
-
85
1
  function delayed_refresh(url, data){
86
2
  setTimeout(function () {
87
3
  $.ajax(
@@ -94,89 +10,3 @@ function delayed_refresh(url, data){
94
10
  )
95
11
  }, 1000);
96
12
  }
97
-
98
- function job_invocation_refresh_data(){
99
- return {
100
- hosts_needs_refresh: $("div#hosts").data('refresh_required'),
101
- host_ids_needing_name_update: fetch_ids_of_hosts('name'),
102
- host_ids_needing_status_update: fetch_ids_of_hosts('status'),
103
- host_ids_needing_actions_update: fetch_ids_of_hosts('actions')
104
- }
105
- }
106
-
107
- function fetch_ids_of_hosts(attribute){
108
- return $('div#hosts td.host_' + attribute + '[data-refresh_required="true"]').map(function() { return $(this).data('id') }).get();
109
- }
110
-
111
- function regenerate_description(thing) {
112
- var fieldset = $(thing).closest('fieldset');
113
- var dict = load_keys(fieldset);
114
- var format = fieldset.find('.description_format').val();
115
- fieldset.find('.description').val(String.format(format, dict));
116
- }
117
-
118
- function load_keys(parent) {
119
- var dict = {};
120
- var pattern = $(parent).find(".description_format").val();
121
- var re = new RegExp("%\\{([^\\}]+)\\}", "gm");
122
- var match = re.exec(pattern);
123
- while(match != null) {
124
- dict[match[1]] = $(parent).find("#" + match[1]).val();
125
- match = re.exec(pattern);
126
- }
127
- dict['job_category'] = $('#job_invocation_job_category').val();
128
- dict['template_name'] = $('.job_template_selector:visible span.select2-chosen').html();
129
- return dict;
130
- }
131
-
132
- function description_override(source) {
133
- var description_format_container = $(source).closest('fieldset').find('.description_format_container');
134
- var description_format = $(description_format_container).find('.description_format');
135
- var old_value = $(source).val();
136
- if($(source).is(':checked')) {
137
- $(description_format_container).hide();
138
- } else {
139
- $(description_format_container).show();
140
- }
141
- $(source).val($(description_format).val());
142
- $(description_format).val(old_value);
143
- regenerate_description(description_format);
144
- }
145
-
146
- function template_change(source) {
147
- var template_forms = $('fieldset.job_template_form');
148
- for(i = 0; i < template_forms.length; i++) {
149
- set_description_disable(template_forms[i], true);
150
- }
151
- var id = $(source).val();
152
- var template_fieldset = $(source).closest('form').find('fieldset#job_template_' + id);
153
- set_description_disable(template_fieldset, false);
154
- regenerate_description(template_fieldset.find('.description'));
155
- }
156
-
157
- function set_description_disable(thing, value) {
158
- $(thing).find('.description').prop('disabled', value);
159
- $(thing).find('.description_format').prop('disabled', value);
160
- $(thing).find('.description_format_override').prop('disabled', value);
161
- }
162
-
163
- function reset_description(fieldset) {
164
- var checkbox = $(fieldset).find('.description_format_override');
165
- $(fieldset).find('.description_format').val($(checkbox).val());
166
- $(checkbox).prop('checked', true);
167
- $(fieldset).find('.description_format_container').hide();
168
- }
169
-
170
- String.format = function (pattern, dict) {
171
- if(pattern == undefined) {
172
- return "";
173
- }
174
- for (var key in dict) {
175
- var regEx = new RegExp("%\\{" + key + "\\}", "gm");
176
- if(dict[key] == undefined) {
177
- dict[key] = "%{" + key + "}"
178
- }
179
- pattern = pattern.replace(regEx, dict[key]);
180
- }
181
- return pattern;
182
- };
@@ -1,9 +1,3 @@
1
- .target-hosts-card {
2
- pre {
3
- white-space:pre-line;
4
- }
5
- }
6
-
7
1
  #title_action {
8
2
  .button_to {
9
3
  display: inline-block;