foreman_rh_cloud 13.0.8 → 13.0.10

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 (130) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/inventory_upload/report_actions.rb +8 -1
  3. data/app/controllers/foreman_inventory_upload/accounts_controller.rb +82 -7
  4. data/app/controllers/foreman_inventory_upload/api/tasks_controller.rb +110 -0
  5. data/app/controllers/foreman_inventory_upload/reports_controller.rb +41 -17
  6. data/app/controllers/foreman_inventory_upload/uploads_controller.rb +0 -9
  7. data/config/routes.rb +4 -2
  8. data/db/migrate/20251209163012_drop_task_output_tables.foreman_rh_cloud.rb +24 -0
  9. data/lib/foreman_inventory_upload/async/generate_all_reports_job.rb +1 -1
  10. data/lib/foreman_inventory_upload/async/host_inventory_report_job.rb +39 -0
  11. data/lib/foreman_inventory_upload/async/queue_for_upload_job.rb +1 -23
  12. data/lib/foreman_inventory_upload/async/upload_report_direct_job.rb +171 -0
  13. data/lib/foreman_inventory_upload.rb +0 -4
  14. data/lib/foreman_rh_cloud/plugin.rb +1 -0
  15. data/lib/foreman_rh_cloud/version.rb +1 -1
  16. data/lib/inventory_sync/async/inventory_hosts_sync.rb +0 -2
  17. data/lib/tasks/rh_cloud_inventory.rake +4 -2
  18. data/package.json +1 -1
  19. data/test/controllers/accounts_controller_test.rb +10 -11
  20. data/test/controllers/insights_cloud/api/cloud_request_controller_test.rb +1 -2
  21. data/test/jobs/host_inventory_report_job_test.rb +161 -97
  22. data/test/jobs/queue_for_upload_job_test.rb +1 -12
  23. data/test/jobs/single_host_report_job_test.rb +36 -54
  24. data/test/jobs/upload_report_direct_job_test.rb +399 -0
  25. data/test/unit/rh_cloud_permissions_test.rb +2 -0
  26. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.fixtures.js +6 -6
  27. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.js +49 -34
  28. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListActions.js +2 -2
  29. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.fixtures.js +4 -5
  30. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js +15 -7
  31. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap +11 -11
  32. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.fixtures.js +2 -2
  33. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js +10 -14
  34. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatusHelper.js +9 -4
  35. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap +4 -4
  36. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap +15 -9
  37. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap +7 -7
  38. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap +6 -6
  39. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap +12 -12
  40. data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.js +37 -130
  41. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js +60 -17
  42. data/webpack/ForemanInventoryUpload/Components/Dashboard/index.js +1 -34
  43. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/integration.test.js.snap +0 -1
  44. data/webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.js +1 -26
  45. data/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.js +24 -17
  46. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageHeader.test.js +178 -8
  47. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap +2 -2
  48. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/ToolbarButtons.js +3 -1
  49. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/__tests__/ToolbarButtons.test.js +69 -51
  50. data/webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js +22 -9
  51. data/webpack/ForemanInventoryUpload/Components/TabHeader/__tests__/TabHeader.test.js +67 -4
  52. data/webpack/ForemanInventoryUpload/Components/TaskHistory/TaskHistory.js +140 -0
  53. data/webpack/ForemanInventoryUpload/Components/TaskHistory/index.js +1 -0
  54. data/webpack/ForemanInventoryUpload/Components/TaskHistory/taskHistory.scss +40 -0
  55. data/webpack/ForemanInventoryUpload/Components/TaskProgress/TaskProgress.js +340 -0
  56. data/webpack/ForemanInventoryUpload/Components/TaskProgress/index.js +1 -0
  57. data/webpack/ForemanInventoryUpload/Components/TaskProgress/taskProgress.scss +8 -0
  58. data/webpack/ForemanInventoryUpload/ForemanInventoryHelpers.js +2 -2
  59. data/webpack/ForemanInventoryUpload/ForemanInventoryUploadReducers.js +0 -2
  60. data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap +1 -1
  61. data/webpack/ForemanRhCloudPages.js +0 -1
  62. data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/InsightsTable.test.js +11 -19
  63. data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationHelpers.js +1 -2
  64. data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.js +2 -4
  65. data/webpack/InsightsVulnerabilityHostIndexExtensions/__tests__/CVECountCell.test.js +77 -22
  66. data/webpack/__mocks__/foremanReact/components/common/dates/RelativeDateTime.js +14 -0
  67. data/webpack/__tests__/ForemanRhCloudHelpers.test.js +5 -1
  68. metadata +13 -68
  69. data/app/models/task_output_line.rb +0 -2
  70. data/app/models/task_output_status.rb +0 -2
  71. data/lib/foreman_inventory_upload/async/generate_report_job.rb +0 -61
  72. data/lib/foreman_inventory_upload/async/progress_output.rb +0 -38
  73. data/lib/foreman_inventory_upload/async/shell_process.rb +0 -77
  74. data/lib/foreman_inventory_upload/async/upload_report_job.rb +0 -97
  75. data/lib/foreman_inventory_upload/scripts/uploader.sh.erb +0 -55
  76. data/test/controllers/reports_controller_test.rb +0 -21
  77. data/test/controllers/uploads_controller_test.rb +0 -21
  78. data/test/jobs/generate_report_job_test.rb +0 -146
  79. data/test/jobs/upload_report_job_test.rb +0 -38
  80. data/test/unit/shell_process_job_test.rb +0 -29
  81. data/webpack/ForemanInventoryUpload/Components/Dashboard/DashboardActions.js +0 -88
  82. data/webpack/ForemanInventoryUpload/Components/Dashboard/DashboardConstants.js +0 -9
  83. data/webpack/ForemanInventoryUpload/Components/Dashboard/DashboardReducer.js +0 -68
  84. data/webpack/ForemanInventoryUpload/Components/Dashboard/DashboardSelectors.js +0 -17
  85. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardActions.test.js +0 -51
  86. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardIntegration.test.js +0 -17
  87. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js +0 -64
  88. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js +0 -46
  89. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/__snapshots__/Dashboard.test.js.snap +0 -36
  90. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/__snapshots__/DashboardActions.test.js.snap +0 -76
  91. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/__snapshots__/DashboardReducer.test.js.snap +0 -44
  92. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/__snapshots__/DashboardSelectors.test.js.snap +0 -42
  93. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.fixtures.js +0 -0
  94. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js +0 -55
  95. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModalHelper.js +0 -0
  96. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/__tests__/FullScreenModal.test.js +0 -13
  97. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/__tests__/__snapshots__/FullScreenModal.test.js.snap +0 -65
  98. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/fullScreenModal.scss +0 -20
  99. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/index.js +0 -1
  100. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageHeader.test.js.snap +0 -36
  101. data/webpack/ForemanInventoryUpload/Components/ReportGenerate/ReportGenerate.fixtures.js +0 -18
  102. data/webpack/ForemanInventoryUpload/Components/ReportGenerate/ReportGenerate.js +0 -65
  103. data/webpack/ForemanInventoryUpload/Components/ReportGenerate/ReportGenerateHelper.js +0 -0
  104. data/webpack/ForemanInventoryUpload/Components/ReportGenerate/__tests__/ReportGenerate.test.js +0 -14
  105. data/webpack/ForemanInventoryUpload/Components/ReportGenerate/__tests__/__snapshots__/ReportGenerate.test.js.snap +0 -47
  106. data/webpack/ForemanInventoryUpload/Components/ReportGenerate/index.js +0 -1
  107. data/webpack/ForemanInventoryUpload/Components/ReportGenerate/reportGenerate.scss +0 -0
  108. data/webpack/ForemanInventoryUpload/Components/ReportUpload/ReportUpload.fixtures.js +0 -18
  109. data/webpack/ForemanInventoryUpload/Components/ReportUpload/ReportUpload.js +0 -46
  110. data/webpack/ForemanInventoryUpload/Components/ReportUpload/ReportUploadHelper.js +0 -0
  111. data/webpack/ForemanInventoryUpload/Components/ReportUpload/__tests__/ReportUpload.test.js +0 -14
  112. data/webpack/ForemanInventoryUpload/Components/ReportUpload/__tests__/__snapshots__/ReportUpload.test.js.snap +0 -47
  113. data/webpack/ForemanInventoryUpload/Components/ReportUpload/index.js +0 -1
  114. data/webpack/ForemanInventoryUpload/Components/ReportUpload/reportUpload.scss +0 -0
  115. data/webpack/ForemanInventoryUpload/Components/TabBody/TabBody.fixtures.js +0 -0
  116. data/webpack/ForemanInventoryUpload/Components/TabBody/TabBody.js +0 -31
  117. data/webpack/ForemanInventoryUpload/Components/TabBody/TabBodyHelper.js +0 -0
  118. data/webpack/ForemanInventoryUpload/Components/TabBody/__tests__/TabBody.test.js +0 -13
  119. data/webpack/ForemanInventoryUpload/Components/TabBody/__tests__/__snapshots__/TabBody.test.js.snap +0 -19
  120. data/webpack/ForemanInventoryUpload/Components/TabBody/index.js +0 -1
  121. data/webpack/ForemanInventoryUpload/Components/TabBody/tabBody.scss +0 -5
  122. data/webpack/ForemanInventoryUpload/Components/Terminal/Terminal.fixtures.js +0 -10
  123. data/webpack/ForemanInventoryUpload/Components/Terminal/Terminal.js +0 -110
  124. data/webpack/ForemanInventoryUpload/Components/Terminal/TerminalHelper.js +0 -6
  125. data/webpack/ForemanInventoryUpload/Components/Terminal/__tests__/Terminal.test.js +0 -34
  126. data/webpack/ForemanInventoryUpload/Components/Terminal/__tests__/__snapshots__/Terminal.test.js.snap +0 -98
  127. data/webpack/ForemanInventoryUpload/Components/Terminal/index.js +0 -1
  128. data/webpack/ForemanInventoryUpload/Components/Terminal/terminal.scss +0 -32
  129. data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/__snapshots__/InsightsTable.test.js.snap +0 -112
  130. data/webpack/__mocks__/foremanReact/common/hooks/API/APIHooks.js +0 -3
