foreman-tasks 2.0.0 → 3.0.2
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/js_tests.yml +31 -0
- data/.github/workflows/ruby_tests.yml +74 -0
- data/.rubocop.yml +12 -4
- data/.rubocop_todo.yml +32 -25
- data/Gemfile +5 -0
- data/app/controllers/foreman_tasks/api/tasks_controller.rb +36 -60
- data/app/controllers/foreman_tasks/concerns/parameters/triggering.rb +1 -1
- data/app/controllers/foreman_tasks/recurring_logics_controller.rb +7 -0
- data/app/controllers/foreman_tasks/tasks_controller.rb +6 -3
- data/app/helpers/foreman_tasks/foreman_tasks_helper.rb +3 -3
- data/app/lib/actions/proxy_action.rb +1 -1
- data/app/models/foreman_tasks/recurring_logic.rb +1 -1
- data/app/models/foreman_tasks/task.rb +11 -0
- data/app/models/foreman_tasks/task/dynflow_task.rb +29 -33
- data/app/models/foreman_tasks/task/status_explicator.rb +1 -1
- data/app/models/foreman_tasks/triggering.rb +1 -1
- data/app/models/setting/foreman_tasks.rb +9 -9
- data/app/services/foreman_tasks/dashboard_table_filter.rb +5 -1
- data/app/views/foreman_tasks/api/tasks/index.json.rabl +2 -0
- data/app/views/foreman_tasks/api/tasks/show.json.rabl +2 -0
- data/app/views/foreman_tasks/layouts/react.html.erb +1 -2
- data/app/views/foreman_tasks/recurring_logics/index.html.erb +3 -1
- data/app/views/foreman_tasks/tasks/show.html.erb +1 -6
- data/config/routes.rb +2 -1
- data/db/migrate/20200517215015_rename_bookmarks_controller.rb +2 -2
- data/db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb +9 -0
- data/db/seeds.d/30-notification_blueprints.rb +7 -7
- data/db/seeds.d/61-foreman_tasks_bookmarks.rb +1 -1
- data/foreman-tasks.gemspec +1 -0
- data/lib/foreman_tasks/cleaner.rb +4 -6
- data/lib/foreman_tasks/dynflow/configuration.rb +1 -1
- data/lib/foreman_tasks/dynflow/persistence.rb +4 -6
- data/lib/foreman_tasks/engine.rb +2 -7
- data/lib/foreman_tasks/tasks/cleanup.rake +2 -2
- data/lib/foreman_tasks/tasks/dynflow.rake +6 -0
- data/lib/foreman_tasks/tasks/export_tasks.rake +1 -1
- data/lib/foreman_tasks/version.rb +1 -1
- data/locale/en/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/en/foreman_tasks.po +50 -20
- data/locale/foreman_tasks.pot +173 -126
- data/locale/fr/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/fr/foreman_tasks.po +817 -0
- data/locale/ja/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/ja/foreman_tasks.po +817 -0
- data/locale/zh_CN/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/zh_CN/foreman_tasks.po +816 -0
- data/package.json +1 -1
- data/script/npm_link_foreman_js.sh +26 -0
- data/test/controllers/api/recurring_logics_controller_test.rb +1 -1
- data/test/controllers/api/tasks_controller_test.rb +17 -7
- data/test/controllers/tasks_controller_test.rb +6 -6
- data/test/core/unit/runner_test.rb +20 -20
- data/test/core/unit/task_launcher_test.rb +8 -8
- data/test/helpers/foreman_tasks/foreman_tasks_helper_test.rb +7 -7
- data/test/helpers/foreman_tasks/tasks_helper_test.rb +3 -3
- data/test/lib/actions/middleware/keep_current_request_id_test.rb +3 -3
- data/test/support/history_tasks_builder.rb +1 -1
- data/test/tasks/generate_task_actions_test.rb +1 -1
- data/test/unit/actions/action_with_sub_plans_test.rb +2 -2
- data/test/unit/actions/bulk_action_test.rb +6 -6
- data/test/unit/actions/proxy_action_test.rb +20 -20
- data/test/unit/actions/recurring_action_test.rb +30 -32
- data/test/unit/cleaner_test.rb +24 -24
- data/test/unit/dashboard_table_filter_test.rb +5 -5
- data/test/unit/otp_manager_test.rb +2 -2
- data/test/unit/proxy_selector_test.rb +9 -9
- data/test/unit/recurring_logic_test.rb +32 -32
- data/test/unit/remote_task_test.rb +2 -2
- data/test/unit/task_groups_test.rb +4 -4
- data/test/unit/task_test.rb +18 -18
- data/test/unit/triggering_test.rb +8 -8
- data/test/unit/troubleshooting_help_generator_test.rb +6 -6
- data/test/unit/ui_notifications_test.rb +11 -11
- data/webpack/ForemanTasks/Components/TaskActions/TaskAction.test.js +2 -2
- data/webpack/ForemanTasks/Components/TaskActions/index.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/Components/RunningSteps.js +17 -3
- data/webpack/ForemanTasks/Components/TaskDetails/Components/Task.js +8 -153
- data/webpack/ForemanTasks/Components/TaskDetails/Components/TaskButtons.js +168 -0
- data/webpack/ForemanTasks/Components/TaskDetails/Components/TaskInfo.js +6 -7
- data/webpack/ForemanTasks/Components/TaskDetails/Components/TaskSkeleton.js +48 -0
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/RunningSteps.test.js +8 -1
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Task.test.js +13 -70
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/TaskButtons.test.js +95 -0
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/RunningSteps.test.js.snap +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/Task.test.js.snap +78 -208
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/TaskButtons.test.js.snap +212 -0
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/TaskInfo.test.js.snap +8 -4
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetails.js +100 -53
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetails.scss +13 -14
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsActions.js +57 -95
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsConstants.js +3 -12
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsSelectors.js +57 -28
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetails.fixtures.js +8 -0
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetails.test.js +8 -1
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetailsActions.test.js +6 -6
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/__snapshots__/TaskDetails.test.js.snap +84 -12
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/__snapshots__/TaskDetailsActions.test.js.snap +25 -21
- data/webpack/ForemanTasks/Components/TaskDetails/index.js +8 -3
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/ScheduledTasksCard/ScheduledTasksCard.scss +4 -0
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/OtherInfo.js +53 -0
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/OtherInfo.test.js +14 -0
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.js +27 -19
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.scss +14 -0
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.test.js +1 -34
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/{StoppedTasksCardHelper.js → StoppedTasksCardTable.js} +28 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js +54 -0
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/OtherInfo.test.js.snap +48 -0
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/StoppedTasksCard.test.js.snap +60 -1367
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/StoppedTasksCardTable.test.js.snap +960 -0
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/__snapshots__/TasksCardsGrid.test.js.snap +14 -11
- data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboardActions.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboardConstants.js +2 -0
- data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboardSelectors.js +17 -11
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardActions.test.js +2 -2
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardSelectors.test.js +26 -14
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboard.test.js.snap +14 -11
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardSelectors.test.js.snap +38 -22
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/ConfirmModalSelectors.js +1 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModalSelectors.test.js +1 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/__snapshots__/ConfirmModalSelectors.test.js.snap +2 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksBulkActions.js +25 -8
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableActions.js +3 -3
- data/webpack/ForemanTasks/Components/TasksTable/TasksTablePage.js +6 -3
- data/webpack/ForemanTasks/Components/TasksTable/TasksTablePage.scss +0 -10
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableSelectors.js +1 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksBulkActions.test.js +15 -2
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.fixtures.js +1 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTablePage.test.js +2 -1
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/SubTasksPage.test.js.snap +1 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksBulkActions.test.js.snap +48 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksIndexPage.test.js.snap +1 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTablePage.test.js.snap +39 -7
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/__snapshots__/actionCellFormatter.test.js.snap +1 -0
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/__snapshots__/selectionCellFormatter.test.js.snap +2 -0
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/actionCellFormatter.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/formatters/__test__/selectionCellFormatter.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/formatters/actionCellFormatter.js +10 -7
- data/webpack/ForemanTasks/Components/TasksTable/formatters/selectionCellFormatter.js +7 -0
- data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.js +39 -31
- data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js +17 -8
- data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ActionButton.test.js.snap +8 -0
- data/webpack/ForemanTasks/Components/common/urlHelpers.js +7 -0
- data/webpack/ForemanTasks/ForemanTasksReducers.js +0 -2
- data/webpack/__mocks__/foremanReact/common/helpers.js +2 -0
- data/webpack/__mocks__/foremanReact/redux/API/APISelectors.js +10 -0
- data/webpack/__mocks__/foremanReact/redux/API/index.js +10 -0
- data/webpack/__mocks__/foremanReact/redux/middlewares/IntervalMiddleware.js +5 -0
- metadata +35 -17
- data/.travis.yml +0 -5
- data/app/assets/stylesheets/foreman_tasks/tasks.scss +0 -9
- data/script/travis_run_js_tests.sh +0 -7
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsReducer.js +0 -38
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetailsReducer.test.js +0 -33
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/__snapshots__/TaskDetailsReducer.test.js.snap +0 -26
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/__snapshots__/integration.test.js.snap +0 -122
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/integration.test.js +0 -67
- data/webpack/__mocks__/foremanReact/API.js +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Task rendering render with
|
|
3
|
+
exports[`Task rendering render with minimal Props 1`] = `
|
|
4
4
|
<Fragment>
|
|
5
5
|
<UnlockModal
|
|
6
6
|
id="unlockModal"
|
|
@@ -20,138 +20,60 @@ exports[`Task rendering render with some Props 1`] = `
|
|
|
20
20
|
bsClass="row"
|
|
21
21
|
componentClass="div"
|
|
22
22
|
>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
href="/foreman_tasks/dynflow/"
|
|
52
|
-
>
|
|
53
|
-
Dynflow console
|
|
54
|
-
</Button>
|
|
55
|
-
<Button
|
|
56
|
-
active={false}
|
|
57
|
-
block={false}
|
|
58
|
-
bsClass="btn"
|
|
59
|
-
bsSize="small"
|
|
60
|
-
bsStyle="default"
|
|
61
|
-
className="resume-button"
|
|
62
|
-
disabled={true}
|
|
63
|
-
onClick={[Function]}
|
|
64
|
-
>
|
|
65
|
-
Resume
|
|
66
|
-
</Button>
|
|
67
|
-
<Button
|
|
68
|
-
active={false}
|
|
69
|
-
block={false}
|
|
70
|
-
bsClass="btn"
|
|
71
|
-
bsSize="small"
|
|
72
|
-
bsStyle="default"
|
|
73
|
-
className="cancel-button"
|
|
74
|
-
disabled={true}
|
|
75
|
-
onClick={[Function]}
|
|
76
|
-
>
|
|
77
|
-
Cancel
|
|
78
|
-
</Button>
|
|
79
|
-
<Button
|
|
80
|
-
active={false}
|
|
81
|
-
block={false}
|
|
82
|
-
bsClass="btn"
|
|
83
|
-
bsSize="small"
|
|
84
|
-
bsStyle="default"
|
|
85
|
-
className="parent-button"
|
|
86
|
-
disabled={false}
|
|
87
|
-
href="/foreman_tasks/tasks/parent-id"
|
|
88
|
-
>
|
|
89
|
-
Parent task
|
|
90
|
-
</Button>
|
|
91
|
-
<Button
|
|
92
|
-
active={false}
|
|
93
|
-
block={false}
|
|
94
|
-
bsClass="btn"
|
|
95
|
-
bsSize="small"
|
|
96
|
-
bsStyle="default"
|
|
97
|
-
className="subtask-button"
|
|
98
|
-
disabled={false}
|
|
99
|
-
href="/foreman_tasks/tasks/test/sub_tasks"
|
|
100
|
-
>
|
|
101
|
-
Sub tasks
|
|
102
|
-
</Button>
|
|
103
|
-
<Button
|
|
104
|
-
active={false}
|
|
105
|
-
block={false}
|
|
106
|
-
bsClass="btn"
|
|
107
|
-
bsSize="small"
|
|
108
|
-
bsStyle="default"
|
|
109
|
-
className="unlock-button"
|
|
110
|
-
disabled={false}
|
|
111
|
-
onClick={[MockFunction]}
|
|
112
|
-
>
|
|
113
|
-
Unlock
|
|
114
|
-
</Button>
|
|
115
|
-
<Button
|
|
116
|
-
active={false}
|
|
117
|
-
block={false}
|
|
118
|
-
bsClass="btn"
|
|
119
|
-
bsSize="small"
|
|
120
|
-
bsStyle="default"
|
|
121
|
-
className="force-unlock-button"
|
|
122
|
-
disabled={false}
|
|
123
|
-
onClick={[MockFunction]}
|
|
124
|
-
>
|
|
125
|
-
Force Unlock
|
|
126
|
-
</Button>
|
|
127
|
-
</Col>
|
|
23
|
+
<TaskButtons
|
|
24
|
+
action=""
|
|
25
|
+
canEdit={false}
|
|
26
|
+
cancelTaskRequest={[Function]}
|
|
27
|
+
cancellable={false}
|
|
28
|
+
dynflowEnableConsole={false}
|
|
29
|
+
endedAt=""
|
|
30
|
+
errors={Array []}
|
|
31
|
+
externalId=""
|
|
32
|
+
hasSubTasks={false}
|
|
33
|
+
help=""
|
|
34
|
+
id="test"
|
|
35
|
+
output=""
|
|
36
|
+
parentTask=""
|
|
37
|
+
progress={0}
|
|
38
|
+
result="error"
|
|
39
|
+
resumable={false}
|
|
40
|
+
resumeTaskRequest={[Function]}
|
|
41
|
+
startAt=""
|
|
42
|
+
startBefore=""
|
|
43
|
+
startedAt=""
|
|
44
|
+
state=""
|
|
45
|
+
taskProgressToggle={[MockFunction]}
|
|
46
|
+
taskReload={false}
|
|
47
|
+
taskReloadStart={[MockFunction]}
|
|
48
|
+
username=""
|
|
49
|
+
usernamePath=""
|
|
50
|
+
/>
|
|
128
51
|
</Row>
|
|
129
52
|
<TaskInfo
|
|
130
53
|
action=""
|
|
54
|
+
canEdit={false}
|
|
131
55
|
cancelTaskRequest={[Function]}
|
|
132
56
|
cancellable={false}
|
|
133
|
-
dynflowEnableConsole={
|
|
57
|
+
dynflowEnableConsole={false}
|
|
134
58
|
endedAt=""
|
|
135
|
-
|
|
59
|
+
errors={Array []}
|
|
136
60
|
externalId=""
|
|
137
|
-
hasSubTasks={
|
|
61
|
+
hasSubTasks={false}
|
|
138
62
|
help=""
|
|
139
63
|
id="test"
|
|
140
64
|
output=""
|
|
141
|
-
parentTask="
|
|
65
|
+
parentTask=""
|
|
142
66
|
progress={0}
|
|
143
|
-
refetchTaskDetails={[Function]}
|
|
144
67
|
result="error"
|
|
145
68
|
resumable={false}
|
|
146
69
|
resumeTaskRequest={[Function]}
|
|
147
70
|
startAt=""
|
|
148
71
|
startBefore=""
|
|
149
72
|
startedAt=""
|
|
150
|
-
state="
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
timeoutId={null}
|
|
73
|
+
state=""
|
|
74
|
+
taskProgressToggle={[MockFunction]}
|
|
75
|
+
taskReload={false}
|
|
76
|
+
taskReloadStart={[MockFunction]}
|
|
155
77
|
username=""
|
|
156
78
|
usernamePath=""
|
|
157
79
|
/>
|
|
@@ -159,7 +81,7 @@ exports[`Task rendering render with some Props 1`] = `
|
|
|
159
81
|
</Fragment>
|
|
160
82
|
`;
|
|
161
83
|
|
|
162
|
-
exports[`Task rendering render
|
|
84
|
+
exports[`Task rendering render with some Props 1`] = `
|
|
163
85
|
<Fragment>
|
|
164
86
|
<UnlockModal
|
|
165
87
|
id="unlockModal"
|
|
@@ -179,114 +101,62 @@ exports[`Task rendering render without Props 1`] = `
|
|
|
179
101
|
bsClass="row"
|
|
180
102
|
componentClass="div"
|
|
181
103
|
>
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
>
|
|
212
|
-
Dynflow console
|
|
213
|
-
</Button>
|
|
214
|
-
<Button
|
|
215
|
-
active={false}
|
|
216
|
-
block={false}
|
|
217
|
-
bsClass="btn"
|
|
218
|
-
bsSize="small"
|
|
219
|
-
bsStyle="default"
|
|
220
|
-
className="resume-button"
|
|
221
|
-
disabled={true}
|
|
222
|
-
onClick={[Function]}
|
|
223
|
-
>
|
|
224
|
-
Resume
|
|
225
|
-
</Button>
|
|
226
|
-
<Button
|
|
227
|
-
active={false}
|
|
228
|
-
block={false}
|
|
229
|
-
bsClass="btn"
|
|
230
|
-
bsSize="small"
|
|
231
|
-
bsStyle="default"
|
|
232
|
-
className="cancel-button"
|
|
233
|
-
disabled={true}
|
|
234
|
-
onClick={[Function]}
|
|
235
|
-
>
|
|
236
|
-
Cancel
|
|
237
|
-
</Button>
|
|
238
|
-
<Button
|
|
239
|
-
active={false}
|
|
240
|
-
block={false}
|
|
241
|
-
bsClass="btn"
|
|
242
|
-
bsSize="small"
|
|
243
|
-
bsStyle="default"
|
|
244
|
-
className="unlock-button"
|
|
245
|
-
disabled={true}
|
|
246
|
-
onClick={[MockFunction]}
|
|
247
|
-
>
|
|
248
|
-
Unlock
|
|
249
|
-
</Button>
|
|
250
|
-
<Button
|
|
251
|
-
active={false}
|
|
252
|
-
block={false}
|
|
253
|
-
bsClass="btn"
|
|
254
|
-
bsSize="small"
|
|
255
|
-
bsStyle="default"
|
|
256
|
-
className="force-unlock-button"
|
|
257
|
-
disabled={false}
|
|
258
|
-
onClick={[MockFunction]}
|
|
259
|
-
>
|
|
260
|
-
Force Unlock
|
|
261
|
-
</Button>
|
|
262
|
-
</Col>
|
|
104
|
+
<TaskButtons
|
|
105
|
+
action=""
|
|
106
|
+
canEdit={true}
|
|
107
|
+
cancelTaskRequest={[Function]}
|
|
108
|
+
cancellable={false}
|
|
109
|
+
dynflowEnableConsole={true}
|
|
110
|
+
endedAt=""
|
|
111
|
+
errors={Array []}
|
|
112
|
+
externalId=""
|
|
113
|
+
hasSubTasks={true}
|
|
114
|
+
help=""
|
|
115
|
+
id="test"
|
|
116
|
+
output=""
|
|
117
|
+
parentTask="parent-id"
|
|
118
|
+
progress={0}
|
|
119
|
+
result="error"
|
|
120
|
+
resumable={false}
|
|
121
|
+
resumeTaskRequest={[Function]}
|
|
122
|
+
startAt=""
|
|
123
|
+
startBefore=""
|
|
124
|
+
startedAt=""
|
|
125
|
+
state="paused"
|
|
126
|
+
status="RESOLVED"
|
|
127
|
+
taskProgressToggle={[MockFunction]}
|
|
128
|
+
taskReload={true}
|
|
129
|
+
taskReloadStart={[MockFunction]}
|
|
130
|
+
username=""
|
|
131
|
+
usernamePath=""
|
|
132
|
+
/>
|
|
263
133
|
</Row>
|
|
264
134
|
<TaskInfo
|
|
265
135
|
action=""
|
|
136
|
+
canEdit={true}
|
|
266
137
|
cancelTaskRequest={[Function]}
|
|
267
138
|
cancellable={false}
|
|
268
|
-
dynflowEnableConsole={
|
|
139
|
+
dynflowEnableConsole={true}
|
|
269
140
|
endedAt=""
|
|
270
|
-
|
|
141
|
+
errors={Array []}
|
|
271
142
|
externalId=""
|
|
272
|
-
hasSubTasks={
|
|
143
|
+
hasSubTasks={true}
|
|
273
144
|
help=""
|
|
274
145
|
id="test"
|
|
275
146
|
output=""
|
|
276
|
-
parentTask=""
|
|
147
|
+
parentTask="parent-id"
|
|
277
148
|
progress={0}
|
|
278
|
-
refetchTaskDetails={[Function]}
|
|
279
149
|
result="error"
|
|
280
150
|
resumable={false}
|
|
281
151
|
resumeTaskRequest={[Function]}
|
|
282
152
|
startAt=""
|
|
283
153
|
startBefore=""
|
|
284
154
|
startedAt=""
|
|
285
|
-
state=""
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
155
|
+
state="paused"
|
|
156
|
+
status="RESOLVED"
|
|
157
|
+
taskProgressToggle={[MockFunction]}
|
|
158
|
+
taskReload={true}
|
|
159
|
+
taskReloadStart={[MockFunction]}
|
|
290
160
|
username=""
|
|
291
161
|
usernamePath=""
|
|
292
162
|
/>
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Task rendering render with minimal Props 1`] = `
|
|
4
|
+
<Col
|
|
5
|
+
bsClass="col"
|
|
6
|
+
componentClass="div"
|
|
7
|
+
xs={12}
|
|
8
|
+
>
|
|
9
|
+
<Button
|
|
10
|
+
active={false}
|
|
11
|
+
block={false}
|
|
12
|
+
bsClass="btn"
|
|
13
|
+
bsSize="small"
|
|
14
|
+
bsStyle="default"
|
|
15
|
+
className="reload-button"
|
|
16
|
+
disabled={false}
|
|
17
|
+
onClick={[MockFunction]}
|
|
18
|
+
>
|
|
19
|
+
<span
|
|
20
|
+
className="glyphicon glyphicon-refresh "
|
|
21
|
+
/>
|
|
22
|
+
Start auto-reloading
|
|
23
|
+
</Button>
|
|
24
|
+
<Button
|
|
25
|
+
active={false}
|
|
26
|
+
block={false}
|
|
27
|
+
bsClass="btn"
|
|
28
|
+
bsSize="small"
|
|
29
|
+
bsStyle="default"
|
|
30
|
+
className="dynflow-button"
|
|
31
|
+
disabled={true}
|
|
32
|
+
href="/foreman_tasks/dynflow/"
|
|
33
|
+
rel="noopener noreferrer"
|
|
34
|
+
target="_blank"
|
|
35
|
+
>
|
|
36
|
+
<span
|
|
37
|
+
data-original-title="dynflow_enable_console Setting is off"
|
|
38
|
+
title="dynflow_enable_console Setting is off"
|
|
39
|
+
>
|
|
40
|
+
Dynflow console
|
|
41
|
+
</span>
|
|
42
|
+
</Button>
|
|
43
|
+
<Button
|
|
44
|
+
active={false}
|
|
45
|
+
block={false}
|
|
46
|
+
bsClass="btn"
|
|
47
|
+
bsSize="small"
|
|
48
|
+
bsStyle="default"
|
|
49
|
+
className="resume-button"
|
|
50
|
+
data-original-title="You do not have permission"
|
|
51
|
+
disabled={true}
|
|
52
|
+
onClick={[Function]}
|
|
53
|
+
title="You do not have permission"
|
|
54
|
+
>
|
|
55
|
+
Resume
|
|
56
|
+
</Button>
|
|
57
|
+
<Button
|
|
58
|
+
active={false}
|
|
59
|
+
block={false}
|
|
60
|
+
bsClass="btn"
|
|
61
|
+
bsSize="small"
|
|
62
|
+
bsStyle="default"
|
|
63
|
+
className="cancel-button"
|
|
64
|
+
data-original-title="You do not have permission"
|
|
65
|
+
disabled={true}
|
|
66
|
+
onClick={[Function]}
|
|
67
|
+
title="You do not have permission"
|
|
68
|
+
>
|
|
69
|
+
Cancel
|
|
70
|
+
</Button>
|
|
71
|
+
<Button
|
|
72
|
+
active={false}
|
|
73
|
+
block={false}
|
|
74
|
+
bsClass="btn"
|
|
75
|
+
bsSize="small"
|
|
76
|
+
bsStyle="default"
|
|
77
|
+
className="unlock-button"
|
|
78
|
+
data-original-title="You do not have permission"
|
|
79
|
+
disabled={true}
|
|
80
|
+
onClick={[MockFunction]}
|
|
81
|
+
title="You do not have permission"
|
|
82
|
+
>
|
|
83
|
+
Unlock
|
|
84
|
+
</Button>
|
|
85
|
+
<Button
|
|
86
|
+
active={false}
|
|
87
|
+
block={false}
|
|
88
|
+
bsClass="btn"
|
|
89
|
+
bsSize="small"
|
|
90
|
+
bsStyle="default"
|
|
91
|
+
className="force-unlock-button"
|
|
92
|
+
data-original-title="You do not have permission"
|
|
93
|
+
disabled={true}
|
|
94
|
+
onClick={[MockFunction]}
|
|
95
|
+
title="You do not have permission"
|
|
96
|
+
>
|
|
97
|
+
Force Unlock
|
|
98
|
+
</Button>
|
|
99
|
+
</Col>
|
|
100
|
+
`;
|
|
101
|
+
|
|
102
|
+
exports[`Task rendering render with some Props 1`] = `
|
|
103
|
+
<Col
|
|
104
|
+
bsClass="col"
|
|
105
|
+
componentClass="div"
|
|
106
|
+
xs={12}
|
|
107
|
+
>
|
|
108
|
+
<Button
|
|
109
|
+
active={false}
|
|
110
|
+
block={false}
|
|
111
|
+
bsClass="btn"
|
|
112
|
+
bsSize="small"
|
|
113
|
+
bsStyle="default"
|
|
114
|
+
className="reload-button"
|
|
115
|
+
disabled={false}
|
|
116
|
+
onClick={[MockFunction]}
|
|
117
|
+
>
|
|
118
|
+
<span
|
|
119
|
+
className="glyphicon glyphicon-refresh spin"
|
|
120
|
+
/>
|
|
121
|
+
Stop auto-reloading
|
|
122
|
+
</Button>
|
|
123
|
+
<Button
|
|
124
|
+
active={false}
|
|
125
|
+
block={false}
|
|
126
|
+
bsClass="btn"
|
|
127
|
+
bsSize="small"
|
|
128
|
+
bsStyle="default"
|
|
129
|
+
className="dynflow-button"
|
|
130
|
+
disabled={false}
|
|
131
|
+
href="/foreman_tasks/dynflow/"
|
|
132
|
+
rel="noopener noreferrer"
|
|
133
|
+
target="_blank"
|
|
134
|
+
>
|
|
135
|
+
<span>
|
|
136
|
+
Dynflow console
|
|
137
|
+
</span>
|
|
138
|
+
</Button>
|
|
139
|
+
<Button
|
|
140
|
+
active={false}
|
|
141
|
+
block={false}
|
|
142
|
+
bsClass="btn"
|
|
143
|
+
bsSize="small"
|
|
144
|
+
bsStyle="default"
|
|
145
|
+
className="resume-button"
|
|
146
|
+
disabled={true}
|
|
147
|
+
onClick={[Function]}
|
|
148
|
+
>
|
|
149
|
+
Resume
|
|
150
|
+
</Button>
|
|
151
|
+
<Button
|
|
152
|
+
active={false}
|
|
153
|
+
block={false}
|
|
154
|
+
bsClass="btn"
|
|
155
|
+
bsSize="small"
|
|
156
|
+
bsStyle="default"
|
|
157
|
+
className="cancel-button"
|
|
158
|
+
disabled={true}
|
|
159
|
+
onClick={[Function]}
|
|
160
|
+
>
|
|
161
|
+
Cancel
|
|
162
|
+
</Button>
|
|
163
|
+
<Button
|
|
164
|
+
active={false}
|
|
165
|
+
block={false}
|
|
166
|
+
bsClass="btn"
|
|
167
|
+
bsSize="small"
|
|
168
|
+
bsStyle="default"
|
|
169
|
+
className="parent-button"
|
|
170
|
+
disabled={false}
|
|
171
|
+
href="/foreman_tasks/tasks/parent-id"
|
|
172
|
+
>
|
|
173
|
+
Parent task
|
|
174
|
+
</Button>
|
|
175
|
+
<Button
|
|
176
|
+
active={false}
|
|
177
|
+
block={false}
|
|
178
|
+
bsClass="btn"
|
|
179
|
+
bsSize="small"
|
|
180
|
+
bsStyle="default"
|
|
181
|
+
className="subtask-button"
|
|
182
|
+
disabled={false}
|
|
183
|
+
href="/foreman_tasks/tasks/test/sub_tasks"
|
|
184
|
+
>
|
|
185
|
+
Sub tasks
|
|
186
|
+
</Button>
|
|
187
|
+
<Button
|
|
188
|
+
active={false}
|
|
189
|
+
block={false}
|
|
190
|
+
bsClass="btn"
|
|
191
|
+
bsSize="small"
|
|
192
|
+
bsStyle="default"
|
|
193
|
+
className="unlock-button"
|
|
194
|
+
disabled={false}
|
|
195
|
+
onClick={[MockFunction]}
|
|
196
|
+
>
|
|
197
|
+
Unlock
|
|
198
|
+
</Button>
|
|
199
|
+
<Button
|
|
200
|
+
active={false}
|
|
201
|
+
block={false}
|
|
202
|
+
bsClass="btn"
|
|
203
|
+
bsSize="small"
|
|
204
|
+
bsStyle="default"
|
|
205
|
+
className="force-unlock-button"
|
|
206
|
+
disabled={false}
|
|
207
|
+
onClick={[MockFunction]}
|
|
208
|
+
>
|
|
209
|
+
Force Unlock
|
|
210
|
+
</Button>
|
|
211
|
+
</Col>
|
|
212
|
+
`;
|