foreman-tasks 12.0.0 → 12.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby_tests.yml +1 -0
- data/app/assets/javascripts/foreman-tasks/locale/de/foreman_tasks.js +58 -22
- data/app/assets/javascripts/foreman-tasks/locale/en/foreman_tasks.js +56 -20
- data/app/assets/javascripts/foreman-tasks/locale/es/foreman_tasks.js +59 -23
- data/app/assets/javascripts/foreman-tasks/locale/fr/foreman_tasks.js +61 -25
- data/app/assets/javascripts/foreman-tasks/locale/ja/foreman_tasks.js +61 -25
- data/app/assets/javascripts/foreman-tasks/locale/ka/foreman_tasks.js +60 -24
- data/app/assets/javascripts/foreman-tasks/locale/ko/foreman_tasks.js +61 -25
- data/app/assets/javascripts/foreman-tasks/locale/pt_BR/foreman_tasks.js +59 -23
- data/app/assets/javascripts/foreman-tasks/locale/ru/foreman_tasks.js +58 -22
- data/app/assets/javascripts/foreman-tasks/locale/zh_CN/foreman_tasks.js +61 -25
- data/app/assets/javascripts/foreman-tasks/locale/zh_TW/foreman_tasks.js +57 -21
- data/app/controllers/foreman_tasks/api/tasks_controller.rb +4 -19
- data/app/controllers/foreman_tasks/tasks_controller.rb +4 -5
- data/app/lib/actions/helpers/lock.rb +0 -6
- data/app/lib/actions/middleware/keep_current_user.rb +6 -12
- data/app/models/foreman_tasks/task.rb +1 -1
- data/app/views/foreman_tasks/api/tasks/dependency_summary.json.rabl +1 -3
- data/app/views/foreman_tasks/api/tasks/show.json.rabl +4 -1
- data/config/routes.rb +3 -3
- data/foreman-tasks.gemspec +3 -1
- data/lib/foreman_tasks/engine.rb +1 -1
- data/lib/foreman_tasks/tasks/export_tasks.rake +1 -1
- data/lib/foreman_tasks/version.rb +1 -1
- data/locale/de/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/de/foreman_tasks.po +59 -23
- data/locale/en/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/en/foreman_tasks.po +56 -20
- data/locale/es/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/es/foreman_tasks.po +59 -23
- data/locale/foreman_tasks.pot +173 -100
- data/locale/fr/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/fr/foreman_tasks.po +61 -25
- data/locale/ja/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/ja/foreman_tasks.po +61 -25
- data/locale/ka/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/ka/foreman_tasks.po +60 -24
- data/locale/ko/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/ko/foreman_tasks.po +61 -25
- data/locale/pt_BR/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/pt_BR/foreman_tasks.po +59 -23
- data/locale/ru/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/ru/foreman_tasks.po +58 -22
- data/locale/zh_CN/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/zh_CN/foreman_tasks.po +61 -25
- data/locale/zh_TW/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/zh_TW/foreman_tasks.po +57 -21
- data/test/controllers/api/tasks_controller_test.rb +29 -3
- data/test/controllers/tasks_controller_test.rb +46 -2
- data/webpack/ForemanTasks/Components/TaskActions/TaskAction.test.js +8 -0
- data/webpack/ForemanTasks/Components/TaskActions/TaskActionHelpers.js +8 -2
- data/webpack/ForemanTasks/Components/TaskActions/TaskActionHelpers.test.js +25 -33
- data/webpack/ForemanTasks/Components/TaskActions/index.js +24 -3
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/TaskInfo.test.js.snap +6 -6
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetailsActions.test.js +9 -0
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/__snapshots__/TaskDetailsActions.test.js.snap +16 -11
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js +2 -3
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/__snapshots__/TasksTimeRow.test.js.snap +4 -8
- data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboard.js +2 -4
- data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboard.scss +0 -3
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboard.test.js.snap +2 -5
- data/webpack/ForemanTasks/Components/{common/ActionButtons/ActionButton.js → TasksTable/Components/CellActionButton.js} +36 -21
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/index.test.js +32 -29
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/createBulkTaskModal.js +14 -18
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/createTaskModal.js +13 -15
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/index.js +7 -7
- data/webpack/ForemanTasks/Components/TasksTable/TasksBulkActions.js +16 -23
- data/webpack/ForemanTasks/Components/TasksTable/TasksColumns.js +56 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksIndexPage.js +277 -3
- data/webpack/ForemanTasks/Components/TasksTable/TasksModals.js +96 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableConstants.js +10 -18
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableHelpers.js +3 -3
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksBulkActions.test.js +130 -63
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksIndexPage.test.js +315 -8
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.fixtures.js +214 -41
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableHelpers.test.js +20 -12
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksBulkActions.test.js.snap +18 -35
- data/webpack/ForemanTasks/ForemanTasksReducers.js +0 -4
- data/webpack/Routes/routes.js +22 -0
- data/webpack/Routes/routes.test.js +95 -0
- data/webpack/global_index.js +10 -0
- data/webpack/index.js +0 -18
- data/webpack/test_setup.js +1 -0
- metadata +15 -89
- data/app/controllers/foreman_tasks/react_controller.rb +0 -17
- data/app/views/foreman_tasks/layouts/react.html.erb +0 -13
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/ConfirmModalSelectors.js +0 -30
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModalSelectors.test.js +0 -66
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/__snapshots__/ConfirmModalSelectors.test.js.snap +0 -33
- data/webpack/ForemanTasks/Components/TasksTable/Components/SelectAllAlert.js +0 -49
- data/webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js +0 -32
- data/webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionHeaderCell.js +0 -38
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/SelectAllAlert.test.js +0 -29
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/TableSelectionCell.test.js +0 -15
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/TableSelectionHeaderCell.test.js +0 -15
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/SelectAllAlert.test.js.snap +0 -81
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/TableSelectionCell.test.js.snap +0 -14
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/TableSelectionHeaderCell.test.js.snap +0 -15
- data/webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js +0 -40
- data/webpack/ForemanTasks/Components/TasksTable/TasksTable.js +0 -163
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableActions.js +0 -108
- data/webpack/ForemanTasks/Components/TasksTable/TasksTablePage.js +0 -234
- data/webpack/ForemanTasks/Components/TasksTable/TasksTablePage.scss +0 -20
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableReducer.js +0 -68
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableSchema.js +0 -85
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableSelectors.js +0 -63
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/SubTasksPage.test.js +0 -20
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.test.js +0 -9
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableActions.test.js +0 -65
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTablePage.test.js +0 -35
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableReducer.test.js +0 -87
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/SubTasksPage.test.js.snap +0 -48
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksIndexPage.test.js.snap +0 -39
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTable.test.js.snap +0 -52
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTableActions.test.js.snap +0 -40
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTablePage.test.js.snap +0 -368
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTableReducer.test.js.snap +0 -116
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/__snapshots__/actionCellFormatter.test.js.snap +0 -15
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/__snapshots__/actionNameCellFormatter.test.js.snap +0 -10
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/__snapshots__/dateCellFormmatter.test.js.snap +0 -9
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/__snapshots__/durationCellFormmatter.test.js.snap +0 -18
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/__snapshots__/selectionCellFormatter.test.js.snap +0 -12
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/__snapshots__/selectionHeaderCellFormatter.test.js.snap +0 -11
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/actionCellFormatter.test.js +0 -11
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/actionNameCellFormatter.test.js +0 -8
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/dateCellFormmatter.test.js +0 -7
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/durationCellFormmatter.test.js +0 -12
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/selectionCellFormatter.test.js +0 -12
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/selectionHeaderCellFormatter.test.js +0 -12
- data/webpack/ForemanTasks/Components/TasksTable/formatters/actionCellFormatter.js +0 -19
- data/webpack/ForemanTasks/Components/TasksTable/formatters/actionNameCellFormatter.js +0 -9
- data/webpack/ForemanTasks/Components/TasksTable/formatters/dateCellFormmatter.js +0 -7
- data/webpack/ForemanTasks/Components/TasksTable/formatters/durationCellFormmatter.js +0 -7
- data/webpack/ForemanTasks/Components/TasksTable/formatters/index.js +0 -7
- data/webpack/ForemanTasks/Components/TasksTable/formatters/selectionCellFormatter.js +0 -17
- data/webpack/ForemanTasks/Components/TasksTable/formatters/selectionHeaderCellFormatter.js +0 -11
- data/webpack/ForemanTasks/Components/TasksTable/index.js +0 -42
- data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js +0 -101
- data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ActionButton.test.js.snap +0 -95
- data/webpack/ForemanTasks/ForemanTasks.js +0 -11
- data/webpack/ForemanTasks/ForemanTasks.test.js +0 -10
- data/webpack/ForemanTasks/Routes/ForemanTasksRouter.js +0 -14
- data/webpack/ForemanTasks/Routes/ForemanTasksRouter.test.js +0 -26
- data/webpack/ForemanTasks/Routes/ForemanTasksRoutes.js +0 -23
- data/webpack/ForemanTasks/Routes/ForemanTasksRoutes.test.js +0 -16
- data/webpack/ForemanTasks/Routes/__snapshots__/ForemanTasksRouter.test.js.snap +0 -16
- data/webpack/ForemanTasks/Routes/__snapshots__/ForemanTasksRoutes.test.js.snap +0 -37
- data/webpack/ForemanTasks/__snapshots__/ForemanTasks.test.js.snap +0 -7
- data/webpack/ForemanTasks/index.js +0 -1
- data/webpack/__mocks__/foremanReact/common/I18n.js +0 -7
- data/webpack/__mocks__/foremanReact/common/helpers.js +0 -6
- data/webpack/__mocks__/foremanReact/common/urlHelpers.js +0 -1
- data/webpack/__mocks__/foremanReact/components/Layout/LayoutActions.js +0 -2
- data/webpack/__mocks__/foremanReact/components/Pagination/index.js +0 -2
- data/webpack/__mocks__/foremanReact/components/ToastsList/index.js +0 -8
- data/webpack/__mocks__/foremanReact/components/common/ActionButtons/ActionButtons.js +0 -3
- data/webpack/__mocks__/foremanReact/components/common/MessageBox.js +0 -4
- data/webpack/__mocks__/foremanReact/components/common/dates/LongDateTime.js +0 -5
- data/webpack/__mocks__/foremanReact/components/common/dates/RelativeDateTime.js +0 -3
- data/webpack/__mocks__/foremanReact/components/common/table/actionsHelpers/actionTypeCreator.js +0 -7
- data/webpack/__mocks__/foremanReact/components/common/table.js +0 -5
- data/webpack/__mocks__/foremanReact/constants.js +0 -24
- data/webpack/__mocks__/foremanReact/redux/API/APISelectors.js +0 -10
- data/webpack/__mocks__/foremanReact/redux/API/index.js +0 -10
- data/webpack/__mocks__/foremanReact/redux/middlewares/IntervalMiddleware.js +0 -5
- data/webpack/__mocks__/foremanReact/routes/common/PageLayout/PageLayout.js +0 -10
- data/webpack/__mocks__/foremanReact/routes/common/PageLayout/components/ExportButton/ExportButton.js +0 -5
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"locale_data": {
|
|
4
4
|
"foreman_tasks": {
|
|
5
5
|
"": {
|
|
6
|
-
"Project-Id-Version": "foreman-tasks
|
|
6
|
+
"Project-Id-Version": "foreman-tasks 12.0.0",
|
|
7
7
|
"Report-Msgid-Bugs-To": "",
|
|
8
8
|
"PO-Revision-Date": "2016-02-12 14:04+0000",
|
|
9
9
|
"Last-Translator": "FULL NAME <EMAIL@ADDRESS>",
|
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
"%(older)s Older %(time)s": [
|
|
24
24
|
"%(older)s 较老 %(time)s"
|
|
25
25
|
],
|
|
26
|
-
"%s Selected Tasks": [
|
|
27
|
-
"%s 选择的任务"
|
|
28
|
-
],
|
|
29
26
|
"%s is not valid format of cron line": [
|
|
30
27
|
"%s 不是正确的 cron 行"
|
|
31
28
|
],
|
|
@@ -63,13 +60,13 @@
|
|
|
63
60
|
"操作"
|
|
64
61
|
],
|
|
65
62
|
"Action with sub plans": [
|
|
66
|
-
""
|
|
63
|
+
"有子计划的操作"
|
|
67
64
|
],
|
|
68
65
|
"Active": [
|
|
69
66
|
"活跃"
|
|
70
67
|
],
|
|
71
|
-
"Active Filters
|
|
72
|
-
"
|
|
68
|
+
"Active Filters": [
|
|
69
|
+
""
|
|
73
70
|
],
|
|
74
71
|
"Active or disabled recurring logic with purpose %s already exists": [
|
|
75
72
|
"带有目的 %s 的活跃或禁用的周期性逻辑已存在"
|
|
@@ -98,6 +95,9 @@
|
|
|
98
95
|
"Backtrace": [
|
|
99
96
|
"回溯"
|
|
100
97
|
],
|
|
98
|
+
"Blocks": [
|
|
99
|
+
""
|
|
100
|
+
],
|
|
101
101
|
"Bulk action": [
|
|
102
102
|
"批量操作"
|
|
103
103
|
],
|
|
@@ -107,6 +107,12 @@
|
|
|
107
107
|
"Cancel Selected": [
|
|
108
108
|
"取消选择"
|
|
109
109
|
],
|
|
110
|
+
"Cancel Selected Tasks": [
|
|
111
|
+
""
|
|
112
|
+
],
|
|
113
|
+
"Cancel Task": [
|
|
114
|
+
""
|
|
115
|
+
],
|
|
110
116
|
"Cancel enforced: the task might be still running on the proxy": [
|
|
111
117
|
"强制取消:任务可能仍在代理服务器上运行"
|
|
112
118
|
],
|
|
@@ -116,9 +122,6 @@
|
|
|
116
122
|
"Cancel selected cancellable tasks": [
|
|
117
123
|
"取消所选的可取消的任务"
|
|
118
124
|
],
|
|
119
|
-
"Cancel selected tasks": [
|
|
120
|
-
"取消选择的任务"
|
|
121
|
-
],
|
|
122
125
|
"Cancel specific tasks by ID": [
|
|
123
126
|
"根据 ID 取消特定任务"
|
|
124
127
|
],
|
|
@@ -152,9 +155,6 @@
|
|
|
152
155
|
"Check for long running tasks": [
|
|
153
156
|
"检查长时间运行的任务"
|
|
154
157
|
],
|
|
155
|
-
"Clear All Filters": [
|
|
156
|
-
"清除所有过滤器"
|
|
157
|
-
],
|
|
158
158
|
"Clear Cancelled": [
|
|
159
159
|
"清除取消"
|
|
160
160
|
],
|
|
@@ -197,6 +197,12 @@
|
|
|
197
197
|
"Deliver notifications about long running tasks": [
|
|
198
198
|
"提供有关长时间运行的任务的通知"
|
|
199
199
|
],
|
|
200
|
+
"Dependencies": [
|
|
201
|
+
""
|
|
202
|
+
],
|
|
203
|
+
"Depends on": [
|
|
204
|
+
""
|
|
205
|
+
],
|
|
200
206
|
"Details": [
|
|
201
207
|
"详情"
|
|
202
208
|
],
|
|
@@ -275,12 +281,15 @@
|
|
|
275
281
|
"Force Cancel Selected": [
|
|
276
282
|
"强制取消选择"
|
|
277
283
|
],
|
|
278
|
-
"Force Cancel selected tasks": [
|
|
279
|
-
"强制取消选择的任务"
|
|
280
|
-
],
|
|
281
284
|
"Force Unlock": [
|
|
282
285
|
"强制解除锁定"
|
|
283
286
|
],
|
|
287
|
+
"Force Unlock Selected Tasks": [
|
|
288
|
+
""
|
|
289
|
+
],
|
|
290
|
+
"Force Unlock Task": [
|
|
291
|
+
""
|
|
292
|
+
],
|
|
284
293
|
"Foreman Tasks": [
|
|
285
294
|
"Foreman 任务"
|
|
286
295
|
],
|
|
@@ -315,7 +324,7 @@
|
|
|
315
324
|
"输入"
|
|
316
325
|
],
|
|
317
326
|
"Invalid URL": [
|
|
318
|
-
""
|
|
327
|
+
"无效 URL"
|
|
319
328
|
],
|
|
320
329
|
"Iteration limit": [
|
|
321
330
|
"重述限制"
|
|
@@ -395,6 +404,9 @@
|
|
|
395
404
|
"No. of Tasks": [
|
|
396
405
|
"任务号"
|
|
397
406
|
],
|
|
407
|
+
"None": [
|
|
408
|
+
""
|
|
409
|
+
],
|
|
398
410
|
"Not all the selected tasks can be cancelled": [
|
|
399
411
|
"并非所有选定的任务都可以取消"
|
|
400
412
|
],
|
|
@@ -518,12 +530,15 @@
|
|
|
518
530
|
"Resume Selected": [
|
|
519
531
|
"恢复选择"
|
|
520
532
|
],
|
|
533
|
+
"Resume Selected Tasks": [
|
|
534
|
+
""
|
|
535
|
+
],
|
|
536
|
+
"Resume Task": [
|
|
537
|
+
""
|
|
538
|
+
],
|
|
521
539
|
"Resume all paused error tasks": [
|
|
522
540
|
"恢复所有暂停的错误任务"
|
|
523
541
|
],
|
|
524
|
-
"Resume selected tasks": [
|
|
525
|
-
"恢复选择的任务"
|
|
526
|
-
],
|
|
527
542
|
"Resume specific tasks by ID": [
|
|
528
543
|
"根据 ID 恢复特定任务"
|
|
529
544
|
],
|
|
@@ -557,9 +572,6 @@
|
|
|
557
572
|
"See %{link} for more details on how to resolve the issue": [
|
|
558
573
|
"有关如何解决此问题的更多详细信息,请参见%{link}"
|
|
559
574
|
],
|
|
560
|
-
"Select Action": [
|
|
561
|
-
"选择操作"
|
|
562
|
-
],
|
|
563
575
|
"Select all {count} tasks": [
|
|
564
576
|
"选择所有 {count} 任务"
|
|
565
577
|
],
|
|
@@ -617,6 +629,9 @@
|
|
|
617
629
|
"Stopped": [
|
|
618
630
|
"停止"
|
|
619
631
|
],
|
|
632
|
+
"Stopped tasks by result": [
|
|
633
|
+
""
|
|
634
|
+
],
|
|
620
635
|
"Sub tasks": [
|
|
621
636
|
"子任务"
|
|
622
637
|
],
|
|
@@ -650,6 +665,9 @@
|
|
|
650
665
|
"Task count": [
|
|
651
666
|
"任务计数"
|
|
652
667
|
],
|
|
668
|
+
"Task dependencies": [
|
|
669
|
+
""
|
|
670
|
+
],
|
|
653
671
|
"Task group common": [
|
|
654
672
|
"任务组一般事项"
|
|
655
673
|
],
|
|
@@ -701,8 +719,26 @@
|
|
|
701
719
|
"This action will delete all cancelled recurring logics. Please note that this action can't be reversed.": [
|
|
702
720
|
"此操作将删除所有取消的重复逻辑。请注意,此操作无法撤消。"
|
|
703
721
|
],
|
|
704
|
-
"This
|
|
705
|
-
"
|
|
722
|
+
"This task may have dependencies on other tasks or may be blocking other tasks from executing. Dependencies are established through task chaining relationships.": [
|
|
723
|
+
""
|
|
724
|
+
],
|
|
725
|
+
"This will cancel %(number)s task(s), putting them in the stopped state. Are you sure?": [
|
|
726
|
+
""
|
|
727
|
+
],
|
|
728
|
+
"This will cancel task \\\\\\\"%(taskName)s\\\\\\\", putting it in the stopped state. Are you sure?": [
|
|
729
|
+
""
|
|
730
|
+
],
|
|
731
|
+
"This will force unlock %(number)s task(s). This may cause harm and should be used with caution. Are you sure?": [
|
|
732
|
+
""
|
|
733
|
+
],
|
|
734
|
+
"This will force unlock task \\\\\\\"%(taskName)s\\\\\\\". This may cause harm and should be used with caution. Are you sure?": [
|
|
735
|
+
""
|
|
736
|
+
],
|
|
737
|
+
"This will resume %(number)s task(s), putting them in the running state. Are you sure?": [
|
|
738
|
+
""
|
|
739
|
+
],
|
|
740
|
+
"This will resume task \\\\\\\"%(taskName)s\\\\\\\", putting it in the running state. Are you sure?": [
|
|
741
|
+
""
|
|
706
742
|
],
|
|
707
743
|
"This will unlock the resources that the task is running against. Please note that this might lead to inconsistent state and should be used with caution, after making sure that the task can't be resumed.": [
|
|
708
744
|
"这将解锁任务正在针对其运行的资源。请注意,这可能会导致状态不一致,应该谨慎使用,然后再确保任务无法恢复。"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"locale_data": {
|
|
4
4
|
"foreman_tasks": {
|
|
5
5
|
"": {
|
|
6
|
-
"Project-Id-Version": "foreman-tasks
|
|
6
|
+
"Project-Id-Version": "foreman-tasks 12.0.0",
|
|
7
7
|
"Report-Msgid-Bugs-To": "",
|
|
8
8
|
"PO-Revision-Date": "2016-02-12 14:04+0000",
|
|
9
9
|
"Last-Translator": "FULL NAME <EMAIL@ADDRESS>",
|
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
"%(older)s Older %(time)s": [
|
|
24
24
|
""
|
|
25
25
|
],
|
|
26
|
-
"%s Selected Tasks": [
|
|
27
|
-
""
|
|
28
|
-
],
|
|
29
26
|
"%s is not valid format of cron line": [
|
|
30
27
|
"%s 不是 cron 行的正確格式"
|
|
31
28
|
],
|
|
@@ -68,7 +65,7 @@
|
|
|
68
65
|
"Active": [
|
|
69
66
|
"啟用中"
|
|
70
67
|
],
|
|
71
|
-
"Active Filters
|
|
68
|
+
"Active Filters": [
|
|
72
69
|
""
|
|
73
70
|
],
|
|
74
71
|
"Active or disabled recurring logic with purpose %s already exists": [
|
|
@@ -98,6 +95,9 @@
|
|
|
98
95
|
"Backtrace": [
|
|
99
96
|
"追蹤"
|
|
100
97
|
],
|
|
98
|
+
"Blocks": [
|
|
99
|
+
""
|
|
100
|
+
],
|
|
101
101
|
"Bulk action": [
|
|
102
102
|
"批次動作"
|
|
103
103
|
],
|
|
@@ -107,6 +107,12 @@
|
|
|
107
107
|
"Cancel Selected": [
|
|
108
108
|
""
|
|
109
109
|
],
|
|
110
|
+
"Cancel Selected Tasks": [
|
|
111
|
+
""
|
|
112
|
+
],
|
|
113
|
+
"Cancel Task": [
|
|
114
|
+
""
|
|
115
|
+
],
|
|
110
116
|
"Cancel enforced: the task might be still running on the proxy": [
|
|
111
117
|
"強制取消:任務可能還在代理伺服器上執行"
|
|
112
118
|
],
|
|
@@ -116,9 +122,6 @@
|
|
|
116
122
|
"Cancel selected cancellable tasks": [
|
|
117
123
|
""
|
|
118
124
|
],
|
|
119
|
-
"Cancel selected tasks": [
|
|
120
|
-
""
|
|
121
|
-
],
|
|
122
125
|
"Cancel specific tasks by ID": [
|
|
123
126
|
""
|
|
124
127
|
],
|
|
@@ -152,9 +155,6 @@
|
|
|
152
155
|
"Check for long running tasks": [
|
|
153
156
|
""
|
|
154
157
|
],
|
|
155
|
-
"Clear All Filters": [
|
|
156
|
-
""
|
|
157
|
-
],
|
|
158
158
|
"Clear Cancelled": [
|
|
159
159
|
""
|
|
160
160
|
],
|
|
@@ -197,6 +197,12 @@
|
|
|
197
197
|
"Deliver notifications about long running tasks": [
|
|
198
198
|
""
|
|
199
199
|
],
|
|
200
|
+
"Dependencies": [
|
|
201
|
+
""
|
|
202
|
+
],
|
|
203
|
+
"Depends on": [
|
|
204
|
+
""
|
|
205
|
+
],
|
|
200
206
|
"Details": [
|
|
201
207
|
"詳細資訊"
|
|
202
208
|
],
|
|
@@ -275,12 +281,15 @@
|
|
|
275
281
|
"Force Cancel Selected": [
|
|
276
282
|
""
|
|
277
283
|
],
|
|
278
|
-
"Force Cancel selected tasks": [
|
|
279
|
-
""
|
|
280
|
-
],
|
|
281
284
|
"Force Unlock": [
|
|
282
285
|
"強制解除鎖定"
|
|
283
286
|
],
|
|
287
|
+
"Force Unlock Selected Tasks": [
|
|
288
|
+
""
|
|
289
|
+
],
|
|
290
|
+
"Force Unlock Task": [
|
|
291
|
+
""
|
|
292
|
+
],
|
|
284
293
|
"Foreman Tasks": [
|
|
285
294
|
""
|
|
286
295
|
],
|
|
@@ -395,6 +404,9 @@
|
|
|
395
404
|
"No. of Tasks": [
|
|
396
405
|
"任務編號"
|
|
397
406
|
],
|
|
407
|
+
"None": [
|
|
408
|
+
""
|
|
409
|
+
],
|
|
398
410
|
"Not all the selected tasks can be cancelled": [
|
|
399
411
|
""
|
|
400
412
|
],
|
|
@@ -518,12 +530,15 @@
|
|
|
518
530
|
"Resume Selected": [
|
|
519
531
|
""
|
|
520
532
|
],
|
|
521
|
-
"Resume
|
|
522
|
-
"
|
|
533
|
+
"Resume Selected Tasks": [
|
|
534
|
+
""
|
|
523
535
|
],
|
|
524
|
-
"Resume
|
|
536
|
+
"Resume Task": [
|
|
525
537
|
""
|
|
526
538
|
],
|
|
539
|
+
"Resume all paused error tasks": [
|
|
540
|
+
"繼續所有處於暫停狀態的錯誤任務"
|
|
541
|
+
],
|
|
527
542
|
"Resume specific tasks by ID": [
|
|
528
543
|
"透過 ID 繼續特定任務"
|
|
529
544
|
],
|
|
@@ -557,9 +572,6 @@
|
|
|
557
572
|
"See %{link} for more details on how to resolve the issue": [
|
|
558
573
|
""
|
|
559
574
|
],
|
|
560
|
-
"Select Action": [
|
|
561
|
-
"選擇動作"
|
|
562
|
-
],
|
|
563
575
|
"Select all {count} tasks": [
|
|
564
576
|
""
|
|
565
577
|
],
|
|
@@ -617,6 +629,9 @@
|
|
|
617
629
|
"Stopped": [
|
|
618
630
|
""
|
|
619
631
|
],
|
|
632
|
+
"Stopped tasks by result": [
|
|
633
|
+
""
|
|
634
|
+
],
|
|
620
635
|
"Sub tasks": [
|
|
621
636
|
"子任務"
|
|
622
637
|
],
|
|
@@ -650,6 +665,9 @@
|
|
|
650
665
|
"Task count": [
|
|
651
666
|
"工作數量"
|
|
652
667
|
],
|
|
668
|
+
"Task dependencies": [
|
|
669
|
+
""
|
|
670
|
+
],
|
|
653
671
|
"Task group common": [
|
|
654
672
|
"任務群組的一般事項"
|
|
655
673
|
],
|
|
@@ -702,7 +720,25 @@
|
|
|
702
720
|
"This action will delete all cancelled recurring logics. Please note that this action can't be reversed.": [
|
|
703
721
|
""
|
|
704
722
|
],
|
|
705
|
-
"This
|
|
723
|
+
"This task may have dependencies on other tasks or may be blocking other tasks from executing. Dependencies are established through task chaining relationships.": [
|
|
724
|
+
""
|
|
725
|
+
],
|
|
726
|
+
"This will cancel %(number)s task(s), putting them in the stopped state. Are you sure?": [
|
|
727
|
+
""
|
|
728
|
+
],
|
|
729
|
+
"This will cancel task \\\\\\\"%(taskName)s\\\\\\\", putting it in the stopped state. Are you sure?": [
|
|
730
|
+
""
|
|
731
|
+
],
|
|
732
|
+
"This will force unlock %(number)s task(s). This may cause harm and should be used with caution. Are you sure?": [
|
|
733
|
+
""
|
|
734
|
+
],
|
|
735
|
+
"This will force unlock task \\\\\\\"%(taskName)s\\\\\\\". This may cause harm and should be used with caution. Are you sure?": [
|
|
736
|
+
""
|
|
737
|
+
],
|
|
738
|
+
"This will resume %(number)s task(s), putting them in the running state. Are you sure?": [
|
|
739
|
+
""
|
|
740
|
+
],
|
|
741
|
+
"This will resume task \\\\\\\"%(taskName)s\\\\\\\", putting it in the running state. Are you sure?": [
|
|
706
742
|
""
|
|
707
743
|
],
|
|
708
744
|
"This will unlock the resources that the task is running against. Please note that this might lead to inconsistent state and should be used with caution, after making sure that the task can't be resumed.": [
|
|
@@ -179,24 +179,12 @@ module ForemanTasks
|
|
|
179
179
|
param :parent_task_id, :identifier, desc: 'UUID of the task'
|
|
180
180
|
param_group :search_and_pagination, ::Api::V2::BaseController
|
|
181
181
|
def index
|
|
182
|
-
if params[:sort_by] || params[:sort_order]
|
|
183
|
-
Foreman::Deprecation.api_deprecation_warning(
|
|
184
|
-
"The sort params sort_by and sort_order are deprecated.
|
|
185
|
-
Please use the order param instead as one string 'order=started_at desc'"
|
|
186
|
-
)
|
|
187
|
-
|
|
188
|
-
ordering_params = {
|
|
189
|
-
sort_by: params[:sort_by] || 'started_at',
|
|
190
|
-
sort_order: params[:sort_order] || 'DESC',
|
|
191
|
-
}
|
|
192
|
-
params[:order] = "#{ordering_params[:sort_by]} #{ordering_params[:sort_order]}"
|
|
193
|
-
end
|
|
194
182
|
params[:order] ||= 'started_at DESC'
|
|
195
|
-
@tasks = resource_scope_for_index
|
|
183
|
+
@tasks = resource_scope_for_index
|
|
196
184
|
end
|
|
197
185
|
|
|
198
186
|
def search_options
|
|
199
|
-
[search_query, {}]
|
|
187
|
+
[search_query, { :order => params[:order] }]
|
|
200
188
|
end
|
|
201
189
|
|
|
202
190
|
def_param_group :callback_target do
|
|
@@ -320,19 +308,16 @@ module ForemanTasks
|
|
|
320
308
|
end
|
|
321
309
|
|
|
322
310
|
def find_task
|
|
323
|
-
@task = resource_scope.
|
|
311
|
+
@task = resource_scope.select_duration.find(params[:id])
|
|
324
312
|
end
|
|
325
313
|
|
|
326
314
|
def resource_scope(_options = {})
|
|
327
315
|
scope = ForemanTasks::Task.authorized("#{action_permission}_foreman_tasks")
|
|
328
316
|
scope = scope.where(:parent_task_id => params[:parent_task_id]) if params[:parent_task_id]
|
|
317
|
+
scope = scope.select_duration if params[:action] == 'index'
|
|
329
318
|
scope
|
|
330
319
|
end
|
|
331
320
|
|
|
332
|
-
def resource_scope_for_index(*args)
|
|
333
|
-
super.with_duration.distinct
|
|
334
|
-
end
|
|
335
|
-
|
|
336
321
|
def controller_permission
|
|
337
322
|
'foreman_tasks'
|
|
338
323
|
end
|
|
@@ -4,7 +4,7 @@ module ForemanTasks
|
|
|
4
4
|
include Foreman::Controller::CsvResponder
|
|
5
5
|
include ForemanTasks::FindTasksCommon
|
|
6
6
|
|
|
7
|
-
before_action :find_dynflow_task, only: [:unlock, :force_unlock, :cancel, :cancel_step, :resume]
|
|
7
|
+
before_action :find_dynflow_task, only: [:unlock, :force_unlock, :cancel, :abort, :cancel_step, :resume]
|
|
8
8
|
|
|
9
9
|
def show
|
|
10
10
|
@task = resource_base.find(params[:id])
|
|
@@ -51,11 +51,10 @@ module ForemanTasks
|
|
|
51
51
|
|
|
52
52
|
def abort
|
|
53
53
|
if @dynflow_task.abort
|
|
54
|
-
|
|
54
|
+
render json: { statusText: 'OK' }
|
|
55
55
|
else
|
|
56
|
-
|
|
56
|
+
render json: {}, status: :bad_request
|
|
57
57
|
end
|
|
58
|
-
redirect_back(:fallback_location => foreman_tasks_task_path(@dynflow_task))
|
|
59
58
|
end
|
|
60
59
|
|
|
61
60
|
def resume
|
|
@@ -98,7 +97,7 @@ module ForemanTasks
|
|
|
98
97
|
private
|
|
99
98
|
|
|
100
99
|
def respond_with_tasks(scope)
|
|
101
|
-
@tasks = filter(scope, paginate: false).
|
|
100
|
+
@tasks = filter(scope, paginate: false).select_duration
|
|
102
101
|
csv_response(@tasks, [:id, :action, :state, :result, 'started_at.in_time_zone', 'ended_at.in_time_zone', :duration, :username], ['Id', 'Action', 'State', 'Result', 'Started At', 'Ended At', 'Duration', 'User'])
|
|
103
102
|
end
|
|
104
103
|
|
|
@@ -13,12 +13,6 @@ module Actions
|
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
# @see Lock.lock!
|
|
17
|
-
def lock!(resource, *_lock_names)
|
|
18
|
-
Foreman::Deprecation.deprecation_warning('2.4', 'locking in foreman-tasks was reworked, please use a combination of exclusive_lock! and link! instead.')
|
|
19
|
-
exclusive_lock!(resource)
|
|
20
|
-
end
|
|
21
|
-
|
|
22
16
|
# @see Lock.link!
|
|
23
17
|
def link!(resource)
|
|
24
18
|
phase! Dynflow::Action::Plan
|
|
@@ -12,26 +12,20 @@ module Actions
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def run(*args)
|
|
15
|
-
|
|
15
|
+
restore_current_user { pass(*args) }
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
def finalize
|
|
19
|
-
|
|
20
|
-
saved_id = action.input[:current_user_id]
|
|
21
|
-
if User.current && saved_id && current_id != saved_id
|
|
22
|
-
Foreman::Deprecation.deprecation_warning('2.5', 'relying on per-step setting of current user in finalize phase')
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
restore_curent_user { pass }
|
|
19
|
+
restore_current_user { pass }
|
|
26
20
|
end
|
|
27
21
|
|
|
28
22
|
def finalize_phase(execution_plan, *args)
|
|
29
|
-
|
|
23
|
+
restore_current_user(execution_plan.entry_action) { pass(execution_plan, *args) }
|
|
30
24
|
end
|
|
31
25
|
|
|
32
26
|
# Run all execution plan lifecycle hooks as the original user
|
|
33
27
|
def hook(*args)
|
|
34
|
-
|
|
28
|
+
restore_current_user { pass(*args) }
|
|
35
29
|
end
|
|
36
30
|
|
|
37
31
|
private
|
|
@@ -40,7 +34,7 @@ module Actions
|
|
|
40
34
|
if User.current || action.input[:current_user_id].nil?
|
|
41
35
|
yield
|
|
42
36
|
else
|
|
43
|
-
|
|
37
|
+
restore_current_user { yield }
|
|
44
38
|
end
|
|
45
39
|
end
|
|
46
40
|
|
|
@@ -48,7 +42,7 @@ module Actions
|
|
|
48
42
|
action.input[:current_user_id] = User.current.try(:id)
|
|
49
43
|
end
|
|
50
44
|
|
|
51
|
-
def
|
|
45
|
+
def restore_current_user(action = self.action)
|
|
52
46
|
old_user = User.current
|
|
53
47
|
User.current = User.unscoped.find(action.input[:current_user_id]) if action.input[:current_user_id].present?
|
|
54
48
|
yield
|
|
@@ -78,7 +78,7 @@ module ForemanTasks
|
|
|
78
78
|
:"foreman_tasks_links.resource_type" => resource.class.name)
|
|
79
79
|
end)
|
|
80
80
|
scope :for_action_types, (->(action_types) { where('foreman_tasks_tasks.label IN (?)', Array(action_types)) })
|
|
81
|
-
|
|
81
|
+
virtual_column_scope :select_duration, -> { select("foreman_tasks_tasks.*, coalesce(ended_at, current_timestamp) - coalesce(coalesce(started_at, ended_at), current_timestamp) as duration") }
|
|
82
82
|
|
|
83
83
|
apipie :class, "A class representing #{model_name.human} object" do
|
|
84
84
|
name 'Task'
|
|
@@ -3,6 +3,9 @@ object @task if @task
|
|
|
3
3
|
extends 'api/v2/layouts/permissions'
|
|
4
4
|
|
|
5
5
|
attributes :id, :label, :pending, :action
|
|
6
|
-
attributes :username, :started_at, :ended_at, :
|
|
6
|
+
attributes :username, :started_at, :ended_at, :state, :result, :progress
|
|
7
|
+
|
|
8
|
+
# A workaround for https://github.com/ruby/json/issues/957
|
|
9
|
+
node(:duration) { |t| t.duration&.in_seconds&.to_s if t.respond_to?(:duration) }
|
|
7
10
|
attributes :input, :output, :humanized, :cli_example, :start_at
|
|
8
11
|
node(:available_actions) { |t| { cancellable: t.execution_plan&.cancellable?, resumable: t.resumable? } }
|
data/config/routes.rb
CHANGED
|
@@ -34,9 +34,9 @@ Foreman::Application.routes.draw do
|
|
|
34
34
|
end
|
|
35
35
|
resources :tasks, :only => [:index], constraints: ->(req) { req.format == :csv }
|
|
36
36
|
|
|
37
|
-
match '/tasks'
|
|
38
|
-
match '/tasks/:id/sub_tasks'
|
|
39
|
-
match '/ex_tasks/:id'
|
|
37
|
+
match '/tasks', to: '/react#index', via: :get
|
|
38
|
+
match '/tasks/:id/sub_tasks', to: '/react#index', via: :get
|
|
39
|
+
match '/ex_tasks/:id', to: '/react#index', via: :get
|
|
40
40
|
|
|
41
41
|
namespace :api do
|
|
42
42
|
resources :recurring_logics, :only => [:index, :show, :update] do
|
data/foreman-tasks.gemspec
CHANGED
|
@@ -23,10 +23,12 @@ same resource. It also optionally provides Dynflow infrastructure for using it f
|
|
|
23
23
|
file.end_with?("test.rake") || file == '.packit.yaml'
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
+
s.required_ruby_version = '>= 3.0', '< 4'
|
|
27
|
+
|
|
26
28
|
s.test_files = `git ls-files test`.split("\n")
|
|
27
29
|
s.extra_rdoc_files = Dir['README*', 'LICENSE']
|
|
28
30
|
|
|
29
|
-
s.add_dependency "dynflow", '>=
|
|
31
|
+
s.add_dependency "dynflow", '>= 2.0.0'
|
|
30
32
|
s.add_dependency 'fugit', '~> 1.8'
|
|
31
33
|
s.add_dependency "get_process_mem" # for memory polling
|
|
32
34
|
s.add_dependency "sinatra" # for Dynflow web console
|
data/lib/foreman_tasks/engine.rb
CHANGED
|
@@ -21,6 +21,7 @@ module ForemanTasks
|
|
|
21
21
|
|
|
22
22
|
Foreman::Plugin.register :"foreman-tasks" do
|
|
23
23
|
requires_foreman '>= 3.19'
|
|
24
|
+
register_global_js_file 'global'
|
|
24
25
|
divider :top_menu, :parent => :monitor_menu, :last => true, :caption => N_('Foreman Tasks')
|
|
25
26
|
menu :top_menu, :tasks,
|
|
26
27
|
:url_hash => { :controller => 'foreman_tasks/tasks', :action => :index },
|
|
@@ -36,7 +37,6 @@ module ForemanTasks
|
|
|
36
37
|
|
|
37
38
|
security_block :foreman_tasks do |_map|
|
|
38
39
|
permission :view_foreman_tasks, { :'foreman_tasks/tasks' => [:auto_complete_search, :sub_tasks, :index, :summary, :summary_sub_tasks, :show],
|
|
39
|
-
:'foreman_tasks/react' => [:index],
|
|
40
40
|
:'foreman_tasks/api/tasks' => [:bulk_search, :show, :index, :summary, :summary_sub_tasks, :details, :sub_tasks] }, :resource_type => 'ForemanTasks::Task'
|
|
41
41
|
permission :edit_foreman_tasks, { :'foreman_tasks/tasks' => [:resume, :unlock, :force_unlock, :cancel_step, :cancel, :abort],
|
|
42
42
|
:'foreman_tasks/api/tasks' => [:bulk_resume, :bulk_cancel, :bulk_stop] }, :resource_type => 'ForemanTasks::Task'
|
|
@@ -324,7 +324,7 @@ namespace :foreman_tasks do
|
|
|
324
324
|
format = ENV['TASK_FORMAT'] || 'html'
|
|
325
325
|
export_filename = ENV['TASK_FILE'] || generate_filename(format)
|
|
326
326
|
|
|
327
|
-
task_scope = ForemanTasks::Task.search_for(filter).
|
|
327
|
+
task_scope = ForemanTasks::Task.search_for(filter).select_duration.order(:started_at => :desc)
|
|
328
328
|
id_scope = task_scope.group(:id, :started_at)
|
|
329
329
|
|
|
330
330
|
puts _("Exporting all tasks matching filter #{filter}")
|
|
Binary file
|