foreman_rh_cloud 2.0.18.1 → 3.0.14

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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -13
  3. data/app/controllers/foreman_inventory_upload/accounts_controller.rb +2 -2
  4. data/app/controllers/foreman_inventory_upload/uploads_controller.rb +8 -1
  5. data/app/helpers/foreman_inventory_upload_host_helper.rb +1 -8
  6. data/app/models/setting/rh_cloud.rb +5 -5
  7. data/lib/foreman_inventory_upload.rb +2 -3
  8. data/lib/foreman_inventory_upload/generators/archived_report.rb +1 -1
  9. data/lib/foreman_inventory_upload/generators/json_stream.rb +1 -1
  10. data/lib/foreman_inventory_upload/generators/slice.rb +3 -3
  11. data/lib/foreman_rh_cloud/engine.rb +4 -2
  12. data/lib/foreman_rh_cloud/version.rb +1 -1
  13. data/lib/tasks/rh_cloud_inventory.rake +0 -23
  14. data/package.json +1 -1
  15. data/test/controllers/accounts_controller_test.rb +1 -1
  16. data/test/unit/slice_generator_test.rb +4 -30
  17. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.fixtures.js +3 -3
  18. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.js +7 -7
  19. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js +6 -6
  20. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.fixtures.js +1 -10
  21. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js +7 -7
  22. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap +8 -11
  23. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListHelper.test.js +3 -3
  24. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap +6 -6
  25. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap +3 -3
  26. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap +3 -3
  27. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap +6 -6
  28. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js +1 -1
  29. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/__snapshots__/AutoUploadSwitcher.test.js.snap +1 -1
  30. data/webpack/ForemanInventoryUpload/Components/Dashboard/DashboardActions.js +1 -1
  31. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardActions.test.js +4 -4
  32. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js +92 -0
  33. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js +17 -0
  34. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +106 -0
  35. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/components/AdvancedSettings/AdvancedSettings.js +60 -0
  36. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/components/AdvancedSettings/index.js +28 -0
  37. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/index.js +22 -0
  38. data/webpack/ForemanRhCloudFills.js +23 -0
  39. data/webpack/ForemanRhCloudPages.js +6 -1
  40. data/webpack/ForemanRhCloudReducers.js +10 -1
  41. data/webpack/InsightsHostDetailsTab/InsightsTab.js +5 -7
  42. data/webpack/InsightsHostDetailsTab/__tests__/InsightsTab.fixtures.js +12 -14
  43. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabActions.test.js.snap +10 -12
  44. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabReducer.test.js.snap +10 -12
  45. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabSelectors.test.js.snap +10 -12
  46. data/webpack/__mocks__/foremanReact/common/MountingService.js +1 -0
  47. data/webpack/common/Switcher/index.js +79 -0
  48. data/webpack/global_index.js +5 -0
  49. data/webpack/index.js +4 -14
  50. metadata +25 -21
  51. data/config/Gemfile.lock.gh_test +0 -817
  52. data/config/database.yml.example +0 -17
  53. data/config/package-lock.json.gh_test +0 -36317
  54. data/db/migrate/20210307000001_add_unique_to_insights_facet.foreman_rh_cloud.rb +0 -11
  55. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/SubscriptionsPageExtensionActions.js +0 -34
  56. data/webpack/subscriptions_extension_index.js +0 -8
