foreman-tasks 11.0.7 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/foreman_tasks/api/tasks/dependency_summary.json.rabl +4 -0
  3. data/app/views/foreman_tasks/api/tasks/details.json.rabl +20 -0
  4. data/lib/foreman_tasks/engine.rb +6 -1
  5. data/lib/foreman_tasks/triggers.rb +4 -0
  6. data/lib/foreman_tasks/version.rb +1 -1
  7. data/lib/foreman_tasks.rb +24 -0
  8. data/test/unit/chaining_test.rb +62 -0
  9. data/webpack/ForemanTasks/Components/TaskDetails/Components/Dependencies.js +93 -0
  10. data/webpack/ForemanTasks/Components/TaskDetails/Components/Task.js +7 -12
  11. data/webpack/ForemanTasks/Components/TaskDetails/Components/TaskButtons.js +40 -20
  12. data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Dependencies.test.js +92 -0
  13. data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/TaskButtons.test.js +2 -3
  14. data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/Task.test.js.snap +90 -112
  15. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetails.js +13 -1
  16. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsSelectors.js +6 -0
  17. data/webpack/ForemanTasks/Components/TaskDetails/__tests__/__snapshots__/TaskDetails.test.js.snap +19 -0
  18. data/webpack/ForemanTasks/Components/TaskDetails/index.js +4 -0
  19. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/OtherInfo.js +5 -3
  20. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/OtherInfo.test.js +58 -9
  21. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.scss +0 -30
  22. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.test.js +190 -9
  23. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.js +70 -35
  24. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksLabelsRow/TasksLabelsRow.js +9 -14
  25. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksLabelsRow/TasksLabelsRow.scss +3 -23
  26. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksLabelsRow/TasksLabelsRow.test.js +33 -26
  27. data/webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js +31 -30
  28. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ActionSelectButton.test.js +78 -11
  29. data/webpack/ForemanTasks/Components/TasksTable/TasksTablePage.js +40 -21
  30. data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTablePage.test.js.snap +64 -62
  31. metadata +6 -7
  32. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js +0 -54
  33. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/OtherInfo.test.js.snap +0 -30
  34. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/StoppedTasksCard.test.js.snap +0 -107
  35. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/StoppedTasksCardTable.test.js.snap +0 -960
  36. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksLabelsRow/__snapshots__/TasksLabelsRow.test.js.snap +0 -47
  37. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ActionSelectButton.test.js.snap +0 -43
