foreman_rh_cloud 14.1.2 → 14.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/foreman_inventory_upload/generators/fact_helpers.rb +26 -4
- data/lib/foreman_inventory_upload.rb +8 -1
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/lib/foreman_rh_cloud.rb +36 -9
- data/lib/insights_cloud/async/insights_generate_notifications.rb +10 -1
- data/lib/inventory_sync/async/inventory_self_host_sync.rb +12 -2
- data/package.json +1 -1
- data/test/jobs/insights_generate_notifications_test.rb +26 -0
- data/test/jobs/inventory_self_host_sync_test.rb +9 -0
- data/test/unit/foreman_rh_cloud_self_host_test.rb +50 -2
- data/test/unit/metadata_generator_test.rb +24 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/EmptyResults.test.js +10 -9
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js +13 -9
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js +20 -9
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js +31 -8
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js +26 -10
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +33 -9
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js +55 -35
- data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js +13 -9
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilter.test.js +12 -15
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/integration.test.js +32 -12
- data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageTitle.test.js +14 -7
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorButton.test.js +47 -18
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/SettingsWarning.test.js +58 -15
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButton.test.js +23 -9
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonSelectors.test.js +19 -17
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/integrations.test.js +25 -37
- data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js +28 -8
- data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js +25 -8
- data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js +11 -9
- data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js +11 -9
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js +33 -12
- data/webpack/ForemanInventoryUpload/__tests__/ForemanInventoryHelpers.test.js +21 -8
- data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsActions.test.js +61 -47
- data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/InsightsTable.test.js +48 -4
- data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/InsightsTableActions.test.js +126 -35
- data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/InsightsTableSelectors.test.js +90 -24
- data/webpack/InsightsCloudSync/InsightsCloudSync.test.js +79 -21
- data/webpack/InsightsCloudSync/__tests__/InsightsCloudSyncActions.test.js +31 -6
- data/webpack/InsightsHostDetailsTab/__tests__/InsightsTab.test.js +42 -9
- data/webpack/__tests__/ForemanRhCloudHelpers.test.js +91 -53
- data/webpack/common/Switcher/__tests__/HelpLabel.test.js +25 -10
- data/webpack/common/Switcher/__tests__/SwitcherPF4.test.js +41 -10
- metadata +3 -67
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/__snapshots__/EmptyResults.test.js.snap +0 -18
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/__snapshots__/EmptyState.test.js.snap +0 -25
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/__snapshots__/ErrorState.test.js.snap +0 -20
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap +0 -47
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap +0 -59
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js +0 -34
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js +0 -14
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js +0 -25
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap +0 -49
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap +0 -86
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap +0 -75
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap +0 -46
- data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/__snapshots__/FileDownload.test.js.snap +0 -26
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterActions.test.js +0 -14
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js +0 -28
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterSelectors.test.js +0 -21
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilter.test.js.snap +0 -21
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterActions.test.js.snap +0 -17
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterReducer.test.js.snap +0 -19
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterSelectors.test.js.snap +0 -9
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/integration.test.js.snap +0 -43
- data/webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/AdvancedSettingActions.test.js +0 -9
- data/webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/__snapshots__/AdvancedSettingActions.test.js.snap +0 -18
- data/webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/InventorySettingsActions.test.js +0 -14
- data/webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/__snapshots__/InventorySettingsActions.test.js.snap +0 -26
- data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap +0 -68
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorActions.test.js +0 -9
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorActions.test.js.snap +0 -11
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorButton.test.js.snap +0 -59
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/__snapshots__/SettingsWarning.test.js.snap +0 -32
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +0 -15
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonSelectors.test.js.snap +0 -3
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/integrations.test.js.snap +0 -58
- data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/__snapshots__/ScheduledRun.test.js.snap +0 -23
- data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/__snapshots__/StatusChart.test.js.snap +0 -74
- data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/__snapshots__/TabContainer.test.js.snap +0 -18
- data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/__snapshots__/TabFooter.test.js.snap +0 -12
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +0 -96
- data/webpack/ForemanInventoryUpload/__tests__/ForemanInventoryUpload.test.js +0 -10
- data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap +0 -5
- data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryUpload.test.js.snap +0 -14
- data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsReducer.test.js +0 -33
- data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsSelectors.test.js +0 -21
- data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsActions.test.js.snap +0 -65
- data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsReducer.test.js.snap +0 -19
- data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsSelectors.test.js.snap +0 -9
- data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/__snapshots__/InsightsTableActions.test.js.snap +0 -131
- data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/__snapshots__/InsightsTableSelectors.test.js.snap +0 -87
- data/webpack/InsightsCloudSync/__snapshots__/InsightsCloudSync.test.js.snap +0 -10
- data/webpack/InsightsCloudSync/__tests__/InsightsCloudSyncHelpers.test.js +0 -9
- data/webpack/InsightsCloudSync/__tests__/__snapshots__/InsightsCloudSyncActions.test.js.snap +0 -15
- data/webpack/InsightsCloudSync/__tests__/__snapshots__/InsightsCloudSyncHelpers.test.js.snap +0 -3
- data/webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js +0 -19
- data/webpack/InsightsHostDetailsTab/__tests__/InsightsTabReducer.test.js +0 -26
- data/webpack/InsightsHostDetailsTab/__tests__/InsightsTabSelectors.test.js +0 -13
- data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTab.test.js.snap +0 -34
- data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabActions.test.js.snap +0 -56
- data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabReducer.test.js.snap +0 -32
- data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabSelectors.test.js.snap +0 -18
- data/webpack/__tests__/ForemanRhCloudSelectors.test.js +0 -22
- data/webpack/__tests__/ForemanRhCloudTestHelpers.test.js +0 -20
- data/webpack/__tests__/__snapshots__/ForemanRhCloudHelpers.test.js.snap +0 -19
- data/webpack/__tests__/__snapshots__/ForemanRhCloudSelectors.test.js.snap +0 -25
- data/webpack/__tests__/__snapshots__/ForemanRhCloudTestHelpers.test.js.snap +0 -39
- data/webpack/common/Switcher/__tests__/__snapshots__/HelpLabel.test.js.snap +0 -16
- data/webpack/common/Switcher/__tests__/__snapshots__/SwitcherPF4.test.js.snap +0 -24
|
@@ -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,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
|
-
>
|
|
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));
|
data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap
DELETED
|
@@ -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"`;
|
data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryUpload.test.js.snap
DELETED
|
@@ -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
|
-
`;
|
data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsReducer.test.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { testReducerSnapshotWithFixtures } from '@theforeman/test';
|
|
2
|
-
import reducer from '../InsightsSettingsReducer';
|
|
3
|
-
import {
|
|
4
|
-
INSIGHTS_SYNC_SETTING_SET,
|
|
5
|
-
INSIGHTS_SYNC_SETTINGS_GET_SUCCESS,
|
|
6
|
-
} from '../InsightsSettingsConstants';
|
|
7
|
-
|
|
8
|
-
const fixtures = {
|
|
9
|
-
'should return the initial state': {},
|
|
10
|
-
'should handle INSIGHTS_SYNC_SETTINGS_GET_SUCCESS': {
|
|
11
|
-
action: {
|
|
12
|
-
type: INSIGHTS_SYNC_SETTINGS_GET_SUCCESS,
|
|
13
|
-
payload: {
|
|
14
|
-
settings: {
|
|
15
|
-
insightsSyncEnabled: true,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
'should handle INSIGHTS_SYNC_SETTING_SET': {
|
|
21
|
-
action: {
|
|
22
|
-
type: INSIGHTS_SYNC_SETTING_SET,
|
|
23
|
-
payload: {
|
|
24
|
-
settings: {
|
|
25
|
-
insightsSyncEnabled: true,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
describe('InsightsSettings reducer', () =>
|
|
33
|
-
testReducerSnapshotWithFixtures(reducer, fixtures));
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
|
|
2
|
-
import {
|
|
3
|
-
selectSettings,
|
|
4
|
-
selectInsightsSyncEnabled,
|
|
5
|
-
} from '../InsightsSettingsSelectors';
|
|
6
|
-
import { insightsStateWrapper } from '../../../../ForemanRhCloudTestHelpers';
|
|
7
|
-
|
|
8
|
-
const state = insightsStateWrapper({
|
|
9
|
-
settings: {
|
|
10
|
-
insightsSyncEnabled: true,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const fixtures = {
|
|
15
|
-
'should return insights sync settings': () => selectSettings(state),
|
|
16
|
-
'should return insightsSyncEnabled setting': () =>
|
|
17
|
-
selectInsightsSyncEnabled(state),
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
describe('InsightsSettings selectors', () =>
|
|
21
|
-
testSelectorsSnapshotWithFixtures(fixtures));
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`InsightsSettings actions should generate INSIGHTS_SYNC_SETTING_SET action 1`] = `
|
|
4
|
-
Array [
|
|
5
|
-
Array [
|
|
6
|
-
Object {
|
|
7
|
-
"payload": Object {
|
|
8
|
-
"settings": Object {
|
|
9
|
-
"insightsSyncEnabled": true,
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
"type": "INSIGHTS_SYNC_SETTING_SET",
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
]
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
exports[`InsightsSettings actions should generate INSIGHTS_SYNC_SETTINGS_GET_SUCCESS action 1`] = `
|
|
19
|
-
Array [
|
|
20
|
-
Array [
|
|
21
|
-
Object {
|
|
22
|
-
"payload": Object {
|
|
23
|
-
"settings": Object {
|
|
24
|
-
"insightsSyncEnabled": true,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
"type": "INSIGHTS_SYNC_SETTINGS_GET_SUCCESS",
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
]
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
exports[`InsightsSettings actions should handle getInsightsSyncSettings with error 1`] = `
|
|
34
|
-
Array [
|
|
35
|
-
Array [
|
|
36
|
-
Object {
|
|
37
|
-
"payload": Object {
|
|
38
|
-
"message": Object {
|
|
39
|
-
"message": "Network error!",
|
|
40
|
-
"sticky": true,
|
|
41
|
-
"type": "error",
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
"type": "TOASTS_ADD",
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
]
|
|
48
|
-
`;
|
|
49
|
-
|
|
50
|
-
exports[`InsightsSettings actions should handle setInsightsSyncEnabled with error 1`] = `
|
|
51
|
-
Array [
|
|
52
|
-
Array [
|
|
53
|
-
Object {
|
|
54
|
-
"payload": Object {
|
|
55
|
-
"message": Object {
|
|
56
|
-
"message": "Network error!",
|
|
57
|
-
"sticky": true,
|
|
58
|
-
"type": "error",
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
"type": "TOASTS_ADD",
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
]
|
|
65
|
-
`;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`InsightsSettings reducer should handle INSIGHTS_SYNC_SETTING_SET 1`] = `
|
|
4
|
-
Object {
|
|
5
|
-
"insightsSyncEnabled": true,
|
|
6
|
-
}
|
|
7
|
-
`;
|
|
8
|
-
|
|
9
|
-
exports[`InsightsSettings reducer should handle INSIGHTS_SYNC_SETTINGS_GET_SUCCESS 1`] = `
|
|
10
|
-
Object {
|
|
11
|
-
"insightsSyncEnabled": true,
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
exports[`InsightsSettings reducer should return the initial state 1`] = `
|
|
16
|
-
Object {
|
|
17
|
-
"insightsSyncEnabled": false,
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`InsightsSettings selectors should return insights sync settings 1`] = `
|
|
4
|
-
Object {
|
|
5
|
-
"insightsSyncEnabled": true,
|
|
6
|
-
}
|
|
7
|
-
`;
|
|
8
|
-
|
|
9
|
-
exports[`InsightsSettings selectors should return insightsSyncEnabled setting 1`] = `true`;
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`insights table actions should clearAllSelection 1`] = `
|
|
4
|
-
Array [
|
|
5
|
-
Array [
|
|
6
|
-
Object {
|
|
7
|
-
"payload": Object {
|
|
8
|
-
"selectedIds": Object {},
|
|
9
|
-
},
|
|
10
|
-
"type": "INSIGHTS_SET_SELECTED_IDS",
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
Array [
|
|
14
|
-
Object {
|
|
15
|
-
"payload": Object {
|
|
16
|
-
"showSelectAllAlert": false,
|
|
17
|
-
},
|
|
18
|
-
"type": "INSIGHTS_SET_SELECT_ALL_ALERT",
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
Array [
|
|
22
|
-
[Function],
|
|
23
|
-
],
|
|
24
|
-
]
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
exports[`insights table actions should fetchInsights 1`] = `
|
|
28
|
-
Array [
|
|
29
|
-
Array [
|
|
30
|
-
Object {
|
|
31
|
-
"payload": Object {
|
|
32
|
-
"args": Array [
|
|
33
|
-
Object {
|
|
34
|
-
"search": "?page=2&per_page=7&search=&sort_by=&sort_order=&select_all=true",
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
"method": "push",
|
|
38
|
-
},
|
|
39
|
-
"type": "@@router/CALL_HISTORY_METHOD",
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
Array [
|
|
43
|
-
Object {
|
|
44
|
-
"payload": Object {
|
|
45
|
-
"selectedIds": Object {
|
|
46
|
-
"16": true,
|
|
47
|
-
"17": true,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
"type": "INSIGHTS_SET_SELECTED_IDS",
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
Array [
|
|
54
|
-
Object {
|
|
55
|
-
"payload": Object {
|
|
56
|
-
"showSelectAllAlert": true,
|
|
57
|
-
},
|
|
58
|
-
"type": "INSIGHTS_SET_SELECT_ALL_ALERT",
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
Array [
|
|
62
|
-
[Function],
|
|
63
|
-
],
|
|
64
|
-
Array [
|
|
65
|
-
Object {
|
|
66
|
-
"key": "INSIGHTS_HITS",
|
|
67
|
-
"params": Object {
|
|
68
|
-
"order": " ",
|
|
69
|
-
"page": 2,
|
|
70
|
-
"per_page": 7,
|
|
71
|
-
"search": "",
|
|
72
|
-
},
|
|
73
|
-
"type": "get",
|
|
74
|
-
"url": "/insights_cloud/hits",
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
]
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
exports[`insights table actions should selectAll 1`] = `
|
|
81
|
-
Array [
|
|
82
|
-
Array [
|
|
83
|
-
[Function],
|
|
84
|
-
],
|
|
85
|
-
Array [
|
|
86
|
-
Object {
|
|
87
|
-
"payload": Object {
|
|
88
|
-
"isAllSelected": true,
|
|
89
|
-
},
|
|
90
|
-
"type": "INSIGHTS_SET_SELECT_ALL",
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
]
|
|
94
|
-
`;
|
|
95
|
-
|
|
96
|
-
exports[`insights table actions should selectByIds 1`] = `
|
|
97
|
-
Object {
|
|
98
|
-
"payload": Object {
|
|
99
|
-
"selectedIds": Object {
|
|
100
|
-
"1": true,
|
|
101
|
-
"5": true,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
"type": "INSIGHTS_SET_SELECTED_IDS",
|
|
105
|
-
}
|
|
106
|
-
`;
|
|
107
|
-
|
|
108
|
-
exports[`insights table actions should setSelectAll false 1`] = `
|
|
109
|
-
Array [
|
|
110
|
-
Array [
|
|
111
|
-
[Function],
|
|
112
|
-
],
|
|
113
|
-
Array [
|
|
114
|
-
Object {
|
|
115
|
-
"payload": Object {
|
|
116
|
-
"isAllSelected": false,
|
|
117
|
-
},
|
|
118
|
-
"type": "INSIGHTS_SET_SELECT_ALL",
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
]
|
|
122
|
-
`;
|
|
123
|
-
|
|
124
|
-
exports[`insights table actions should setSelectAllAlert true 1`] = `
|
|
125
|
-
Object {
|
|
126
|
-
"payload": Object {
|
|
127
|
-
"showSelectAllAlert": true,
|
|
128
|
-
},
|
|
129
|
-
"type": "INSIGHTS_SET_SELECT_ALL_ALERT",
|
|
130
|
-
}
|
|
131
|
-
`;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`InsightsTable selectors should return API error 1`] = `"Request failed with status code 503"`;
|
|
4
|
-
|
|
5
|
-
exports[`InsightsTable selectors should return API hits 1`] = `
|
|
6
|
-
Array [
|
|
7
|
-
Object {
|
|
8
|
-
"host_id": 1,
|
|
9
|
-
"hostname": "foo.example.com",
|
|
10
|
-
"id": 16,
|
|
11
|
-
"last_seen": "2020-11-01T15:55:14.280+02:00",
|
|
12
|
-
"likelihood": 1,
|
|
13
|
-
"publish_date": "2017-11-02T14:00:00.000+02:00",
|
|
14
|
-
"results_url": "https://cloud.redhat.com/insights/advisor/recommendations/hardening_yum%7CHARDENING_YUM_GPG_3RD_6/716306d2-b4f8-446f-82c8-a45af30110bd/",
|
|
15
|
-
"solution_url": "",
|
|
16
|
-
"title": "Decreased security: Yum GPG verification disabled",
|
|
17
|
-
"total_risk": 1,
|
|
18
|
-
},
|
|
19
|
-
Object {
|
|
20
|
-
"host_id": 1,
|
|
21
|
-
"hostname": "foo.example.com",
|
|
22
|
-
"id": 17,
|
|
23
|
-
"last_seen": "2020-11-01T15:55:14.280+02:00",
|
|
24
|
-
"likelihood": 3,
|
|
25
|
-
"publish_date": "2019-07-12T02:08:00.000+03:00",
|
|
26
|
-
"results_url": "https://cloud.redhat.com/insights/advisor/recommendations/packages_across_major_release%7CPACKAGES_ACROSS_MAJOR_RELEASE/716306d2-b4f8-446f-82c8-a45af30110bd/",
|
|
27
|
-
"solution_url": "https://access.redhat.com/node/54483",
|
|
28
|
-
"title": "Installation of packages across major releases is not supported",
|
|
29
|
-
"total_risk": 2,
|
|
30
|
-
},
|
|
31
|
-
]
|
|
32
|
-
`;
|
|
33
|
-
|
|
34
|
-
exports[`InsightsTable selectors should return API item count 1`] = `2`;
|
|
35
|
-
|
|
36
|
-
exports[`InsightsTable selectors should return API status 1`] = `"RESOLVED"`;
|
|
37
|
-
|
|
38
|
-
exports[`InsightsTable selectors should return insights isAllSelected 1`] = `false`;
|
|
39
|
-
|
|
40
|
-
exports[`InsightsTable selectors should return insights selectedIds 1`] = `
|
|
41
|
-
Object {
|
|
42
|
-
"51": true,
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
|
|
46
|
-
exports[`InsightsTable selectors should return insights showSelectAllAlert 1`] = `true`;
|
|
47
|
-
|
|
48
|
-
exports[`InsightsTable selectors should return insights table 1`] = `
|
|
49
|
-
Object {
|
|
50
|
-
"isAllSelected": false,
|
|
51
|
-
"selectedIds": Object {
|
|
52
|
-
"51": true,
|
|
53
|
-
},
|
|
54
|
-
"showSelectAllAlert": true,
|
|
55
|
-
}
|
|
56
|
-
`;
|
|
57
|
-
|
|
58
|
-
exports[`InsightsTable selectors should return queryParams 1`] = `
|
|
59
|
-
Object {
|
|
60
|
-
"isSelectAll": false,
|
|
61
|
-
"page": 1,
|
|
62
|
-
"perPage": 7,
|
|
63
|
-
"query": "total_risk < 3",
|
|
64
|
-
"sortBy": "total_risk",
|
|
65
|
-
"sortOrder": "asc",
|
|
66
|
-
}
|
|
67
|
-
`;
|
|
68
|
-
|
|
69
|
-
exports[`InsightsTable selectors should return router page 1`] = `1`;
|
|
70
|
-
|
|
71
|
-
exports[`InsightsTable selectors should return router perPage 1`] = `7`;
|
|
72
|
-
|
|
73
|
-
exports[`InsightsTable selectors should return router query 1`] = `
|
|
74
|
-
Object {
|
|
75
|
-
"page": "1",
|
|
76
|
-
"per_page": "7",
|
|
77
|
-
"search": "total_risk+%3C+3",
|
|
78
|
-
"sort_by": "total_risk",
|
|
79
|
-
"sort_order": "asc",
|
|
80
|
-
}
|
|
81
|
-
`;
|
|
82
|
-
|
|
83
|
-
exports[`InsightsTable selectors should return router search 1`] = `"total_risk < 3"`;
|
|
84
|
-
|
|
85
|
-
exports[`InsightsTable selectors should return router sort by 1`] = `"total_risk"`;
|
|
86
|
-
|
|
87
|
-
exports[`InsightsTable selectors should return router sort order 1`] = `"asc"`;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
|
|
2
|
-
import { insightsCloudUrl } from '../InsightsCloudSyncHelpers';
|
|
3
|
-
|
|
4
|
-
const fixtures = {
|
|
5
|
-
'should return insights cloud Url': () => insightsCloudUrl('test_path'),
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
describe('InsightsCloudSync helpers', () =>
|
|
9
|
-
testSelectorsSnapshotWithFixtures(fixtures));
|
data/webpack/InsightsCloudSync/__tests__/__snapshots__/InsightsCloudSyncActions.test.js.snap
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Insights cloud sync actions should syncInsights 1`] = `
|
|
4
|
-
Array [
|
|
5
|
-
Array [
|
|
6
|
-
Object {
|
|
7
|
-
"errorToast": [Function],
|
|
8
|
-
"handleSuccess": [Function],
|
|
9
|
-
"key": "INSIGHTS_CLOUD_SYNC",
|
|
10
|
-
"type": "post-some-type",
|
|
11
|
-
"url": "/insights_cloud/tasks",
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
]
|
|
15
|
-
`;
|