@@ -0,0 +1,60 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Grid } from 'patternfly-react';
4
+ import { translate as __ } from 'foremanReact/common/I18n';
5
+ import Switcher from '../../../../../common/Switcher';
6
+
7
+ const AdvancedSettings = ({
8
+ hostObfuscationEnabled,
9
+ hostObfuscationToggle,
10
+ ipsObfuscationEnabled,
11
+ ipsObfuscationToggle,
12
+ excludePackagesEnabled,
13
+ excludePackagesToggle,
14
+ }) => (
15
+ <form style={{ padding: '5px' }}>
16
+ <Grid.Row>
17
+ <Switcher
18
+ id="obfuscate-hostnames"
19
+ label={__('Obfuscate host names')}
20
+ tooltip={__('Obfuscate host names sent to the Red Hat cloud')}
21
+ isChecked={hostObfuscationEnabled}
22
+ onChange={() => hostObfuscationToggle(hostObfuscationEnabled)}
23
+ labelCol={8}
24
+ />
25
+ </Grid.Row>
26
+ <Grid.Row>
27
+ <Switcher
28
+ id="obfuscate-ip"
29
+ label={__('Obfuscate IPs')}
30
+ tooltip={__('Obfuscate ipv4 addresses sent to the Red Hat cloud')}
31
+ isChecked={ipsObfuscationEnabled}
32
+ onChange={() => ipsObfuscationToggle(ipsObfuscationEnabled)}
33
+ labelCol={8}
34
+ />
35
+ </Grid.Row>
36
+ <Grid.Row>
37
+ <Switcher
38
+ id="exclude-packages"
39
+ label={__('Exclude packages')}
40
+ tooltip={__(
41
+ 'Exclude packages from being uploaded to the Red Hat cloud'
42
+ )}
43
+ isChecked={excludePackagesEnabled}
44
+ onChange={() => excludePackagesToggle(excludePackagesEnabled)}
45
+ labelCol={8}
46
+ />
47
+ </Grid.Row>
48
+ </form>
49
+ );
50
+
51
+ AdvancedSettings.propTypes = {
52
+ hostObfuscationEnabled: PropTypes.bool.isRequired,
53
+ hostObfuscationToggle: PropTypes.func.isRequired,
54
+ ipsObfuscationEnabled: PropTypes.bool.isRequired,
55
+ ipsObfuscationToggle: PropTypes.func.isRequired,
56
+ excludePackagesEnabled: PropTypes.bool.isRequired,
57
+ excludePackagesToggle: PropTypes.func.isRequired,
58
+ };
59
+
60
+ export default AdvancedSettings;
@@ -0,0 +1,28 @@
1
+ import { bindActionCreators } from 'redux';
2
+ import { connect } from 'react-redux';
3
+ import { handleToggle as hostObfuscationToggle } from '../../../../Components/HostObfuscationSwitcher/HostObfuscationSwitcherActions';
4
+ import { handleToggle as ipsObfuscationToggle } from '../../../../Components/IpsObfuscationSwitcher/IpsObfuscationSwitcherActions';
5
+ import { handleToggle as excludePackagesToggle } from '../../../../Components/ExcludePackagesSwitcher/ExcludePackagesSwitcherActions';
6
+ import AdvancedSettings from './AdvancedSettings';
7
+ import {
8
+ selectExcludePackages,
9
+ selectHostObfuscationEnabled,
10
+ selectIpsObfuscationEnabled,
11
+ } from '../../../../Components/AccountList/AccountListSelectors';
12
+
13
+ // map state to props
14
+ const mapStateToProps = state => ({
15
+ hostObfuscationEnabled: selectHostObfuscationEnabled(state),
16
+ ipsObfuscationEnabled: selectIpsObfuscationEnabled(state),
17
+ excludePackagesEnabled: selectExcludePackages(state),
18
+ });
19
+
20
+ // map action dispatchers to props
21
+ const mapDispatchToProps = dispatch =>
22
+ bindActionCreators(
23
+ { hostObfuscationToggle, ipsObfuscationToggle, excludePackagesToggle },
24
+ dispatch
25
+ );
26
+
27
+ // export connected component
28
+ export default connect(mapStateToProps, mapDispatchToProps)(AdvancedSettings);
@@ -0,0 +1,22 @@
1
+ import { bindActionCreators } from 'redux';
2
+ import { connect } from 'react-redux';
3
+
4
+ import * as actions from '../../Components/AutoUploadSwitcher/AutoUploadSwitcherActions';
5
+ import InventoryAutoUpload from './InventoryAutoUpload';
6
+ import { selectAutoUploadEnabled } from '../../Components/AccountList/AccountListSelectors';
7
+ import { fetchAccountsStatus as fetchSettings } from '../../Components/AccountList/AccountListActions';
8
+
9
+ // map state to props
10
+ const mapStateToProps = state => ({
11
+ autoUploadEnabled: selectAutoUploadEnabled(state),
12
+ });
13
+
14
+ // map action dispatchers to props
15
+ const mapDispatchToProps = dispatch =>
16
+ bindActionCreators({ ...actions, fetchSettings }, dispatch);
17
+
18
+ // export connected component
19
+ export default connect(
20
+ mapStateToProps,
21
+ mapDispatchToProps
22
+ )(InventoryAutoUpload);
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
3
+ import InventoryAutoUploadSwitcher from './ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload';
4
+
5
+ const fills = [
6
+ {
7
+ slot: 'katello-manage-manifest-form',
8
+ name: 'InventoryAutoUpload',
9
+ component: () => <InventoryAutoUploadSwitcher />,
10
+ weight: 50,
11
+ },
12
+ ];
13
+
14
+ export const registerFills = () => {
15
+ fills.forEach(({ slot, name, component: Component, weight }, index) =>
16
+ addGlobalFill(
17
+ slot,
18
+ name,
19
+ <Component key={`rh-cloud-fill-${index}`} />,
20
+ weight
21
+ )
22
+ );
23
+ };
@@ -1,9 +1,14 @@
1
+ import componentRegistry from 'foremanReact/components/componentRegistry';
1
2
  import ForemanInventoryUpload from './ForemanInventoryUpload';