@@ -108,38 +108,39 @@ exports[`TasksTablePage rendering render with Breadcrubs and edit permissions 1`
108
108
  searchable={true}
109
109
  toolbarButtons={
110
110
  <React.Fragment>
111
- <Button
112
- active={false}
113
- block={false}
114
- bsClass="btn"
115
- bsStyle="default"
116
- disabled={false}
117
- onClick={[Function]}
118
- >
119
- <Icon
120
- name="refresh"
121
- type="fa"
111
+ <ToolbarItem>
112
+ <Button
113
+ icon={<RedoIcon />}
114
+ onClick={[Function]}
115
+ ouiaId="tasks-table-refresh-data"
116
+ variant="primary"
117
+ >
118
+ Refresh Data
119
+ </Button>
120
+ </ToolbarItem>
121
+ <ToolbarItem>
122
+ <Spinner
123
+ size="lg"
122
124
  />
123
-
124
- Refresh Data
125
- </Button>
126
- <Spinner
127
- className=""
128
- inline={false}
129
- inverse={false}
130
- loading={true}
131
- size="md"
132
- />
133
- <ExportButton
134
- title="Export All"
135
- url="/foreman_tasks/tasks.csv?search=%28state%3Dstopped%29"
136
- />
137
- <ActionSelectButton
138
- disabled={true}
139
- onCancel={[Function]}
140
- onForceCancel={[Function]}
141
- onResume={[Function]}
142
- />
125
+ </ToolbarItem>
126
+ <ToolbarItem>
127
+ <Button
128
+ component="a"
129
+ href="/foreman_tasks/tasks.csv?search=%28state%3Dstopped%29"
130
+ ouiaId="tasks-table-export-all"
131
+ variant="secondary"
132
+ >
133
+ Export All
134
+ </Button>
135
+ </ToolbarItem>
136
+ <ToolbarItem>
137
+ <ActionSelectButton
138
+ disabled={true}
139
+ onCancel={[Function]}
140
+ onForceCancel={[Function]}
141
+ onResume={[Function]}
142
+ />
143
+ </ToolbarItem>
143
144
  </React.Fragment>
144
145
  }
145
146
  >
@@ -283,38 +284,39 @@ exports[`TasksTablePage rendering render with minimal props 1`] = `
283
284
  searchable={true}
284
285
  toolbarButtons={
285
286
  <React.Fragment>
286
- <Button
287
- active={false}
288
- block={false}
289
- bsClass="btn"
290
- bsStyle="default"
291
- disabled={false}
292
- onClick={[Function]}
293
- >
294
- <Icon
295
- name="refresh"
296
- type="fa"
287
+ <ToolbarItem>
288
+ <Button
289
+ icon={<RedoIcon />}
290
+ onClick={[Function]}
291
+ ouiaId="tasks-table-refresh-data"
292
+ variant="primary"
293
+ >
294
+ Refresh Data
295
+ </Button>
296
+ </ToolbarItem>
297
+ <ToolbarItem>
298
+ <Spinner
299
+ size="lg"
300
+ />
301
+ </ToolbarItem>
302
+ <ToolbarItem>
303
+ <Button
304
+ component="a"
305
+ href="/foreman_tasks/tasks.csv?search=%28state%3Dstopped%29"
306
+ ouiaId="tasks-table-export-all"
307
+ variant="secondary"
308
+ >
309
+ Export All
310
+ </Button>
311
+ </ToolbarItem>
312
+ <ToolbarItem>
313
+ <ActionSelectButton
314
+ disabled={true}
315
+ onCancel={[Function]}
316
+ onForceCancel={[Function]}
317
+ onResume={[Function]}
297
318
  />
298
-
299
- Refresh Data
300
- </Button>
301
- <Spinner
302
- className=""
303
- inline={false}
304
- inverse={false}
305
- loading={true}
306
- size="md"
307
- />
308
- <ExportButton
309
- title="Export All"
310
- url="/foreman_tasks/tasks.csv?search=%28state%3Dstopped%29"
311
- />
312
- <ActionSelectButton
313
- disabled={true}
314
- onCancel={[Function]}
315
- onForceCancel={[Function]}
316
- onResume={[Function]}
317
- />
319
+ </ToolbarItem>
318
320
  </React.Fragment>
319
321
  }
320
322
  >
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.0.7
4
+ version: 12.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
@@ -234,6 +234,7 @@ files:
234
234
  - app/views/foreman_tasks/api/recurring_logics/main.json.rabl
235
235
  - app/views/foreman_tasks/api/recurring_logics/show.json.rabl
236
236
  - app/views/foreman_tasks/api/recurring_logics/update.json.rabl
237
+ - app/views/foreman_tasks/api/tasks/dependency_summary.json.rabl
237
238
  - app/views/foreman_tasks/api/tasks/details.json.rabl
238
239
  - app/views/foreman_tasks/api/tasks/index.json.rabl
239
240
  - app/views/foreman_tasks/api/tasks/show.json.rabl
@@ -377,6 +378,7 @@ files:
377
378
  - test/unit/actions/proxy_action_test.rb
378
379
  - test/unit/actions/recurring_action_test.rb
379
380
  - test/unit/actions/trigger_proxy_batch_test.rb
381
+ - test/unit/chaining_test.rb
380
382
  - test/unit/cleaner_test.rb
381
383
  - test/unit/config/environment.rb
382
384
  - test/unit/dynflow_console_authorizer_test.rb
@@ -398,6 +400,7 @@ files:
398
400
  - webpack/ForemanTasks/Components/TaskActions/TaskActionsConstants.js
399
401
  - webpack/ForemanTasks/Components/TaskActions/__snapshots__/TaskAction.test.js.snap
400
402
  - webpack/ForemanTasks/Components/TaskActions/index.js
403
+ - webpack/ForemanTasks/Components/TaskDetails/Components/Dependencies.js
401
404
  - webpack/ForemanTasks/Components/TaskDetails/Components/Errors.js
402
405
  - webpack/ForemanTasks/Components/TaskDetails/Components/Locks.js
403
406
  - webpack/ForemanTasks/Components/TaskDetails/Components/Raw.js
@@ -407,6 +410,7 @@ files:
407
410
  - webpack/ForemanTasks/Components/TaskDetails/Components/TaskHelper.js
408
411
  - webpack/ForemanTasks/Components/TaskDetails/Components/TaskInfo.js
409
412
  - webpack/ForemanTasks/Components/TaskDetails/Components/TaskSkeleton.js
413
+ - webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Dependencies.test.js
410
414
  - webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Errors.test.js
411
415
  - webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Locks.test.js
412
416
  - webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Raw.test.js
@@ -449,10 +453,6 @@ files:
449
453
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.scss
450
454
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.test.js
451
455
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.js
452
- - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
453
- - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/OtherInfo.test.js.snap
454
- - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/StoppedTasksCard.test.js.snap
455
- - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/StoppedTasksCardTable.test.js.snap
456
456
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.js
457
457
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.scss
458
458
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js
@@ -472,7 +472,6 @@ files:
472
472
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksLabelsRow/TasksLabelsRow.js
473
473
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksLabelsRow/TasksLabelsRow.scss
474
474
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksLabelsRow/TasksLabelsRow.test.js
475
- - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksLabelsRow/__snapshots__/TasksLabelsRow.test.js.snap
476
475
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/Components/TimeDropDown/TimeDropDown.js
477
476
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/Components/TimeDropDown/TimeDropDown.test.js
478
477
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/Components/TimeDropDown/__snapshots__/TimeDropDown.test.js.snap
@@ -515,7 +514,6 @@ files:
515
514
  - webpack/ForemanTasks/Components/TasksTable/Components/__test__/SelectAllAlert.test.js
516
515
  - webpack/ForemanTasks/Components/TasksTable/Components/__test__/TableSelectionCell.test.js
517
516
  - webpack/ForemanTasks/Components/TasksTable/Components/__test__/TableSelectionHeaderCell.test.js
518
- - webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ActionSelectButton.test.js.snap
519
517
  - webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/SelectAllAlert.test.js.snap
520
518
  - webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/TableSelectionCell.test.js.snap
521
519
  - webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/TableSelectionHeaderCell.test.js.snap
@@ -665,6 +663,7 @@ test_files:
665
663
  - test/unit/actions/proxy_action_test.rb
666
664
  - test/unit/actions/recurring_action_test.rb
667
665
  - test/unit/actions/trigger_proxy_batch_test.rb
666
+ - test/unit/chaining_test.rb
668
667
  - test/unit/cleaner_test.rb
669
668
  - test/unit/config/environment.rb
670
669
  - test/unit/dynflow_console_authorizer_test.rb
@@ -1,54 +0,0 @@
1
- import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
-
3
- import { StoppedTable } from './StoppedTasksCardTable';
4
- import {
5
- TASKS_DASHBOARD_AVAILABLE_TIMES,
6
- TASKS_DASHBOARD_AVAILABLE_QUERY_STATES,
7
- TASKS_DASHBOARD_AVAILABLE_QUERY_MODES,
8
- TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS,
9
- } from '../../../../TasksDashboardConstants';
10
-
11
- const { STOPPED } = TASKS_DASHBOARD_AVAILABLE_QUERY_STATES;
12
- const { LAST } = TASKS_DASHBOARD_AVAILABLE_QUERY_MODES;
13
- const { WEEK } = TASKS_DASHBOARD_AVAILABLE_TIMES;
14
- const data = {
15
- error: { total: 9, last: 1 },
16
- warning: { total: 8, last: 2 },
17
- success: { total: 7, last: 3 },
18
- };
19
- const fixtures = {
20
- 'render with props': {
21
- data,
22
- time: WEEK,
23
- query: {},
24
- updateQuery: jest.fn(),
25
- },
26
- };
27
-
28
- Object.values(TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS)
29
- .filter(result => result !== TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS.OTHER)
30
- .forEach(result => {
31
- fixtures[`render ${result}-total selected`] = {
32
- query: {
33
- state: STOPPED,
34
- result,
35
- },
36
- updateQuery: jest.fn(),
37
- data,
38
- time: WEEK,
39
- };
40
- fixtures[`render ${result}-last selected`] = {
41
- time: WEEK,
42
- query: {
43
- state: STOPPED,
44
- result,
45
- mode: LAST,
46
- time: WEEK,
47
- },
48
- updateQuery: jest.fn(),
49
- data,
50
- };
51
- });
52
-
53
- describe('StoppedTable', () =>
54
- testComponentSnapshotsWithFixtures(StoppedTable, fixtures));
@@ -1,30 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`OtherInfo render 1`] = `
4
- <span
5
- className=""
6
- >
7
- <Tooltip
8
- content="Other includes all stopped tasks that are cancelled or pending"
9
- id="stopped-tooltip"
10
- position="bottom"
11
- >
12
- <span>
13
- <InfoCircleIcon
14
- className="pficon"
15
- />
16
- <span>
17
- Other:
18
-
19
- </span>
20
- </span>
21
- </Tooltip>
22
- <Button
23
- onClick={[Function]}
24
- ouiaId="stopped-other-tasks-button"
25
- variant="link"
26
- >
27
- 7
28
- </Button>
29
- </span>
30
- `;
@@ -1,107 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`StoppedTasksCard render selected 1`] = `
4
- <Card
5
- accented={false}
6
- aggregated={false}
7
- aggregatedMini={false}
8
- cardRef={null}
9
- className="tasks-donut-card stopped-tasks-card selected-tasks-card"
10
- id="stopped-tasks-card"
11
- matchHeight={false}
12
- >
13
- <CardTitle
14
- className=""
15
- onClick={[Function]}
16
- >
17
- Stopped
18
- </CardTitle>
19
- <CardBody
20
- className=""
21
- >
22
- <StoppedTable
23
- data={
24
- Object {
25
- "error": Object {
26
- "last": 0,
27
- "total": 0,
28
- },
29
- "success": Object {
30
- "last": 0,
31
- "total": 0,
32
- },
33
- "warning": Object {
34
- "last": 0,
35
- "total": 0,
36
- },
37
- }
38
- }
39
- query={
40
- Object {
41
- "state": "stopped",
42
- }
43
- }
44
- time="H24"
45
- updateQuery={[Function]}
46
- />
47
- <OtherInfo
48
- otherCount={0}
49
- query={
50
- Object {
51
- "state": "stopped",
52
- }
53
- }
54
- updateQuery={[Function]}
55
- />
56
- </CardBody>
57
- </Card>
58
- `;
59
-
60
- exports[`StoppedTasksCard render with minimal props 1`] = `
61
- <Card
62
- accented={false}
63
- aggregated={false}
64
- aggregatedMini={false}
65
- cardRef={null}
66
- className="tasks-donut-card stopped-tasks-card"
67
- id="stopped-tasks-card"
68
- matchHeight={false}
69
- >
70
- <CardTitle
71
- className=""
72
- onClick={[Function]}
73
- >
74
- Stopped
75
- </CardTitle>
76
- <CardBody
77
- className=""
78
- >
79
- <StoppedTable
80
- data={
81
- Object {
82
- "error": Object {
83
- "last": 0,
84
- "total": 0,
85
- },
86
- "success": Object {
87
- "last": 0,
88
- "total": 0,
89
- },
90
- "warning": Object {
91
- "last": 0,
92
- "total": 0,
93
- },
94
- }
95
- }
96
- query={Object {}}
97
- time="H24"
98
- updateQuery={[Function]}
99
- />
100
- <OtherInfo
101
- otherCount={0}
102
- query={Object {}}
103
- updateQuery={[Function]}
104
- />
105
- </CardBody>
106
- </Card>
107
- `;