@@ -1,64 +0,0 @@
1
- import { testReducerSnapshotWithFixtures } from '@theforeman/test';
2
-
3
- import {
4
- INVENTORY_POLLING_START,
5
- INVENTORY_POLLING,
6
- INVENTORY_TAB_CHANGED,
7
- INVENTORY_POLLING_ERROR,
8
- } from '../DashboardConstants';
9
- import reducer from '../DashboardReducer';
10
- import {
11
- pollingProcessID,
12
- logs,
13
- initialState,
14
- activeTab,
15
- error,
16
- accountID,
17
- scheduled,
18
- } from '../Dashboard.fixtures';
19
-
20
- const fixtures = {
21
- 'should return the initial state': initialState,
22
- 'should handle INVENTORY_POLLING_START': {
23
- action: {
24
- type: INVENTORY_POLLING_START,
25
- payload: {
26
- pollingProcessID,
27
- accountID,
28
- },
29
- },
30
- },
31
- 'should handle INVENTORY_POLLING': {
32
- action: {
33
- type: INVENTORY_POLLING,
34
- payload: {
35
- logs,
36
- accountID,
37
- activeTab,
38
- scheduled,
39
- },
40
- },
41
- },
42
- 'should handle INVENTORY_TAB_CHANGED': {
43
- action: {
44
- type: INVENTORY_TAB_CHANGED,
45
- payload: {
46
- activeTab,
47
- accountID,
48
- },
49
- },
50
- },
51
- 'should handle INVENTORY_POLLING_ERROR': {
52
- action: {
53
- type: INVENTORY_POLLING_ERROR,
54
- payload: {
55
- error,
56
- accountID,
57
- activeTab,
58
- },
59
- },
60
- },
61
- };
62
-
63
- describe('Dashboard reducer', () =>
64
- testReducerSnapshotWithFixtures(reducer, fixtures));
@@ -1,46 +0,0 @@
1
- import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
- import {
3
- selectDashboard,
4
- selectPollingProcessID,
5
- selectActiveTab,
6
- selectUploading,
7
- selectGenerating,
8
- } from '../DashboardSelectors';
9
- import {
10
- logs,
11
- completed,
12
- pollingProcessID,
13
- activeTab,
14
- accountID,
15
- } from '../Dashboard.fixtures';
16
- import { rhCloudStateWrapper } from '../../../../ForemanRhCloudTestHelpers';
17
-
18
- const state = rhCloudStateWrapper({
19
- dashboard: {
20
- [accountID]: {
21
- generating: {
22
- logs,
23
- completed,
24
- },
25
- uploading: {
26
- logs,
27
- completed,
28
- },
29
- activeTab,
30
- pollingProcessID,
31
- },
32
- },
33
- });
34
-
35
- const fixtures = {
36
- 'should return Dashboard': () => selectDashboard(state, accountID),
37
- 'should return Dashboard uploading': () => selectUploading(state, accountID),
38
- 'should return Dashboard generating': () =>
39
- selectGenerating(state, accountID),
40
- 'should return Dashboard pollingProcessID': () =>
41
- selectPollingProcessID(state, accountID),
42
- 'should return Dashboard activeTab': () => selectActiveTab(state, accountID),
43
- };
44
-
45
- describe('Dashboard selectors', () =>
46
- testSelectorsSnapshotWithFixtures(fixtures));
@@ -1,36 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Dashboard rendering with props 1`] = `
4
- <NavContainer
5
- items={
6
- Array [
7
- Object {
8
- "component": [Function],
9
- "icon": "database",
10
- "name": "Generating",
11
- "onClick": [Function],
12
- "props": Object {
13
- "downloadButtonDisabled": [Function],
14
- "downloadReports": [Function],
15
- "exitCode": "unknown",
16
- "restartProcess": [Function],
17
- "toggleFullScreen": [Function],
18
- },
19
- },
20
- Object {
21
- "component": [Function],
22
- "icon": "cloud-upload",
23
- "name": "Uploading",
24
- "onClick": [Function],
25
- "props": Object {
26
- "exitCode": "unknown",
27
- "toggleFullScreen": [Function],
28
- },
29
- },
30
- ]
31
- }
32
- showFullScreen={false}
33
- terminalProps={Object {}}
34
- toggleFullScreen={[Function]}
35
- />
36
- `;
@@ -1,76 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Dashboard actions should downloadReports 1`] = `
4
- Object {
5
- "payload": Object {
6
- "accountID": "some-account-ID",
7
- },
8
- "type": "INVENTORY_REPORTS_DOWNLOAD",
9
- }
10
- `;
11
-
12
- exports[`Dashboard actions should fetchLogs 1`] = `
13
- Array [
14
- Array [
15
- Object {
16
- "payload": Object {
17
- "accountID": "some-account-ID",
18
- "activeTab": "generating",
19
- "logs": Array [
20
- "some-logs",
21
- "some-logs",
22
- ],
23
- "scheduled": "2019-08-21T16:14:16.520+03:00",
24
- },
25
- "type": "INVENTORY_POLLING",
26
- },
27
- ],
28
- ]
29
- `;
30
-
31
- exports[`Dashboard actions should setActiveTab 1`] = `
32
- Object {
33
- "payload": Object {
34
- "accountID": "some-account-ID",
35
- "activeTab": "uploads",
36
- },
37
- "type": "INVENTORY_TAB_CHANGED",
38
- }
39
- `;
40
-
41
- exports[`Dashboard actions should startPolling 1`] = `
42
- Object {
43
- "payload": Object {
44
- "accountID": "some-account-ID",
45
- "pollingProcessID": 1,
46
- },
47
- "type": "INVENTORY_POLLING_START",
48
- }
49
- `;
50
-
51
- exports[`Dashboard actions should stopPolling 1`] = `
52
- Array [
53
- Array [
54
- Object {
55
- "payload": Object {
56
- "accountID": "some-account-ID",
57
- },
58
- "type": "INVENTORY_POLLING_STOP",
59
- },
60
- ],
61
- ]
62
- `;
63
-
64
- exports[`Dashboard actions should toggleFullScreen 1`] = `
65
- Array [
66
- Array [
67
- Object {
68
- "payload": Object {
69
- "accountID": "some-account-ID",
70
- "activeTab": "generating",
71
- },
72
- "type": "INVENTORY_TOGGLE_TERMINAL_FULL_SCREEN",
73
- },
74
- ],
75
- ]
76
- `;
@@ -1,44 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Dashboard reducer should handle INVENTORY_POLLING 1`] = `
4
- Object {
5
- "some-account-ID": Object {
6
- "uploads": Object {
7
- "error": null,
8
- "logs": Array [
9
- "some-logs...",
10
- ],
11
- "scheduled": "2019-08-21T16:14:16.520+03:00",
12
- },
13
- },
14
- }
15
- `;
16
-
17
- exports[`Dashboard reducer should handle INVENTORY_POLLING_ERROR 1`] = `
18
- Object {
19
- "some-account-ID": Object {
20
- "uploads": Object {
21
- "error": "some-error",
22
- },
23
- },
24
- }
25
- `;
26
-
27
- exports[`Dashboard reducer should handle INVENTORY_POLLING_START 1`] = `
28
- Object {
29
- "some-account-ID": Object {
30
- "activeTab": "generating",
31
- "pollingProcessID": 1,
32
- },
33
- }
34
- `;
35
-
36
- exports[`Dashboard reducer should handle INVENTORY_TAB_CHANGED 1`] = `
37
- Object {
38
- "some-account-ID": Object {
39
- "activeTab": "uploads",
40
- },
41
- }
42
- `;
43
-
44
- exports[`Dashboard reducer should return the initial state 1`] = `Object {}`;
@@ -1,42 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Dashboard selectors should return Dashboard 1`] = `
4
- Object {
5
- "activeTab": "uploads",
6
- "generating": Object {
7
- "completed": 25,
8
- "logs": Array [
9
- "some-logs...",
10
- ],
11
- },
12
- "pollingProcessID": 1,
13
- "uploading": Object {
14
- "completed": 25,
15
- "logs": Array [
16
- "some-logs...",
17
- ],
18
- },
19
- }
20
- `;
21
-
22
- exports[`Dashboard selectors should return Dashboard activeTab 1`] = `"uploads"`;
23
-
24
- exports[`Dashboard selectors should return Dashboard generating 1`] = `
25
- Object {
26
- "completed": 25,
27
- "logs": Array [
28
- "some-logs...",
29
- ],
30
- }
31
- `;
32
-
33
- exports[`Dashboard selectors should return Dashboard pollingProcessID 1`] = `1`;
34
-
35
- exports[`Dashboard selectors should return Dashboard uploading 1`] = `
36
- Object {
37
- "completed": 25,
38
- "logs": Array [
39
- "some-logs...",
40
- ],
41
- }
42
- `;
@@ -1,55 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Modal, Icon } from 'patternfly-react';
4
- import { noop } from 'foremanReact/common/helpers';
5
- import { translate as __ } from 'foremanReact/common/I18n';
6
- import Terminal from '../Terminal';
7
- import './fullScreenModal.scss';
8
-
9
- const FullScreenModal = ({
10
- showFullScreen,
11
- toggleFullScreen,
12
- terminalProps,
13
- }) => (
14
- <Modal
15
- id="rh-cloud-inventory-full-screen-terminal"
16
- show={showFullScreen}
17
- onHide={toggleFullScreen}
18
- >
19
- <Modal.Header>
20
- <button
21
- className="close"
22
- onClick={toggleFullScreen}
23
- aria-hidden="true"
24
- aria-label="Close"
25
- >
26
- <Icon type="pf" name="close" />
27
- </button>
28
- <Modal.Title>{__('Full Screen')}</Modal.Title>
29
- </Modal.Header>
30
- <Modal.Body>
31
- <Terminal autoScroll={false} {...terminalProps} />
32
- </Modal.Body>
33
- </Modal>
34
- );
35
-
36
- FullScreenModal.propTypes = {
37
- showFullScreen: PropTypes.bool,
38
- toggleFullScreen: PropTypes.func,
39
- terminalProps: PropTypes.shape({
40
- exitCode: PropTypes.string,
41
- logs: PropTypes.oneOfType([
42
- PropTypes.arrayOf(PropTypes.string),
43
- PropTypes.string,
44
- ]),
45
- error: PropTypes.string,
46
- }),
47
- };
48
-
49
- FullScreenModal.defaultProps = {
50
- showFullScreen: false,
51
- toggleFullScreen: noop,
52
- terminalProps: {},
53
- };
54
-
55
- export default FullScreenModal;
@@ -1,13 +0,0 @@
1
- import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
-
3
- import FullScreenModal from '../FullScreenModal';
4
-
5
- const fixtures = {
6
- 'render without Props': {},
7
- /** fixtures, props for the component */
8
- };
9
-
10
- describe('FullScreenModal', () => {
11
- describe('rendering', () =>
12
- testComponentSnapshotsWithFixtures(FullScreenModal, fixtures));
13
- });
@@ -1,65 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`FullScreenModal rendering render without Props 1`] = `
4
- <Modal
5
- animation={true}
6
- autoFocus={true}
7
- backdrop={true}
8
- bsClass="modal"
9
- dialogComponentClass={[Function]}
10
- enforceFocus={true}
11
- id="rh-cloud-inventory-full-screen-terminal"
12
- keyboard={true}
13
- manager={
14
- ModalManager {
15
- "add": [Function],
16
- "containers": Array [],
17
- "data": Array [],
18
- "handleContainerOverflow": true,
19
- "hideSiblingNodes": true,
20
- "isTopModal": [Function],
21
- "modals": Array [],
22
- "remove": [Function],
23
- }
24
- }
25
- onHide={[Function]}
26
- renderBackdrop={[Function]}
27
- restoreFocus={true}
28
- show={false}
29
- >
30
- <ModalHeader
31
- bsClass="modal-header"
32
- closeButton={false}
33
- closeLabel="Close"
34
- >
35
- <button
36
- aria-hidden="true"
37
- aria-label="Close"
38
- className="close"
39
- onClick={[Function]}
40
- >
41
- <Icon
42
- name="close"
43
- type="pf"
44
- />
45
- </button>
46
- <ModalTitle
47
- bsClass="modal-title"
48
- componentClass="h4"
49
- >
50
- Full Screen
51
- </ModalTitle>
52
- </ModalHeader>
53
- <ModalBody
54
- bsClass="modal-body"
55
- componentClass="div"
56
- >
57
- <Terminal
58
- autoScroll={false}
59
- error={null}
60
- exitCode=""
61
- logs={null}
62
- />
63
- </ModalBody>
64
- </Modal>
65
- `;
@@ -1,20 +0,0 @@
1
- #rh-cloud-inventory-full-screen-terminal {
2
- .modal-dialog {
3
- width: 95%;
4
- height: 95%;
5
- margin: 30px 0 0 30px;
6
-
7
- .modal-body {
8
- padding: 0;
9
- display: flex;
10
- height: -webkit-fill-available;
11
- height: -moz-available;
12
- height: fill-available;
13
-
14
- .rh-cloud-inventory-terminal {
15
- margin: 0 -20px;
16
- height: 100%;
17
- }
18
- }
19
- }
20
- }
@@ -1 +0,0 @@
1
- export { default } from './FullScreenModal';
@@ -1,36 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`PageHeader rendering render without Props 1`] = `
4
- <div
5
- className="inventory-upload-header"
6
- >
7
- <ConnectedSettingsWarning />
8
- <PageTitle />
9
- <div
10
- className="inventory-upload-header-description"
11
- >
12
- <ConnectedInventorySettings />
13
- <PageDescription />
14
- </div>
15
- <Row
16
- bsClass="row"
17
- componentClass="div"
18
- >
19
- <Col
20
- bsClass="col"
21
- componentClass="div"
22
- xs={4}
23
- >
24
- <Connect(InventoryFilter) />
25
- </Col>
26
- <Col
27
- bsClass="col"
28
- componentClass="div"
29
- xs={7}
30
- xsOffset={1}
31
- >
32
- <ToolbarButtons />
33
- </Col>
34
- </Row>
35
- </div>
36
- `;
@@ -1,18 +0,0 @@
1
- import { noop } from 'foremanReact/common/helpers';
2
-
3
- export const exitCode = 'exit 0';
4
- export const logs = ['No running process'];
5
- export const completed = 0;
6
- export const restartProcess = noop;
7
- export const downloadReports = noop;
8
- export const error = null;
9
- export const scheduled = '2019-08-21T16:14:16.520+03:00';
10
- export const props = {
11
- exitCode,
12
- logs,
13
- completed,
14
- restartProcess,
15
- downloadReports,
16
- error,
17
- scheduled,
18
- };
@@ -1,65 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { noop } from 'foremanReact/common/helpers';
4
- import TabContainer from '../TabContainer';
5
- import TabHeader from '../TabHeader';
6
- import TabBody from '../TabBody';
7
- import './reportGenerate.scss';
8
-
9
- const ReportGenerate = ({
10
- exitCode,
11
- logs,
12
- completed,
13
- error,
14
- restartProcess,
15
- downloadReports,
16
- downloadButtonDisabled,
17
- toggleFullScreen,
18
- scheduled,
19
- }) => (
20
- <TabContainer className="report-generate">
21
- <TabHeader
22
- exitCode={exitCode}
23
- onRestart={restartProcess}
24
- onDownload={downloadReports}
25
- downloadButtonDisabled={downloadButtonDisabled}
26
- toggleFullScreen={toggleFullScreen}
27
- />
28
- <TabBody
29
- exitCode={exitCode}
30
- logs={logs}
31
- completed={completed}
32
- error={error}
33
- scheduled={scheduled}
34
- />
35
- </TabContainer>
36
- );
37
-
38
- ReportGenerate.propTypes = {
39
- exitCode: PropTypes.string,
40
- logs: PropTypes.oneOfType([
41
- PropTypes.arrayOf(PropTypes.string),
42
- PropTypes.string,
43
- ]),
44
- completed: PropTypes.number,
45
- error: PropTypes.string,
46
- restartProcess: PropTypes.func,
47
- downloadReports: PropTypes.func,
48
- downloadButtonDisabled: PropTypes.func,
49
- toggleFullScreen: PropTypes.func,
50
- scheduled: PropTypes.string,
51
- };
52
-
53
- ReportGenerate.defaultProps = {
54
- exitCode: '',
55
- logs: null,
56
- completed: 0,
57
- error: null,
58
- restartProcess: noop,
59
- downloadReports: noop,
60
- downloadButtonDisabled: noop,
61
- toggleFullScreen: noop,
62
- scheduled: null,
63
- };
64
-
65
- export default ReportGenerate;
@@ -1,14 +0,0 @@
1
- import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
-
3
- import ReportGenerate from '../ReportGenerate';
4
- import { props } from '../ReportGenerate.fixtures';
5
-
6
- const fixtures = {
7
- 'render without Props': {},
8
- 'render with Props': props,
9
- };
10
-
11
- describe('ReportGenerate', () => {
12
- describe('rendering', () =>
13
- testComponentSnapshotsWithFixtures(ReportGenerate, fixtures));
14
- });
@@ -1,47 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ReportGenerate rendering render with Props 1`] = `
4
- <TabContainer
5
- className="report-generate"
6
- >
7
- <TabHeader
8
- downloadButtonDisabled={[Function]}
9
- exitCode="exit 0"
10
- onDownload={[Function]}
11
- onRestart={[Function]}
12
- toggleFullScreen={[Function]}
13
- />
14
- <TabBody
15
- completed={0}
16
- error={null}
17
- exitCode="exit 0"
18
- logs={
19
- Array [
20
- "No running process",
21
- ]
22
- }
23
- scheduled="2019-08-21T16:14:16.520+03:00"
24
- />
25
- </TabContainer>
26
- `;
27
-
28
- exports[`ReportGenerate rendering render without Props 1`] = `
29
- <TabContainer
30
- className="report-generate"
31
- >
32
- <TabHeader
33
- downloadButtonDisabled={[Function]}
34
- exitCode=""
35
- onDownload={[Function]}
36
- onRestart={[Function]}
37
- toggleFullScreen={[Function]}
38
- />
39
- <TabBody
40
- completed={0}
41
- error={null}
42
- exitCode=""
43
- logs={null}
44
- scheduled={null}
45
- />
46
- </TabContainer>
47
- `;
@@ -1 +0,0 @@
1
- export { default } from './ReportGenerate';
@@ -1,18 +0,0 @@
1
- import { noop } from 'foremanReact/common/helpers';
2
-
3
- export const files = ['some-file'];
4
- export const exitCode = 'exit 0';
5
- export const logs = ['No running process'];
6
- export const completed = 0;
7
- export const restartProcess = noop;
8
- export const downloadReports = noop;
9
- export const error = null;
10
- export const props = {
11
- files,
12
- exitCode,
13
- logs,
14
- completed,
15
- restartProcess,
16
- downloadReports,
17
- error,
18
- };