foreman_rh_cloud 13.2.10 → 13.2.11

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/concerns/rh_cloud_host.rb +36 -1
  3. data/app/services/foreman_rh_cloud/url_remediations_retriever.rb +19 -5
  4. data/lib/foreman_inventory_upload/async/upload_report_direct_job.rb +2 -0
  5. data/lib/foreman_rh_cloud/version.rb +1 -1
  6. data/package.json +1 -1
  7. data/test/jobs/upload_report_direct_job_test.rb +29 -0
  8. data/test/unit/insights_facet_test.rb +5 -0
  9. data/test/unit/rh_cloud_host_test.rb +68 -0
  10. data/test/unit/services/foreman_rh_cloud/url_remediations_retriever_test.rb +82 -5
  11. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/EmptyResults.test.js +10 -9
  12. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js +13 -9
  13. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js +20 -9
  14. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js +31 -8
  15. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js +26 -10
  16. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +33 -9
  17. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js +55 -35
  18. data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js +13 -9
  19. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilter.test.js +12 -15
  20. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/integration.test.js +32 -12
  21. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageTitle.test.js +15 -7
  22. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorButton.test.js +47 -18
  23. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/SettingsWarning.test.js +58 -15
  24. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButton.test.js +23 -9
  25. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonSelectors.test.js +19 -17
  26. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/integrations.test.js +25 -37
  27. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js +28 -8
  28. data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js +25 -8
  29. data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js +11 -9
  30. data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js +11 -9
  31. data/webpack/ForemanInventoryUpload/ForemanInventoryHelpers.js +4 -4
  32. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js +33 -12
  33. data/webpack/ForemanInventoryUpload/__tests__/ForemanInventoryHelpers.test.js +36 -8
  34. metadata +1 -42
  35. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/__snapshots__/EmptyResults.test.js.snap +0 -18
  36. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/__snapshots__/EmptyState.test.js.snap +0 -25
  37. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/__snapshots__/ErrorState.test.js.snap +0 -20
  38. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap +0 -47
  39. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap +0 -59
  40. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js +0 -34
  41. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js +0 -14
  42. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js +0 -25
  43. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap +0 -49
  44. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap +0 -86
  45. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap +0 -75
  46. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap +0 -46
  47. data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/__snapshots__/FileDownload.test.js.snap +0 -26
  48. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterActions.test.js +0 -14
  49. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js +0 -28
  50. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterSelectors.test.js +0 -21
  51. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilter.test.js.snap +0 -21
  52. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterActions.test.js.snap +0 -17
  53. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterReducer.test.js.snap +0 -19
  54. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterSelectors.test.js.snap +0 -9
  55. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/integration.test.js.snap +0 -43
  56. data/webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/AdvancedSettingActions.test.js +0 -9
  57. data/webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/__snapshots__/AdvancedSettingActions.test.js.snap +0 -18
  58. data/webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/InventorySettingsActions.test.js +0 -14
  59. data/webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/__snapshots__/InventorySettingsActions.test.js.snap +0 -26
  60. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap +0 -68
  61. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorActions.test.js +0 -9
  62. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorActions.test.js.snap +0 -11
  63. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorButton.test.js.snap +0 -59
  64. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/__snapshots__/SettingsWarning.test.js.snap +0 -32
  65. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +0 -15
  66. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonSelectors.test.js.snap +0 -3
  67. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/integrations.test.js.snap +0 -58
  68. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/__snapshots__/ScheduledRun.test.js.snap +0 -23
  69. data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/__snapshots__/StatusChart.test.js.snap +0 -74
  70. data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/__snapshots__/TabContainer.test.js.snap +0 -18
  71. data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/__snapshots__/TabFooter.test.js.snap +0 -12
  72. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +0 -96
  73. data/webpack/ForemanInventoryUpload/__tests__/ForemanInventoryUpload.test.js +0 -10
  74. data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap +0 -5
  75. data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryUpload.test.js.snap +0 -14