2
3
  import InsightsCloudSync from './InsightsCloudSync';
3
4
  import InsightsHostDetailsTab from './InsightsHostDetailsTab';
4
5
 
5
- export default [
6
+ const pages = [
6
7
  { name: 'ForemanInventoryUpload', type: ForemanInventoryUpload },
7
8
  { name: 'InsightsCloudSync', type: InsightsCloudSync },
8
9
  { name: 'InsightsHostDetailsTab', type: InsightsHostDetailsTab },
9
10
  ];
11
+
12
+ export const registerPages = () => {
13
+ pages.forEach(page => componentRegistry.register(page));
14
+ };
@@ -1,12 +1,21 @@
1
1
  import { combineReducers } from 'redux';
2
+ import { registerReducer } from 'foremanReact/common/MountingService';
2
3
  import inventoryUploadReducers from './ForemanInventoryUpload/ForemanInventoryUploadReducers';
3
4
  import insightsReducers from './InsightsCloudSync/InsightsCloudSyncReducers';
4
5
  import { hostInsightsReducers } from './InsightsHostDetailsTab';
5
6
 
6
- export default {
7
+ const reducers = {
7
8
  ForemanRhCloud: combineReducers({
8
9
  ...inventoryUploadReducers,
9
10
  ...insightsReducers,
10
11
  ...hostInsightsReducers,
11
12
  }),
12
13
  };
14
+
15
+ export default reducers;
16
+
17
+ export const registerReducers = () => {
18
+ Object.entries(reducers).forEach(([key, reducer]) =>
19
+ registerReducer(key, reducer)
20
+ );
21
+ };
@@ -17,16 +17,14 @@ class InsightsHostDetailsTab extends React.Component {
17
17
  if (!hits.length) {
18
18
  return <h2>No recommendations were found for this host!</h2>;
19
19
  }
20
- const hitsSorted = orderBy(hits, ['insights_hit.total_risk'], ['desc']);
20
+ const hitsSorted = orderBy(hits, ['total_risk'], ['desc']);
21
21
  const items = hitsSorted.map(
22
22
  (
23
23
  {
24
- insights_hit: {
25
- title,
26
- total_risk: totalRisk,
27
- results_url: resultsUrl,
28
- solution_url: solutionUrl,
29
- },
24
+ title,
25
+ total_risk: totalRisk,
26
+ results_url: resultsUrl,
27
+ solution_url: solutionUrl,
30
28
  },
31
29
  index
32
30
  ) => (
@@ -2,20 +2,18 @@ export const hostID = 1234;
2
2
 
3
3
  export const hits = [
4
4
  {
5
- insights_hit: {
6
- hostname: 'my-host.example.com',
7
- rhel_version: '7.8',
8
- uuid: '4739b323-a343-4e89-b71b-81991b8dc656',
9
- last_seen: '2020-08-19T04:43:09.068706Z',
10
- title:
11
- 'New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled',
12
- solution_url: 'https://access.redhat.com/node/3359651',
13
- total_risk: 2,
14
- likelihood: 2,
15
- publish_date: '2018-04-16T10:03:16Z',
16
- results_url:
17
- 'https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/',
18
- },
5
+ hostname: 'my-host.example.com',
6
+ rhel_version: '7.8',
7
+ uuid: '4739b323-a343-4e89-b71b-81991b8dc656',
8
+ last_seen: '2020-08-19T04:43:09.068706Z',
9
+ title:
10
+ 'New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled',
11
+ solution_url: 'https://access.redhat.com/node/3359651',
12
+ total_risk: 2,
13
+ likelihood: 2,
14
+ publish_date: '2018-04-16T10:03:16Z',
15
+ results_url:
16
+ 'https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/',
19
17
  },
20
18
  ];
21
19
 
@@ -13,18 +13,16 @@ Array [
13
13
  "payload": Object {
14
14
  "hits": Array [
15
15
  Object {
16
- "insights_hit": Object {
17
- "hostname": "my-host.example.com",
18
- "last_seen": "2020-08-19T04:43:09.068706Z",
19
- "likelihood": 2,
20
- "publish_date": "2018-04-16T10:03:16Z",
21
- "results_url": "https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/",
22
- "rhel_version": "7.8",
23
- "solution_url": "https://access.redhat.com/node/3359651",
24
- "title": "New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled",
25
- "total_risk": 2,
26
- "uuid": "4739b323-a343-4e89-b71b-81991b8dc656",
27
- },
16
+ "hostname": "my-host.example.com",
17
+ "last_seen": "2020-08-19T04:43:09.068706Z",
18
+ "likelihood": 2,
19
+ "publish_date": "2018-04-16T10:03:16Z",
20
+ "results_url": "https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/",
21
+ "rhel_version": "7.8",
22
+ "solution_url": "https://access.redhat.com/node/3359651",
23
+ "title": "New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled",
24
+ "total_risk": 2,
25
+ "uuid": "4739b323-a343-4e89-b71b-81991b8dc656",
28
26
  },
29
27
  ],
30
28
  },
@@ -10,18 +10,16 @@ exports[`AccountList reducer should handle INSIGHTS_HITS_SUCCESS 1`] = `
10
10
  Object {
11
11
  "hits": Array [
12
12
  Object {
13
- "insights_hit": Object {
14
- "hostname": "my-host.example.com",
15
- "last_seen": "2020-08-19T04:43:09.068706Z",
16
- "likelihood": 2,
17
- "publish_date": "2018-04-16T10:03:16Z",
18
- "results_url": "https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/",
19
- "rhel_version": "7.8",
20
- "solution_url": "https://access.redhat.com/node/3359651",
21
- "title": "New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled",
22
- "total_risk": 2,
23
- "uuid": "4739b323-a343-4e89-b71b-81991b8dc656",
24
- },
13
+ "hostname": "my-host.example.com",
14
+ "last_seen": "2020-08-19T04:43:09.068706Z",
15
+ "likelihood": 2,
16
+ "publish_date": "2018-04-16T10:03:16Z",
17
+ "results_url": "https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/",
18
+ "rhel_version": "7.8",
19
+ "solution_url": "https://access.redhat.com/node/3359651",
20
+ "title": "New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled",
21
+ "total_risk": 2,
22
+ "uuid": "4739b323-a343-4e89-b71b-81991b8dc656",
25
23
  },
26
24
  ],
27
25
  }
@@ -3,18 +3,16 @@
3
3
  exports[`InsightsTab selectors should return hits 1`] = `
4
4
  Array [
5
5
  Object {
6
- "insights_hit": Object {
7
- "hostname": "my-host.example.com",
8
- "last_seen": "2020-08-19T04:43:09.068706Z",
9
- "likelihood": 2,
10
- "publish_date": "2018-04-16T10:03:16Z",
11
- "results_url": "https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/",
12
- "rhel_version": "7.8",
13
- "solution_url": "https://access.redhat.com/node/3359651",
14
- "title": "New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled",
15
- "total_risk": 2,
16
- "uuid": "4739b323-a343-4e89-b71b-81991b8dc656",
17
- },
6
+ "hostname": "my-host.example.com",
7
+ "last_seen": "2020-08-19T04:43:09.068706Z",
8
+ "likelihood": 2,
9
+ "publish_date": "2018-04-16T10:03:16Z",
10
+ "results_url": "https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/",
11
+ "rhel_version": "7.8",
12
+ "solution_url": "https://access.redhat.com/node/3359651",
13
+ "title": "New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled",
14
+ "total_risk": 2,
15
+ "uuid": "4739b323-a343-4e89-b71b-81991b8dc656",
18
16
  },
19
17
  ]
20
18
  `;
@@ -0,0 +1 @@
1
+ export const registerReducer = jest.fn;
@@ -0,0 +1,79 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Switch, Level, LevelItem } from '@patternfly/react-core';
4
+ import {
5
+ OverlayTrigger,
6
+ Tooltip,
7
+ Icon,
8
+ Grid,
9
+ ControlLabel,
10
+ noop,
11
+ } from 'patternfly-react';
12
+
13
+ const Switcher = ({
14
+ id,
15
+ label,
16
+ tooltip,
17
+ isChecked,
18
+ onChange,
19
+ labelCol = 5,
20
+ SwitchCol = 2,
21
+ }) => (
22
+ <React.Fragment>
23
+ <Grid.Col sm={labelCol}>
24
+ <ControlLabel className="control-label" style={{ paddingTop: '0' }}>
25
+ <Level>
26
+ <LevelItem>
27
+ <span className={`rh-cloud-switcher-${id}-label`}>{label}</span>
28
+ </LevelItem>
29
+ <LevelItem>
30
+ <OverlayTrigger
31
+ overlay={
32
+ <Tooltip
33
+ id={`rh-cloud-switcher-${id}-tooltip`}
34
+ style={{ zIndex: 10000 }}
35
+ >
36
+ {tooltip}
37
+ </Tooltip>
38
+ }
39
+ placement="bottom"
40
+ trigger={['hover', 'focus']}
41
+ rootClose={false}
42
+ >
43
+ <Icon type="pf" name="info" />
44
+ </OverlayTrigger>
45
+ </LevelItem>
46
+ </Level>
47
+ </ControlLabel>
48
+ </Grid.Col>
49
+ <Grid.Col sm={SwitchCol} style={{ marginBottom: '5px' }}>
50
+ <Switch
51
+ id={`rh-cloud-switcher-${id}`}
52
+ isChecked={isChecked}
53
+ onChange={onChange}
54
+ label=" "
55
+ />
56
+ </Grid.Col>
57
+ </React.Fragment>
58
+ );
59
+
60
+ Switcher.propTypes = {
61
+ id: PropTypes.string.isRequired,
62
+ label: PropTypes.string,
63
+ tooltip: PropTypes.string,
64
+ isChecked: PropTypes.bool,
65
+ onChange: PropTypes.func,
66
+ labelCol: PropTypes.number,
67
+ SwitchCol: PropTypes.number,
68
+ };
69
+
70
+ Switcher.defaultProps = {
71
+ label: null,
72
+ tooltip: null,
73
+ isChecked: true,
74
+ onChange: noop,
75
+ labelCol: 5,
76
+ SwitchCol: 2,
77
+ };
78
+
79
+ export default Switcher;
@@ -0,0 +1,5 @@
1
+ import { registerReducers } from './ForemanRhCloudReducers';
2
+ import { registerFills } from './ForemanRhCloudFills';
3
+
4
+ registerReducers();
5
+ registerFills();
data/webpack/index.js CHANGED
@@ -1,15 +1,5 @@
1
- /* eslint import/no-unresolved: [2, { ignore: [foremanReact/*] }] */
2
- /* eslint-disable import/no-extraneous-dependencies */
3
- /* eslint-disable import/extensions */
4
- import componentRegistry from 'foremanReact/components/componentRegistry';
5
- import { registerReducer } from 'foremanReact/common/MountingService';
6
- import reducers from './ForemanRhCloudReducers';
7
- import pages from './ForemanRhCloudPages';
1
+ import { registerReducers } from './ForemanRhCloudReducers';
2
+ import { registerPages } from './ForemanRhCloudPages';
8
3
 
9
- // register reducers
10
- Object.entries(reducers).forEach(([key, reducer]) =>
11
- registerReducer(key, reducer)
12
- );
13
-
14
- // register components
15
- pages.forEach(page => componentRegistry.register(page));
4
+ registerReducers();
5
+ registerPages();
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.18.1
4
+ version: 3.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2020-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello
@@ -125,16 +125,12 @@ files:
125
125
  - app/views/foreman_rh_cloud/react/inventory_upload.html.erb
126
126
  - app/views/hosts/_insights_tab.html.erb
127
127
  - app/views/layouts/foreman_rh_cloud/application.html.erb
128
- - config/Gemfile.lock.gh_test
129
- - config/database.yml.example
130
- - config/package-lock.json.gh_test
131
128
  - config/routes.rb
132
129
  - db/migrate/20191215104806_create_insights_hits.foreman_inventory_upload.rb
133
130
  - db/migrate/20191216062008_create_insights_facets.foreman_inventory_upload.rb
134
131
  - db/migrate/20200727111529_add_uuid_column_to_insights_facets.foreman_rh_cloud.rb
135
132
  - db/migrate/20201007115752_add_hits_count_to_insights_facets_table.foreman_rh_cloud.rb
136
133
  - db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
137
- - db/migrate/20210307000001_add_unique_to_insights_facet.foreman_rh_cloud.rb
138
134
  - lib/foreman_inventory_upload.rb
139
135
  - lib/foreman_inventory_upload/async/async_helpers.rb
140
136
  - lib/foreman_inventory_upload/async/generate_all_reports_job.rb
@@ -450,12 +446,18 @@ files:
450
446
  - webpack/ForemanInventoryUpload/ForemanInventoryHelpers.js
451
447
  - webpack/ForemanInventoryUpload/ForemanInventoryUpload.js
452
448
  - webpack/ForemanInventoryUpload/ForemanInventoryUploadReducers.js
453
- - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/SubscriptionsPageExtensionActions.js
449
+ - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js
450
+ - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js
451
+ - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap
452
+ - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/components/AdvancedSettings/AdvancedSettings.js
453
+ - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/components/AdvancedSettings/index.js
454
+ - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/index.js
454
455
  - webpack/ForemanInventoryUpload/__tests__/ForemanInventoryHelpers.test.js
455
456
  - webpack/ForemanInventoryUpload/__tests__/ForemanInventoryUpload.test.js
456
457
  - webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap
457
458
  - webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryUpload.test.js.snap
458
459
  - webpack/ForemanInventoryUpload/index.js
460
+ - webpack/ForemanRhCloudFills.js
459
461
  - webpack/ForemanRhCloudHelpers.js
460
462
  - webpack/ForemanRhCloudPages.js
461
463
  - webpack/ForemanRhCloudReducers.js
@@ -513,6 +515,7 @@ files:
513
515
  - webpack/InsightsHostDetailsTab/index.js
514
516
  - webpack/__mocks__/foremanReact/API.js
515
517
  - webpack/__mocks__/foremanReact/common/I18n.js
518
+ - webpack/__mocks__/foremanReact/common/MountingService.js
516
519
  - webpack/__mocks__/foremanReact/common/helpers.js
517
520
  - webpack/__mocks__/foremanReact/components/Layout/LayoutConstants.js
518
521
  - webpack/__mocks__/foremanReact/constants.js
@@ -523,13 +526,14 @@ files:
523
526
  - webpack/__tests__/__snapshots__/ForemanRhCloudHelpers.test.js.snap
524
527
  - webpack/__tests__/__snapshots__/ForemanRhCloudSelectors.test.js.snap
525
528
  - webpack/__tests__/__snapshots__/ForemanRhCloudTestHelpers.test.js.snap
529
+ - webpack/common/Switcher/index.js
530
+ - webpack/global_index.js
526
531
  - webpack/index.js
527
- - webpack/subscriptions_extension_index.js
528
532
  homepage: https://github.com/theforeman/foreman_rh_cloud
529
533
  licenses:
530
534
  - GPL-3.0
531
535
  metadata: {}
532
- post_install_message:
536
+ post_install_message:
533
537
  rdoc_options: []
534
538
  require_paths:
535
539
  - lib
@@ -544,25 +548,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
544
548
  - !ruby/object:Gem::Version
545
549
  version: '0'
546
550
  requirements: []
547
- rubygems_version: 3.0.6
548
- signing_key:
551
+ rubygems_version: 3.1.4
552
+ signing_key:
549
553
  specification_version: 4
550
554
  summary: Summary of ForemanRhCloud.
551
555
  test_files:
552
- - test/controllers/uploads_controller_test.rb
553
- - test/controllers/insights_sync/settings_controller_test.rb
554
556
  - test/controllers/accounts_controller_test.rb
557
+ - test/controllers/insights_sync/settings_controller_test.rb
555
558
  - test/controllers/reports_controller_test.rb
556
- - test/test_plugin_helper.rb
557
- - test/jobs/upload_report_job_test.rb
559
+ - test/controllers/uploads_controller_test.rb
560
+ - test/factories/insights_factories.rb
561
+ - test/factories/inventory_upload_factories.rb
558
562
  - test/jobs/insights_full_sync_test.rb
559
563
  - test/jobs/inventory_full_sync_test.rb
560
- - test/factories/inventory_upload_factories.rb
561
- - test/factories/insights_factories.rb
562
- - test/unit/shell_process_job_test.rb
564
+ - test/jobs/upload_report_job_test.rb
565
+ - test/test_plugin_helper.rb
566
+ - test/unit/archived_report_generator_test.rb
563
567
  - test/unit/metadata_generator_test.rb
568
+ - test/unit/shell_process_job_test.rb
569
+ - test/unit/fact_helpers_test.rb
564
570
  - test/unit/insights_facet_test.rb
565
571
  - test/unit/rh_cloud_http_proxy_test.rb
566
- - test/unit/fact_helpers_test.rb
567
- - test/unit/archived_report_generator_test.rb
568
572
  - test/unit/slice_generator_test.rb