foreman-tasks 1.1.3 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/js_tests.yml +27 -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/README.md +2 -0
- data/app/controllers/foreman_tasks/api/tasks_controller.rb +63 -58
- 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 +9 -14
- 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 +15 -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 +2 -2
- data/app/services/ui_notifications/tasks/task_bulk_stop.rb +36 -0
- data/app/views/foreman_tasks/api/tasks/details.json.rabl +0 -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/recurring_logics/index.html.erb +3 -1
- data/config/routes.rb +3 -1
- data/db/migrate/20200517215015_rename_bookmarks_controller.rb +35 -0
- data/db/migrate/20200519093217_drop_dynflow_allow_dangerous_actions_setting.foreman_tasks.rb +5 -0
- data/db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb +1 -1
- data/db/seeds.d/30-notification_blueprints.rb +14 -7
- data/db/seeds.d/61-foreman_tasks_bookmarks.rb +1 -1
- 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 +3 -8
- data/lib/foreman_tasks/version.rb +1 -1
- data/locale/action_names.rb +1 -1
- data/locale/en/LC_MESSAGES/foreman_tasks.mo +0 -0
- data/locale/en/foreman_tasks.po +270 -54
- data/locale/foreman_tasks.pot +630 -292
- 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 +7 -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 +60 -0
- data/webpack/ForemanTasks/Components/{TasksTable/TasksTableActionHelpers.js → TaskActions/TaskActionHelpers.js} +21 -6
- data/webpack/ForemanTasks/Components/{TasksTable/__tests__/TasksTableActionHelpers.test.js → TaskActions/TaskActionHelpers.test.js} +2 -2
- data/webpack/ForemanTasks/Components/TaskActions/TaskActionsConstants.js +16 -0
- data/webpack/ForemanTasks/Components/TaskActions/UnlockModals.js +60 -0
- data/webpack/ForemanTasks/Components/TaskActions/UnlockModals.test.js +14 -0
- data/webpack/ForemanTasks/Components/TaskActions/__snapshots__/TaskAction.test.js.snap +233 -0
- data/webpack/ForemanTasks/Components/TaskActions/__snapshots__/UnlockModals.test.js.snap +25 -0
- data/webpack/ForemanTasks/Components/TaskActions/index.js +115 -0
- data/webpack/ForemanTasks/Components/TaskDetails/Components/RunningSteps.js +17 -3
- data/webpack/ForemanTasks/Components/TaskDetails/Components/Task.js +38 -205
- 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 +14 -7
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/TaskButtons.test.js +95 -0
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/TaskInfo.test.js +0 -1
- 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 +90 -189
- 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 +3 -14
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsActions.js +57 -110
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsConstants.js +3 -17
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsSelectors.js +57 -37
- data/webpack/ForemanTasks/Components/TaskDetails/TasksDetailsHelper.js +6 -1
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetails.fixtures.js +8 -0
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetails.test.js +13 -1
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetailsActions.test.js +6 -6
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/__snapshots__/TaskDetails.test.js.snap +86 -19
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/__snapshots__/TaskDetailsActions.test.js.snap +25 -21
- data/webpack/ForemanTasks/Components/TaskDetails/index.js +12 -11
- data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboardActions.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardActions.test.js +2 -2
- data/webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js +14 -1
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/ConfirmModal.js +83 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/ConfirmModalActions.js +106 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/ConfirmModalReducer.js +38 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/ConfirmModalSelectors.js +46 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModal.test.js +36 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModalActions.test.js +205 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModalReducer.test.js +27 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModalSelectors.test.js +55 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/__snapshots__/ConfirmModal.test.js.snap +41 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/__snapshots__/ConfirmModalReducer.test.js.snap +19 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/__snapshots__/ConfirmModalSelectors.test.js.snap +32 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/index.js +29 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ActionSelectButton.test.js +1 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ActionSelectButton.test.js.snap +11 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksBulkActions.js +135 -35
- data/webpack/ForemanTasks/Components/TasksTable/TasksTable.js +13 -9
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableActions.js +26 -66
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableConstants.js +10 -12
- data/webpack/ForemanTasks/Components/TasksTable/TasksTablePage.js +30 -96
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableSchema.js +2 -2
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableSelectors.js +8 -4
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksBulkActions.test.js +50 -2
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.fixtures.js +3 -12
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableActions.test.js +22 -26
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTablePage.test.js +2 -1
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/SubTasksPage.test.js.snap +3 -14
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksBulkActions.test.js.snap +155 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksIndexPage.test.js.snap +3 -14
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTableActions.test.js.snap +17 -124
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTablePage.test.js.snap +63 -133
- 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/TasksTable/index.js +2 -2
- data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.js +55 -19
- data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js +75 -19
- data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ActionButton.test.js.snap +88 -21
- data/webpack/ForemanTasks/Components/common/ClickConfirmation/ClickConfirmation.scss +9 -0
- data/webpack/ForemanTasks/Components/common/ClickConfirmation/ClickConfirmation.test.js +44 -0
- data/webpack/ForemanTasks/Components/common/ClickConfirmation/__snapshots__/ClickConfirmation.test.js.snap +52 -0
- data/webpack/ForemanTasks/Components/common/ClickConfirmation/index.js +59 -66
- data/webpack/ForemanTasks/Components/common/{ToastTypesConstants.js → ToastsHelpers/ToastTypesConstants.js} +0 -0
- data/webpack/ForemanTasks/Components/common/ToastsHelpers/index.js +15 -0
- data/webpack/ForemanTasks/Components/common/urlHelpers.js +7 -0
- data/webpack/ForemanTasks/ForemanTasksReducers.js +2 -2
- data/webpack/ForemanTasks/Routes/ForemanTasksRoutes.test.js +2 -1
- data/webpack/__mocks__/foremanReact/common/helpers.js +2 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalHooks.js +2 -2
- data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +17 -3
- data/webpack/__mocks__/foremanReact/components/common/ActionButtons/ActionButtons.js +3 -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 +51 -28
- data/.travis.yml +0 -5
- data/script/travis_run_js_tests.sh +0 -7
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsReducer.js +0 -44
- 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 -63
- data/webpack/ForemanTasks/Components/TasksTable/Components/CancelConfirm.js +0 -53
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmationModals.js +0 -56
- data/webpack/ForemanTasks/Components/TasksTable/Components/ResumeConfirm.js +0 -52
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/CancelConfirm.test.js +0 -26
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ConfirmationModals.test.js +0 -24
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ResumeConfirm.test.js +0 -26
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/CancelConfirm.test.js.snap +0 -65
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ConfirmationModals.test.js.snap +0 -30
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ResumeConfirm.test.js.snap +0 -63
- data/webpack/ForemanTasks/Components/common/ActionButtons/CancelButton.js +0 -23
- data/webpack/ForemanTasks/Components/common/ActionButtons/CancelButton.test.js +0 -26
- data/webpack/ForemanTasks/Components/common/ActionButtons/ResumeButton.js +0 -23
- data/webpack/ForemanTasks/Components/common/ActionButtons/ResumeButton.test.js +0 -27
- data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/CancelButton.test.js.snap +0 -15
- data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ResumeButton.test.js.snap +0 -15
- data/webpack/__mocks__/foremanReact/API.js +0 -7
@@ -0,0 +1,168 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import { Col, Button } from 'patternfly-react';
|
4
|
+
import { useForemanModal } from 'foremanReact/components/ForemanModal/ForemanModalHooks';
|
5
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
6
|
+
import {
|
7
|
+
UNLOCK_MODAL,
|
8
|
+
FORCE_UNLOCK_MODAL,
|
9
|
+
} from '../../TaskActions/TaskActionsConstants';
|
10
|
+
|
11
|
+
export const TaskButtons = ({
|
12
|
+
canEdit,
|
13
|
+
dynflowEnableConsole,
|
14
|
+
taskReloadStart,
|
15
|
+
taskProgressToggle,
|
16
|
+
taskReload,
|
17
|
+
externalId,
|
18
|
+
id,
|
19
|
+
action,
|
20
|
+
state,
|
21
|
+
resumable,
|
22
|
+
cancellable,
|
23
|
+
hasSubTasks,
|
24
|
+
parentTask,
|
25
|
+
cancelTaskRequest,
|
26
|
+
resumeTaskRequest,
|
27
|
+
}) => {
|
28
|
+
const unlockModalActions = useForemanModal({
|
29
|
+
id: UNLOCK_MODAL,
|
30
|
+
});
|
31
|
+
const forceUnlockModalActions = useForemanModal({
|
32
|
+
id: FORCE_UNLOCK_MODAL,
|
33
|
+
});
|
34
|
+
const editActionsTitle = canEdit
|
35
|
+
? undefined
|
36
|
+
: __('You do not have permission');
|
37
|
+
const dynflowTitle = dynflowEnableConsole
|
38
|
+
? undefined
|
39
|
+
: `dynflow_enable_console ${__('Setting is off')}`;
|
40
|
+
|
41
|
+
return (
|
42
|
+
<Col xs={12}>
|
43
|
+
<Button
|
44
|
+
className="reload-button"
|
45
|
+
bsSize="small"
|
46
|
+
onClick={taskProgressToggle}
|
47
|
+
>
|
48
|
+
<span
|
49
|
+
className={`glyphicon glyphicon-refresh ${taskReload ? 'spin' : ''}`}
|
50
|
+
/>
|
51
|
+
{__(`${taskReload ? 'Stop' : 'Start'} auto-reloading`)}
|
52
|
+
</Button>
|
53
|
+
<Button
|
54
|
+
className="dynflow-button"
|
55
|
+
bsSize="small"
|
56
|
+
href={`/foreman_tasks/dynflow/${externalId}`}
|
57
|
+
disabled={!dynflowEnableConsole}
|
58
|
+
rel="noopener noreferrer"
|
59
|
+
target="_blank"
|
60
|
+
>
|
61
|
+
<span title={dynflowTitle} data-original-title={dynflowTitle}>
|
62
|
+
{__('Dynflow console')}
|
63
|
+
</span>
|
64
|
+
</Button>
|
65
|
+
<Button
|
66
|
+
className="resume-button"
|
67
|
+
bsSize="small"
|
68
|
+
title={editActionsTitle}
|
69
|
+
data-original-title={editActionsTitle}
|
70
|
+
disabled={!canEdit || !resumable}
|
71
|
+
onClick={() => {
|
72
|
+
if (!taskReload) {
|
73
|
+
taskReloadStart(id);
|
74
|
+
}
|
75
|
+
resumeTaskRequest(id, action);
|
76
|
+
}}
|
77
|
+
>
|
78
|
+
{__('Resume')}
|
79
|
+
</Button>
|
80
|
+
<Button
|
81
|
+
className="cancel-button"
|
82
|
+
bsSize="small"
|
83
|
+
title={editActionsTitle}
|
84
|
+
data-original-title={editActionsTitle}
|
85
|
+
disabled={!canEdit || !cancellable}
|
86
|
+
onClick={() => {
|
87
|
+
if (!taskReload) {
|
88
|
+
taskReloadStart(id);
|
89
|
+
}
|
90
|
+
cancelTaskRequest(id, action);
|
91
|
+
}}
|
92
|
+
>
|
93
|
+
{__('Cancel')}
|
94
|
+
</Button>
|
95
|
+
{parentTask && (
|
96
|
+
<Button
|
97
|
+
className="parent-button"
|
98
|
+
bsSize="small"
|
99
|
+
href={`/foreman_tasks/tasks/${parentTask}`}
|
100
|
+
>
|
101
|
+
{__('Parent task')}
|
102
|
+
</Button>
|
103
|
+
)}
|
104
|
+
{hasSubTasks && (
|
105
|
+
<Button
|
106
|
+
className="subtask-button"
|
107
|
+
bsSize="small"
|
108
|
+
href={`/foreman_tasks/tasks/${id}/sub_tasks`}
|
109
|
+
>
|
110
|
+
{__('Sub tasks')}
|
111
|
+
</Button>
|
112
|
+
)}
|
113
|
+
<Button
|
114
|
+
className="unlock-button"
|
115
|
+
bsSize="small"
|
116
|
+
disabled={!canEdit || state !== 'paused'}
|
117
|
+
onClick={unlockModalActions.setModalOpen}
|
118
|
+
title={editActionsTitle}
|
119
|
+
data-original-title={editActionsTitle}
|
120
|
+
>
|
121
|
+
{__('Unlock')}
|
122
|
+
</Button>
|
123
|
+
<Button
|
124
|
+
className="force-unlock-button"
|
125
|
+
bsSize="small"
|
126
|
+
disabled={!canEdit || state === 'stopped'}
|
127
|
+
onClick={forceUnlockModalActions.setModalOpen}
|
128
|
+
title={editActionsTitle}
|
129
|
+
data-original-title={editActionsTitle}
|
130
|
+
>
|
131
|
+
{__('Force Unlock')}
|
132
|
+
</Button>
|
133
|
+
</Col>
|
134
|
+
);
|
135
|
+
};
|
136
|
+
|
137
|
+
TaskButtons.propTypes = {
|
138
|
+
canEdit: PropTypes.bool,
|
139
|
+
dynflowEnableConsole: PropTypes.bool,
|
140
|
+
taskReloadStart: PropTypes.func.isRequired,
|
141
|
+
taskProgressToggle: PropTypes.func.isRequired,
|
142
|
+
taskReload: PropTypes.bool,
|
143
|
+
externalId: PropTypes.string,
|
144
|
+
id: PropTypes.string.isRequired,
|
145
|
+
action: PropTypes.string,
|
146
|
+
state: PropTypes.string,
|
147
|
+
resumable: PropTypes.bool,
|
148
|
+
cancellable: PropTypes.bool,
|
149
|
+
hasSubTasks: PropTypes.bool,
|
150
|
+
parentTask: PropTypes.string,
|
151
|
+
cancelTaskRequest: PropTypes.func,
|
152
|
+
resumeTaskRequest: PropTypes.func,
|
153
|
+
};
|
154
|
+
|
155
|
+
TaskButtons.defaultProps = {
|
156
|
+
canEdit: false,
|
157
|
+
dynflowEnableConsole: false,
|
158
|
+
taskReload: false,
|
159
|
+
externalId: '',
|
160
|
+
action: '',
|
161
|
+
state: '',
|
162
|
+
resumable: false,
|
163
|
+
cancellable: false,
|
164
|
+
hasSubTasks: false,
|
165
|
+
parentTask: '',
|
166
|
+
cancelTaskRequest: () => null,
|
167
|
+
resumeTaskRequest: () => null,
|
168
|
+
};
|
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import { Grid, Row, Col, ProgressBar } from 'patternfly-react';
|
4
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
5
5
|
import RelativeDateTime from 'foremanReact/components/common/dates/RelativeDateTime';
|
6
|
-
import ReactHtmlParser from 'react-html-parser';
|
7
6
|
|
8
7
|
class TaskInfo extends Component {
|
9
8
|
isDelayed = () => {
|
@@ -59,7 +58,7 @@ class TaskInfo extends Component {
|
|
59
58
|
state,
|
60
59
|
help,
|
61
60
|
output,
|
62
|
-
|
61
|
+
errors,
|
63
62
|
progress,
|
64
63
|
username,
|
65
64
|
usernamePath,
|
@@ -171,7 +170,7 @@ class TaskInfo extends Component {
|
|
171
170
|
<b>{__('Troubleshooting')}</b>
|
172
171
|
</span>
|
173
172
|
</p>
|
174
|
-
<p
|
173
|
+
<p dangerouslySetInnerHTML={{ __html: help }} />
|
175
174
|
</Col>
|
176
175
|
</Row>
|
177
176
|
)}
|
@@ -187,7 +186,7 @@ class TaskInfo extends Component {
|
|
187
186
|
</Col>
|
188
187
|
</Row>
|
189
188
|
)}
|
190
|
-
{
|
189
|
+
{errors && errors.length > 0 && (
|
191
190
|
<Row>
|
192
191
|
<Col xs={12}>
|
193
192
|
<div>
|
@@ -195,7 +194,7 @@ class TaskInfo extends Component {
|
|
195
194
|
<b>{__('Errors:')}</b>
|
196
195
|
</span>
|
197
196
|
</div>
|
198
|
-
<pre>{
|
197
|
+
<pre>{errors}</pre>
|
199
198
|
</Col>
|
200
199
|
</Row>
|
201
200
|
)}
|
@@ -213,7 +212,7 @@ TaskInfo.propTypes = {
|
|
213
212
|
startedAt: PropTypes.string,
|
214
213
|
state: PropTypes.string,
|
215
214
|
help: PropTypes.string,
|
216
|
-
|
215
|
+
errors: PropTypes.array,
|
217
216
|
progress: PropTypes.number,
|
218
217
|
username: PropTypes.string,
|
219
218
|
usernamePath: PropTypes.string,
|
@@ -232,7 +231,7 @@ TaskInfo.defaultProps = {
|
|
232
231
|
startedAt: '',
|
233
232
|
state: '',
|
234
233
|
help: '',
|
235
|
-
|
234
|
+
errors: [],
|
236
235
|
progress: 0,
|
237
236
|
username: '',
|
238
237
|
usernamePath: '',
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import Skeleton from 'react-loading-skeleton';
|
3
|
+
import { Grid, Row, Col } from 'patternfly-react';
|
4
|
+
|
5
|
+
export const TaskSkeleton = () => {
|
6
|
+
const details = [1, 2, 3, 4, 5, 6];
|
7
|
+
return (
|
8
|
+
<Grid>
|
9
|
+
<br />
|
10
|
+
<Row>
|
11
|
+
<Col>
|
12
|
+
<Skeleton />
|
13
|
+
</Col>
|
14
|
+
</Row>
|
15
|
+
{details.map((items, key) => (
|
16
|
+
<Row key={key}>
|
17
|
+
<Col md={2} sm={6}>
|
18
|
+
<Skeleton />
|
19
|
+
</Col>
|
20
|
+
<Col md={5} sm={6}>
|
21
|
+
<Skeleton />
|
22
|
+
</Col>
|
23
|
+
<Col md={2} sm={6}>
|
24
|
+
<Skeleton />
|
25
|
+
</Col>
|
26
|
+
<Col md={3} sm={6}>
|
27
|
+
<Skeleton />
|
28
|
+
</Col>
|
29
|
+
</Row>
|
30
|
+
))}
|
31
|
+
<br />
|
32
|
+
<Row>
|
33
|
+
<Col xs={6}>
|
34
|
+
<div className="progress-description">
|
35
|
+
<Skeleton />
|
36
|
+
</div>
|
37
|
+
</Col>
|
38
|
+
<Col xs={3} xsOffset={3} className="progress-label-top-right">
|
39
|
+
<Skeleton />
|
40
|
+
</Col>
|
41
|
+
<Col xs={12}>
|
42
|
+
<Skeleton />
|
43
|
+
</Col>
|
44
|
+
</Row>
|
45
|
+
<br />
|
46
|
+
</Grid>
|
47
|
+
);
|
48
|
+
};
|
@@ -2,9 +2,16 @@ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
|
|
2
2
|
|
3
3
|
import RunningSteps from '../RunningSteps';
|
4
4
|
|
5
|
+
const minProps = {
|
6
|
+
id: 'task-id1',
|
7
|
+
taskReload: true,
|
8
|
+
cancelStep: jest.fn(),
|
9
|
+
taskReloadStart: jest.fn(),
|
10
|
+
};
|
5
11
|
const fixtures = {
|
6
|
-
'render
|
12
|
+
'render with min Props': minProps,
|
7
13
|
'render with Props': {
|
14
|
+
...minProps,
|
8
15
|
executionPlan: {
|
9
16
|
state: 'paused',
|
10
17
|
cancellable: false,
|
@@ -1,19 +1,26 @@
|
|
1
1
|
import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
|
2
|
-
|
2
|
+
import { STATUS } from 'foremanReact/constants';
|
3
3
|
import Task from '../Task';
|
4
4
|
|
5
5
|
const fixtures = {
|
6
|
-
'render
|
6
|
+
'render with minimal Props': {
|
7
|
+
id: 'test',
|
8
|
+
taskReloadStart: jest.fn(),
|
9
|
+
taskProgressToggle: jest.fn(),
|
10
|
+
},
|
7
11
|
'render with some Props': {
|
8
12
|
id: 'test',
|
9
13
|
state: 'paused',
|
10
14
|
hasSubTasks: true,
|
11
|
-
allowDangerousActions: true,
|
12
15
|
dynflowEnableConsole: true,
|
16
|
+
parentTask: 'parent-id',
|
17
|
+
taskReload: true,
|
18
|
+
canEdit: true,
|
19
|
+
status: STATUS.RESOLVED,
|
20
|
+
taskProgressToggle: jest.fn(),
|
21
|
+
taskReloadStart: jest.fn(),
|
13
22
|
},
|
14
23
|
};
|
15
24
|
|
16
|
-
describe('Task', () =>
|
17
|
-
|
18
|
-
testComponentSnapshotsWithFixtures(Task, fixtures));
|
19
|
-
});
|
25
|
+
describe('Task rendering', () =>
|
26
|
+
testComponentSnapshotsWithFixtures(Task, fixtures));
|
@@ -0,0 +1,95 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import {
|
3
|
+
testComponentSnapshotsWithFixtures,
|
4
|
+
mount,
|
5
|
+
shallow,
|
6
|
+
} from '@theforeman/test';
|
7
|
+
import { useForemanModal } from 'foremanReact/components/ForemanModal/ForemanModalHooks';
|
8
|
+
import { STATUS } from 'foremanReact/constants';
|
9
|
+
import { TaskButtons } from '../TaskButtons';
|
10
|
+
import {
|
11
|
+
UNLOCK_MODAL,
|
12
|
+
FORCE_UNLOCK_MODAL,
|
13
|
+
} from '../../../TaskActions/TaskActionsConstants';
|
14
|
+
|
15
|
+
const fixtures = {
|
16
|
+
'render with minimal Props': {
|
17
|
+
id: 'test',
|
18
|
+
taskReloadStart: jest.fn(),
|
19
|
+
taskProgressToggle: jest.fn(),
|
20
|
+
},
|
21
|
+
'render with some Props': {
|
22
|
+
id: 'test',
|
23
|
+
state: 'paused',
|
24
|
+
hasSubTasks: true,
|
25
|
+
dynflowEnableConsole: true,
|
26
|
+
parentTask: 'parent-id',
|
27
|
+
taskReload: true,
|
28
|
+
canEdit: true,
|
29
|
+
status: STATUS.RESOLVED,
|
30
|
+
taskReloadStart: jest.fn(),
|
31
|
+
taskProgressToggle: jest.fn(),
|
32
|
+
},
|
33
|
+
};
|
34
|
+
|
35
|
+
describe('Task', () => {
|
36
|
+
describe('rendering', () =>
|
37
|
+
testComponentSnapshotsWithFixtures(TaskButtons, fixtures));
|
38
|
+
describe('click test', () => {
|
39
|
+
const setModalOpen = jest.fn();
|
40
|
+
useForemanModal.mockImplementation(id => ({
|
41
|
+
setModalOpen: () => setModalOpen(id),
|
42
|
+
}));
|
43
|
+
const cancelTaskRequest = jest.fn();
|
44
|
+
const resumeTaskRequest = jest.fn();
|
45
|
+
const taskProgressToggle = jest.fn();
|
46
|
+
const taskReloadStart = jest.fn();
|
47
|
+
const id = 'some-id';
|
48
|
+
const action = 'some-action';
|
49
|
+
const props = {
|
50
|
+
taskReload: false,
|
51
|
+
id,
|
52
|
+
action,
|
53
|
+
cancelTaskRequest,
|
54
|
+
resumeTaskRequest,
|
55
|
+
taskProgressToggle,
|
56
|
+
taskReloadStart,
|
57
|
+
status: STATUS.RESOLVED,
|
58
|
+
};
|
59
|
+
afterEach(() => {
|
60
|
+
jest.clearAllMocks();
|
61
|
+
});
|
62
|
+
it('reload', () => {
|
63
|
+
const component = mount(<TaskButtons {...props} />);
|
64
|
+
const reloadButton = component.find('.reload-button').at(0);
|
65
|
+
reloadButton.simulate('click');
|
66
|
+
expect(taskProgressToggle).toBeCalled();
|
67
|
+
});
|
68
|
+
it('resume', () => {
|
69
|
+
const component = shallow(<TaskButtons {...props} />);
|
70
|
+
const resumeButton = component.find('.resume-button').at(0);
|
71
|
+
resumeButton.props().onClick();
|
72
|
+
expect(taskReloadStart).toBeCalled();
|
73
|
+
expect(resumeTaskRequest).toBeCalledWith(id, action);
|
74
|
+
});
|
75
|
+
it('cancel', () => {
|
76
|
+
const component = shallow(<TaskButtons {...props} />);
|
77
|
+
const cancelButton = component.find('.cancel-button').at(0);
|
78
|
+
cancelButton.props().onClick();
|
79
|
+
expect(taskReloadStart).toBeCalled();
|
80
|
+
expect(cancelTaskRequest).toBeCalledWith(id, action);
|
81
|
+
});
|
82
|
+
it('unlock', () => {
|
83
|
+
const component = shallow(<TaskButtons {...props} />);
|
84
|
+
const unlockButton = component.find('.unlock-button').at(0);
|
85
|
+
unlockButton.props().onClick();
|
86
|
+
expect(setModalOpen).toBeCalledWith({ id: UNLOCK_MODAL });
|
87
|
+
});
|
88
|
+
it('focrce unlock', () => {
|
89
|
+
const component = shallow(<TaskButtons {...props} />);
|
90
|
+
const forceUnlockButton = component.find('.force-unlock-button').at(0);
|
91
|
+
forceUnlockButton.props().onClick();
|
92
|
+
expect(setModalOpen).toBeCalledWith({ id: FORCE_UNLOCK_MODAL });
|
93
|
+
});
|
94
|
+
});
|
95
|
+
});
|
@@ -41,7 +41,6 @@ const fixtures = {
|
|
41
41
|
help:
|
42
42
|
"A paused task represents a process that has not finished properly. Any task in paused state can lead to potential inconsistency and needs to be resolved.\nThe recommended approach is to investigate the error messages below and in 'errors' tab, address the primary cause of the issue and resume the task.",
|
43
43
|
hasSubTasks: false,
|
44
|
-
allowDangerousActions: false,
|
45
44
|
locks: [
|
46
45
|
{
|
47
46
|
name: 'task_owner',
|
@@ -1,26 +1,15 @@
|
|
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
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
confirmAction="Unlock"
|
9
|
-
confirmType="warning"
|
10
|
-
confirmationMessage="I understand that this may cause harm and have working database backups of all backend services."
|
11
|
-
path="/foreman_tasks/tasks/test/unlock"
|
12
|
-
showModal={false}
|
13
|
-
title="Unlock"
|
5
|
+
<UnlockModal
|
6
|
+
id="unlockModal"
|
7
|
+
onClick={[Function]}
|
14
8
|
/>
|
15
|
-
<
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
confirmType="danger"
|
20
|
-
confirmationMessage="I understand that this may cause harm and have working database backups of all backend services."
|
21
|
-
path="/foreman_tasks/tasks/test/force_unlock"
|
22
|
-
showModal={false}
|
23
|
-
title="Force Unlock"
|
9
|
+
<ForceUnlockModal
|
10
|
+
id="forceUnlockModal"
|
11
|
+
onClick={[Function]}
|
12
|
+
selectedRowsLen={1}
|
24
13
|
/>
|
25
14
|
<Grid
|
26
15
|
bsClass="container"
|
@@ -31,116 +20,60 @@ exports[`Task rendering render with some Props 1`] = `
|
|
31
20
|
bsClass="row"
|
32
21
|
componentClass="div"
|
33
22
|
>
|
34
|
-
<
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
href="/foreman_tasks/dynflow/"
|
63
|
-
>
|
64
|
-
Dynflow console
|
65
|
-
</Button>
|
66
|
-
<ResumeButton
|
67
|
-
disabled={true}
|
68
|
-
id="test"
|
69
|
-
name=""
|
70
|
-
onClick={[Function]}
|
71
|
-
/>
|
72
|
-
<CancelButton
|
73
|
-
disabled={true}
|
74
|
-
id="test"
|
75
|
-
name=""
|
76
|
-
onClick={[Function]}
|
77
|
-
/>
|
78
|
-
<Button
|
79
|
-
active={false}
|
80
|
-
block={false}
|
81
|
-
bsClass="btn"
|
82
|
-
bsSize="small"
|
83
|
-
bsStyle="default"
|
84
|
-
disabled={false}
|
85
|
-
href="/foreman_tasks/tasks/test/sub_tasks"
|
86
|
-
>
|
87
|
-
Sub tasks
|
88
|
-
</Button>
|
89
|
-
<Button
|
90
|
-
active={false}
|
91
|
-
block={false}
|
92
|
-
bsClass="btn"
|
93
|
-
bsSize="small"
|
94
|
-
bsStyle="default"
|
95
|
-
disabled={false}
|
96
|
-
onClick={[Function]}
|
97
|
-
>
|
98
|
-
Unlock
|
99
|
-
</Button>
|
100
|
-
<Button
|
101
|
-
active={false}
|
102
|
-
block={false}
|
103
|
-
bsClass="btn"
|
104
|
-
bsSize="small"
|
105
|
-
bsStyle="default"
|
106
|
-
disabled={false}
|
107
|
-
onClick={[Function]}
|
108
|
-
>
|
109
|
-
Force Unlock
|
110
|
-
</Button>
|
111
|
-
</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
|
+
/>
|
112
51
|
</Row>
|
113
52
|
<TaskInfo
|
114
53
|
action=""
|
115
|
-
|
54
|
+
canEdit={false}
|
116
55
|
cancelTaskRequest={[Function]}
|
117
56
|
cancellable={false}
|
118
|
-
dynflowEnableConsole={
|
57
|
+
dynflowEnableConsole={false}
|
119
58
|
endedAt=""
|
120
|
-
|
59
|
+
errors={Array []}
|
121
60
|
externalId=""
|
122
|
-
hasSubTasks={
|
61
|
+
hasSubTasks={false}
|
123
62
|
help=""
|
124
63
|
id="test"
|
125
64
|
output=""
|
126
65
|
parentTask=""
|
127
66
|
progress={0}
|
128
|
-
refetchTaskDetails={[Function]}
|
129
67
|
result="error"
|
130
68
|
resumable={false}
|
131
69
|
resumeTaskRequest={[Function]}
|
132
|
-
showForceUnlockModal={false}
|
133
|
-
showUnlockModal={false}
|
134
70
|
startAt=""
|
135
71
|
startBefore=""
|
136
72
|
startedAt=""
|
137
|
-
state="
|
73
|
+
state=""
|
74
|
+
taskProgressToggle={[MockFunction]}
|
138
75
|
taskReload={false}
|
139
|
-
taskReloadStart={[
|
140
|
-
taskReloadStop={[Function]}
|
141
|
-
timeoutId={null}
|
142
|
-
toggleForceUnlockModal={[Function]}
|
143
|
-
toggleUnlockModal={[Function]}
|
76
|
+
taskReloadStart={[MockFunction]}
|
144
77
|
username=""
|
145
78
|
usernamePath=""
|
146
79
|
/>
|
@@ -148,27 +81,16 @@ exports[`Task rendering render with some Props 1`] = `
|
|
148
81
|
</Fragment>
|
149
82
|
`;
|
150
83
|
|
151
|
-
exports[`Task rendering render
|
84
|
+
exports[`Task rendering render with some Props 1`] = `
|
152
85
|
<Fragment>
|
153
|
-
<
|
154
|
-
|
155
|
-
|
156
|
-
confirmAction="Unlock"
|
157
|
-
confirmType="warning"
|
158
|
-
confirmationMessage="I understand that this may cause harm and have working database backups of all backend services."
|
159
|
-
path="/foreman_tasks/tasks/test/unlock"
|
160
|
-
showModal={false}
|
161
|
-
title="Unlock"
|
86
|
+
<UnlockModal
|
87
|
+
id="unlockModal"
|
88
|
+
onClick={[Function]}
|
162
89
|
/>
|
163
|
-
<
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
confirmType="danger"
|
168
|
-
confirmationMessage="I understand that this may cause harm and have working database backups of all backend services."
|
169
|
-
path="/foreman_tasks/tasks/test/force_unlock"
|
170
|
-
showModal={false}
|
171
|
-
title="Force Unlock"
|
90
|
+
<ForceUnlockModal
|
91
|
+
id="forceUnlockModal"
|
92
|
+
onClick={[Function]}
|
93
|
+
selectedRowsLen={1}
|
172
94
|
/>
|
173
95
|
<Grid
|
174
96
|
bsClass="container"
|
@@ -179,83 +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
|
-
<ResumeButton
|
215
|
-
disabled={true}
|
216
|
-
id="test"
|
217
|
-
name=""
|
218
|
-
onClick={[Function]}
|
219
|
-
/>
|
220
|
-
<CancelButton
|
221
|
-
disabled={true}
|
222
|
-
id="test"
|
223
|
-
name=""
|
224
|
-
onClick={[Function]}
|
225
|
-
/>
|
226
|
-
</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
|
+
/>
|
227
133
|
</Row>
|
228
134
|
<TaskInfo
|
229
135
|
action=""
|
230
|
-
|
136
|
+
canEdit={true}
|
231
137
|
cancelTaskRequest={[Function]}
|
232
138
|
cancellable={false}
|
233
|
-
dynflowEnableConsole={
|
139
|
+
dynflowEnableConsole={true}
|
234
140
|
endedAt=""
|
235
|
-
|
141
|
+
errors={Array []}
|
236
142
|
externalId=""
|
237
|
-
hasSubTasks={
|
143
|
+
hasSubTasks={true}
|
238
144
|
help=""
|
239
145
|
id="test"
|
240
146
|
output=""
|
241
|
-
parentTask=""
|
147
|
+
parentTask="parent-id"
|
242
148
|
progress={0}
|
243
|
-
refetchTaskDetails={[Function]}
|
244
149
|
result="error"
|
245
150
|
resumable={false}
|
246
151
|
resumeTaskRequest={[Function]}
|
247
|
-
showForceUnlockModal={false}
|
248
|
-
showUnlockModal={false}
|
249
152
|
startAt=""
|
250
153
|
startBefore=""
|
251
154
|
startedAt=""
|
252
|
-
state=""
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
toggleForceUnlockModal={[Function]}
|
258
|
-
toggleUnlockModal={[Function]}
|
155
|
+
state="paused"
|
156
|
+
status="RESOLVED"
|
157
|
+
taskProgressToggle={[MockFunction]}
|
158
|
+
taskReload={true}
|
159
|
+
taskReloadStart={[MockFunction]}
|
259
160
|
username=""
|
260
161
|
usernamePath=""
|
261
162
|
/>
|