@@ -1,15 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`SyncButton rendering render with Props 1`] = `
4
- <Fragment>
5
- <Button
6
- className="sync_button"
7
- isDisabled={false}
8
- onClick={[Function]}
9
- ouiaId="sync-button"
10
- variant="secondary"
11
- >
12
- Sync all inventory status
13
- </Button>
14
- </Fragment>
15
- `;
@@ -1,3 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`SyncButton selectors should return InventorySync status 1`] = `"PENDING"`;
@@ -1,58 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`SyncButton integration test Successful task was triggered on the server resulting in an info toast and polling on the task: handleSync was called 1`] = `
4
- Array [
5
- Array [
6
- Object {
7
- "payload": Object {
8
- "message": Object {
9
- "message": <Toast
10
- disconnectHosts={2}
11
- syncHosts={0}
12
- userOmittedHosts={1}
13
- />,
14
- "sticky": true,
15
- "type": "success",
16
- },
17
- },
18
- "type": "TOASTS_ADD",
19
- },
20
- ],
21
- Array [
22
- Object {
23
- "errorToast": [Function],
24
- "interval": 3000,
25
- "type": "API_GET",
26
- "url": "/foreman_tasks/api/tasks/1/details?include_permissions",
27
- },
28
- ],
29
- Array [
30
- Object {
31
- "payload": Object {
32
- "message": Object {
33
- "message": <span>
34
- Inventory sync has started:
35
- <br />
36
- <a
37
- href="/foreman_tasks/tasks/1"
38
- rel="noopener noreferrer"
39
- target="_blank"
40
- >
41
- view the task page for more details
42
- </a>
43
- </span>,
44
- "type": "info",
45
- },
46
- },
47
- "type": "TOASTS_ADD",
48
- },
49
- ],
50
- Array [
51
- Object {
52
- "errorToast": [Function],
53
- "type": "API_POST",
54
- "url": "/foreman_inventory_upload/tasks",
55
- },
56
- ],
57
- ]
58
- `;
@@ -1,23 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ScheduledRun rendering render with Props 1`] = `
4
- <Col
5
- bsClass="col"
6
- className="scheduled_run"
7
- componentClass="div"
8
- sm={12}
9
- >
10
- <p>
11
- <Icon
12
- name="calendar"
13
- type="fa"
14
- />
15
- Next run:
16
- <FormattedRelative
17
- updateInterval={10000}
18
- value="2019-08-21T16:14:16.520+03:00"
19
- />
20
- .
21
- </p>
22
- </Col>
23
- `;
@@ -1,74 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`StatusChart rendering render without Props 1`] = `
4
- <Col
5
- bsClass="col"
6
- componentClass="div"
7
- sm={4}
8
- >
9
- <div
10
- className="status-chart"
11
- >
12
- <DonutChart
13
- className="donut-chart-pf"
14
- color={
15
- Object {
16
- "pattern": Array [
17
- "#0088ce",
18
- "#d1d1d1",
19
- ],
20
- }
21
- }
22
- data={
23
- Object {
24
- "columns": Array [
25
- Array [
26
- "Completed",
27
- 0,
28
- ],
29
- Array [
30
- "Remain",
31
- 100,
32
- ],
33
- ],
34
- "order": null,
35
- }
36
- }
37
- donut={
38
- Object {
39
- "label": Object {
40
- "show": false,
41
- },
42
- "title": undefined,
43
- "width": 11,
44
- }
45
- }
46
- id="donut-chart-1"
47
- legend={
48
- Object {
49
- "show": false,
50
- }
51
- }
52
- size={
53
- Object {
54
- "height": 210,
55
- "width": 210,
56
- }
57
- }
58
- title={
59
- Object {
60
- "primary": "0%",
61
- "secondary": "Completed",
62
- "type": "percent",
63
- }
64
- }
65
- tooltip={
66
- Object {
67
- "contents": [Function],
68
- }
69
- }
70
- type="donut"
71
- />
72
- </div>
73
- </Col>
74
- `;
@@ -1,18 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`TabContainer rendering render without Props 1`] = `
4
- <div
5
- className=""
6
- >
7
- <Grid
8
- bsClass="container"
9
- componentClass="div"
10
- fluid={false}
11
- >
12
- <Col
13
- bsClass="col"
14
- componentClass="div"
15
- />
16
- </Grid>
17
- </div>
18
- `;
@@ -1,12 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`TabFooter rendering render without Props 1`] = `
4
- <Row
5
- bsClass="row"
6
- componentClass="div"
7
- >
8
- <div
9
- className="tab-footer"
10
- />
11
- </Row>
12
- `;
@@ -1,96 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`InventoryAutoUpload rendering render with props 1`] = `
4
- <FormGroup
5
- bsClass="form-group"
6
- >
7
- <Grid
8
- bsClass="container"
9
- componentClass="div"
10
- fluid={false}
11
- >
12
- <h3>
13
- Red Hat Cloud Inventory
14
- </h3>
15
- <hr />
16
- <Row
17
- bsClass="row"
18
- componentClass="div"
19
- >
20
- <Switcher
21
- SwitchCol={2}
22
- id="auto-upload"
23
- isChecked={true}
24
- label="Inventory Auto Upload"
25
- labelCol={5}
26
- onChange={[Function]}
27
- tooltip="Enable automatic upload of your hosts inventory to the Red Hat cloud"
28
- />
29
- <Col
30
- bsClass="col"
31
- componentClass="div"
32
- sm={5}
33
- >
34
- <Popover
35
- bodyContent={<InventorySettings />}
36
- headerContent={
37
- <strong>
38
- Advanced Inventory Settings
39
- </strong>
40
- }
41
- position="right"
42
- >
43
- <Button
44
- ouiaId="button-advanced-settings"
45
- style={
46
- Object {
47
- "fontSize": "small",
48
- "marginTop": "-4px",
49
- }
50
- }
51
- variant="secondary"
52
- >
53
- Show Advanced Settings
54
-
55
- <CaretRightIcon />
56
- </Button>
57
- </Popover>
58
- </Col>
59
- </Row>
60
- <br />
61
- <Row
62
- bsClass="row"
63
- componentClass="div"
64
- >
65
- <Col
66
- bsClass="col"
67
- componentClass="div"
68
- sm={12}
69
- >
70
- <Text
71
- component="p"
72
- ouiaId="text-more-details"
73
- >
74
- <InfoAltIcon />
75
-
76
- More details can be found in
77
-
78
- <Text
79
- component="a"
80
- href="/foreman_rh_cloud/inventory_upload"
81
- ouiaId="text-details-link"
82
- rel="noopener noreferrer"
83
- target="_blank"
84
- >
85
- <strong>
86
- Configure
87
- &gt;
88
- Inventory Upload
89
- </strong>
90
- </Text>
91
- </Text>
92
- </Col>
93
- </Row>
94
- </Grid>
95
- </FormGroup>
96
- `;
@@ -1,10 +0,0 @@
1
- import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
-
3
- import ForemanInventoryUpload from '../../ForemanInventoryUpload';
4
-
5
- const fixtures = {
6
- 'render without Props': {},
7
- };
8
-
9
- describe('ForemanInventoryUpload', () =>
10
- testComponentSnapshotsWithFixtures(ForemanInventoryUpload, fixtures));
@@ -1,5 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ForemanInventoryUpload helpers should return inventory Url 1`] = `"/foreman_inventory_upload/test_path"`;
4
-
5
- exports[`ForemanInventoryUpload helpers should return inventory docs url 1`] = `"/links/manual/?root_url=https%3A%2F%2Fdocs.redhat.com%2Fen%2Fdocumentation%2Fred_hat_lightspeed%2F1-latest%2Fhtml-single%2Fred_hat_lightspeed_remediations_guide%2Findex"`;
@@ -1,14 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ForemanInventoryUpload render without Props 1`] = `
4
- <div
5
- className="rh-cloud-inventory-page"
6
- >
7
- <PageLayout
8
- beforeToolbarComponent={<PageHeader />}
9
- searchable={false}
10
- >
11
- <Connect(AccountList) />
12
- </PageLayout>
13
- </div>
14
- `;