foreman_rh_cloud 13.2.11 → 14.0.1

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 (145) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_rh_cloud/locale/fr/foreman_rh_cloud.js +61 -61
  3. data/app/assets/javascripts/foreman_rh_cloud/locale/ja/foreman_rh_cloud.js +68 -68
  4. data/app/assets/javascripts/foreman_rh_cloud/locale/ka/foreman_rh_cloud.js +9 -9
  5. data/app/assets/javascripts/foreman_rh_cloud/locale/ko/foreman_rh_cloud.js +60 -60
  6. data/app/assets/javascripts/foreman_rh_cloud/locale/zh_CN/foreman_rh_cloud.js +60 -60
  7. data/app/controllers/concerns/insights_cloud/package_profile_upload_extensions.rb +0 -9
  8. data/app/controllers/insights_cloud/api/machine_telemetries_controller.rb +10 -13
  9. data/app/controllers/insights_cloud/ui_requests_controller.rb +7 -3
  10. data/app/models/concerns/rh_cloud_host.rb +4 -71
  11. data/app/models/insights_client_report_status.rb +1 -9
  12. data/app/models/inventory_sync/inventory_status.rb +4 -16
  13. data/app/services/foreman_rh_cloud/insights_api_forwarder.rb +5 -12
  14. data/app/services/foreman_rh_cloud/url_remediations_retriever.rb +5 -19
  15. data/lib/foreman_inventory_upload/async/create_missing_insights_facets.rb +2 -8
  16. data/lib/foreman_inventory_upload/async/upload_report_direct_job.rb +0 -2
  17. data/lib/foreman_inventory_upload/generators/fact_helpers.rb +4 -34
  18. data/lib/foreman_inventory_upload/generators/queries.rb +1 -1
  19. data/lib/foreman_inventory_upload/generators/slice.rb +1 -1
  20. data/lib/foreman_inventory_upload.rb +1 -8
  21. data/lib/foreman_rh_cloud/engine.rb +0 -1
  22. data/lib/foreman_rh_cloud/version.rb +1 -1
  23. data/lib/foreman_rh_cloud.rb +9 -36
  24. data/lib/insights_cloud/async/insights_generate_notifications.rb +1 -10
  25. data/lib/insights_cloud/async/vmaas_reposcan_sync.rb +8 -23
  26. data/lib/inventory_sync/async/inventory_full_sync.rb +3 -39
  27. data/lib/inventory_sync/async/inventory_self_host_sync.rb +2 -12
  28. data/locale/fr/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  29. data/locale/fr/foreman_rh_cloud.edit.po +1032 -0
  30. data/locale/fr/foreman_rh_cloud.po +65 -66
  31. data/locale/fr/foreman_rh_cloud.po.time_stamp +0 -0
  32. data/locale/ja/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  33. data/locale/ja/foreman_rh_cloud.edit.po +1026 -0
  34. data/locale/ja/foreman_rh_cloud.po +70 -72
  35. data/locale/ja/foreman_rh_cloud.po.time_stamp +0 -0
  36. data/locale/ka/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  37. data/locale/ka/foreman_rh_cloud.edit.po +1025 -0
  38. data/locale/ka/foreman_rh_cloud.po +10 -11
  39. data/locale/ka/foreman_rh_cloud.po.time_stamp +0 -0
  40. data/locale/ko/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  41. data/locale/ko/foreman_rh_cloud.edit.po +1029 -0
  42. data/locale/ko/foreman_rh_cloud.po +63 -64
  43. data/locale/ko/foreman_rh_cloud.po.time_stamp +0 -0
  44. data/locale/zh_CN/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  45. data/locale/zh_CN/foreman_rh_cloud.edit.po +1031 -0
  46. data/locale/zh_CN/foreman_rh_cloud.po +64 -65
  47. data/locale/zh_CN/foreman_rh_cloud.po.time_stamp +0 -0
  48. data/package.json +1 -1
  49. data/test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb +3 -57
  50. data/test/controllers/insights_cloud/ui_requests_controller_test.rb +2 -16
  51. data/test/jobs/insights_client_status_aging_test.rb +0 -40
  52. data/test/jobs/inventory_full_sync_test.rb +4 -219
  53. data/test/jobs/inventory_hosts_sync_test.rb +5 -7
  54. data/test/jobs/inventory_self_host_sync_test.rb +1 -10
  55. data/test/jobs/upload_report_direct_job_test.rb +0 -29
  56. data/test/models/insights_client_report_status_test.rb +0 -109
  57. data/test/unit/archived_report_generator_test.rb +1 -2
  58. data/test/unit/fact_helpers_test.rb +0 -16
  59. data/test/unit/foreman_rh_cloud_self_host_test.rb +2 -50
  60. data/test/unit/insights_facet_test.rb +0 -5
  61. data/test/unit/lib/insights_cloud/async/vmaas_reposcan_sync_test.rb +25 -80
  62. data/test/unit/metadata_generator_test.rb +1 -24
  63. data/test/unit/rh_cloud_host_test.rb +0 -282
  64. data/test/unit/services/foreman_rh_cloud/branch_info_test.rb +1 -1
  65. data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +1 -1
  66. data/test/unit/services/foreman_rh_cloud/url_remediations_retriever_test.rb +5 -82
  67. data/test/unit/slice_generator_test.rb +2 -21
  68. data/webpack/CVEsHostDetailsTab/CVEsHostDetailsTab.js +3 -30
  69. data/webpack/CVEsHostDetailsTab/__tests__/CVEsHostDetailsTab.test.js +10 -112
  70. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/EmptyResults.test.js +9 -10
  71. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/__snapshots__/EmptyResults.test.js.snap +18 -0
  72. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js +9 -13
  73. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/__snapshots__/EmptyState.test.js.snap +25 -0
  74. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js +9 -20
  75. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/__snapshots__/ErrorState.test.js.snap +20 -0
  76. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js +8 -31
  77. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap +47 -0
  78. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js +10 -26
  79. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap +59 -0
  80. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +9 -33
  81. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js +34 -0
  82. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js +14 -0
  83. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js +35 -55
  84. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js +25 -0
  85. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap +49 -0
  86. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap +86 -0
  87. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap +75 -0
  88. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap +46 -0
  89. data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js +9 -13
  90. data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/__snapshots__/FileDownload.test.js.snap +26 -0
  91. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilter.test.js +15 -12
  92. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterActions.test.js +14 -0
  93. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js +28 -0
  94. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterSelectors.test.js +21 -0
  95. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilter.test.js.snap +21 -0
  96. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterActions.test.js.snap +17 -0
  97. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterReducer.test.js.snap +19 -0
  98. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterSelectors.test.js.snap +9 -0
  99. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/integration.test.js.snap +43 -0
  100. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/integration.test.js +12 -32
  101. data/webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/AdvancedSettingActions.test.js +9 -0
  102. data/webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/__snapshots__/AdvancedSettingActions.test.js.snap +18 -0
  103. data/webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/InventorySettingsActions.test.js +14 -0
  104. data/webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/__snapshots__/InventorySettingsActions.test.js.snap +26 -0
  105. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageTitle.test.js +7 -15
  106. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap +68 -0
  107. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorActions.test.js +9 -0
  108. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorButton.test.js +18 -47
  109. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorActions.test.js.snap +11 -0
  110. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorButton.test.js.snap +59 -0
  111. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js +1 -3
  112. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/SettingsWarning.test.js +15 -58
  113. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/__snapshots__/SettingsWarning.test.js.snap +32 -0
  114. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonActions.js +2 -8
  115. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButton.test.js +9 -23
  116. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonSelectors.test.js +17 -19
  117. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +15 -0
  118. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonSelectors.test.js.snap +3 -0
  119. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/integrations.test.js.snap +57 -0
  120. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/integrations.test.js +36 -25
  121. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js +17 -43
  122. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js +8 -28
  123. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/__snapshots__/ScheduledRun.test.js.snap +23 -0
  124. data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js +8 -25
  125. data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/__snapshots__/StatusChart.test.js.snap +74 -0
  126. data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js +9 -11
  127. data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/__snapshots__/TabContainer.test.js.snap +18 -0
  128. data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js +9 -11
  129. data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/__snapshots__/TabFooter.test.js.snap +12 -0
  130. data/webpack/ForemanInventoryUpload/ForemanInventoryHelpers.js +1 -8
  131. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js +12 -33
  132. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +96 -0
  133. data/webpack/ForemanInventoryUpload/__tests__/ForemanInventoryHelpers.test.js +8 -36
  134. data/webpack/ForemanInventoryUpload/__tests__/ForemanInventoryUpload.test.js +10 -0
  135. data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap +5 -0
  136. data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryUpload.test.js.snap +14 -0
  137. data/webpack/ForemanRhCloudHelpers.js +0 -22
  138. data/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js +15 -71
  139. metadata +57 -18
  140. data/app/controllers/concerns/insights_cloud/candlepin_proxies_extensions.rb +0 -23
  141. data/test/controllers/insights_cloud/candlepin_proxies_extensions_test.rb +0 -70
  142. data/test/jobs/insights_generate_notifications_test.rb +0 -26
  143. data/test/models/inventory_sync/inventory_status_test.rb +0 -85
  144. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/__tests__/Toast.test.js +0 -82
  145. data/webpack/InsightsHostDetailsTab/__tests__/NewHostDetailsTab.test.js +0 -266
@@ -1,38 +1,10 @@
1
- jest.mock('foremanReact/common/helpers', () => ({
2
- getDocsURL: jest.fn(),
3
- }));
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
+ import { inventoryUrl, getInventoryDocsUrl } from '../ForemanInventoryHelpers';
4
3
 
5
- import { getDocsURL } from 'foremanReact/common/helpers';
6
- import { getInventoryDocsUrl, isExitCodeLoading } from '../ForemanInventoryHelpers';
4
+ const fixtures = {
5
+ 'should return inventory Url': () => inventoryUrl('test_path'),
6
+ 'should return inventory docs url': () => getInventoryDocsUrl(),
7
+ };
7
8
 
8
- describe('ForemanInventoryUpload helpers', () => {
9
- describe('getInventoryDocsUrl', () => {
10
- it('requests the Managing Hosts guide at the cloud connection chapter', () => {
11
- getInventoryDocsUrl();
12
- expect(getDocsURL).toHaveBeenCalledWith(
13
- 'Managing_Hosts',
14
- 'configuring-foreman-server-for-cloud-connection'
15
- );
16
- });
17
- });
18
-
19
- describe('isExitCodeLoading', () => {
20
- it('returns true when exit code contains "running"', () => {
21
- expect(isExitCodeLoading('currently running')).toBe(true);
22
- });
23
-
24
- it('returns true when exit code contains "restarting"', () => {
25
- expect(isExitCodeLoading('restarting now')).toBe(true);
26
- });
27
-
28
- it('is case-insensitive', () => {
29
- expect(isExitCodeLoading('RUNNING')).toBe(true);
30
- expect(isExitCodeLoading('Restarting')).toBe(true);
31
- });
32
-
33
- it('returns false when exit code contains neither', () => {
34
- expect(isExitCodeLoading('exit 0')).toBe(false);
35
- expect(isExitCodeLoading('completed')).toBe(false);
36
- });
37
- });
38
- });
9
+ describe('ForemanInventoryUpload helpers', () =>
10
+ testSelectorsSnapshotWithFixtures(fixtures));
@@ -0,0 +1,10 @@
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));
@@ -0,0 +1,5 @@
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"`;
@@ -0,0 +1,14 @@
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
+ `;
@@ -1,6 +1,3 @@
1
- import { useEffect } from 'react';
2
- import { useHistory } from 'react-router-dom';
3
-
4
1
  /**
5
2
  * copied from core, since it's not in the ReactApp folder,
6
3
  * it's complicated to import it and mock it in tests.
@@ -8,25 +5,6 @@ import { useHistory } from 'react-router-dom';
8
5
  */
9
6
  export const foremanUrl = path => `${window.URL_PREFIX}${path}`;
10
7
 
11
- export const OVERVIEW_TAB_PATH = '/Overview';
12
-
13
- /**
14
- * Redirects to Overview tab when the current tab should be hidden
15
- * @param {boolean} shouldRedirect - Whether to redirect (e.g., host loaded AND tab should hide)
16
- * @returns {boolean} - Returns shouldRedirect for convenience
17
- */
18
- export const useTabRedirect = shouldRedirect => {
19
- const history = useHistory();
20
-
21
- useEffect(() => {
22
- if (shouldRedirect && history) {
23
- history.replace(OVERVIEW_TAB_PATH);
24
- }
25
- }, [shouldRedirect, history]);
26
-
27
- return shouldRedirect;
28
- };
29
-
30
8
  export const isNotRhelHost = ({ hostDetails }) =>
31
9
  // This regex tries matches sane variations of "RedHat", "RHEL" and "RHCOS"
32
10
  !new RegExp('red[\\s\\-]?hat|rh[\\s\\-]?el|rhc[\\s\\-]?os', 'i').test(
@@ -25,11 +25,6 @@ import { useIopConfig } from '../common/Hooks/ConfigHooks';
25
25
  import { generateRuleUrl } from '../InsightsCloudSync/InsightsCloudSync';
26
26
  import { createProviderOptions } from '../common/ScalprumModule/ScalprumContext';
27
27
  import { useInsightsPermissions } from '../common/Hooks/PermissionsHooks';
28
- import {
29
- isNotRhelHost,
30
- hasNoInsightsFacet,
31
- useTabRedirect,
32
- } from '../ForemanRhCloudHelpers';
33
28
 
34
29
  // Hosted Insights advisor
35
30
  const NewHostDetailsTab = ({ hostName, router }) => {
@@ -38,28 +33,13 @@ const NewHostDetailsTab = ({ hostName, router }) => {
38
33
  const hits = useSelector(selectHits);
39
34
  const isIop = useIopConfig();
40
35
 
41
- useEffect(
42
- () => () => {
43
- // Preserve hash when clearing search params to prevent tab navigation bugs
44
- if (router && typeof router.replace === 'function') {
45
- const replaceOptions = { search: null };
46
- if (router.location && router.location.hash) {
47
- replaceOptions.hash = router.location.hash;
48
- }
49
- router.replace(replaceOptions);
50
- }
51
- },
52
- [router]
53
- );
36
+ useEffect(() => () => router.replace({ search: null }), [router]);
54
37
 
55
38
  const onSearch = q => dispatch(fetchInsights({ query: q, page: 1 }));
56
39
 
57
40
  const [isDropdownOpen, setIsDropdownOpen] = useState(false);
58
- const onSatInsightsClick = () => {
59
- if (router && typeof router.push === 'function') {
60
- router.push({ pathname: '/foreman_rh_cloud/insights_cloud' });
61
- }
62
- };
41
+ const onSatInsightsClick = () =>
42
+ router.push({ pathname: '/foreman_rh_cloud/insights_cloud' });
63
43
 
64
44
  const dropdownItems = [
65
45
  <DropdownItem key="insights-link" ouiaId="insights-link">
@@ -133,32 +113,17 @@ NewHostDetailsTab.defaultProps = {
133
113
  const scope = 'advisor';
134
114
  const module = './SystemDetailWrapped';
135
115
 
136
- const IopInsightsTab = props => {
137
- // eslint-disable-next-line camelcase
138
- const systemId = props.response?.subscription_facet_attributes?.uuid;
139
- return (
140
- <div className="advisor">
141
- <ScalprumComponent
142
- key={systemId || props.hostName}
143
- scope={scope}
144
- module={module}
145
- IopRemediationModal={RemediationModal}
146
- generateRuleUrl={generateRuleUrl}
147
- {...props}
148
- />
149
- </div>
150
- );
151
- };
152
-
153
- IopInsightsTab.propTypes = {
154
- hostName: PropTypes.string,
155
- response: PropTypes.object,
156
- };
157
-
158
- IopInsightsTab.defaultProps = {
159
- hostName: '',
160
- response: {},
161
- };
116
+ const IopInsightsTab = props => (
117
+ <div className="advisor">
118
+ <ScalprumComponent
119
+ scope={scope}
120
+ module={module}
121
+ IopRemediationModal={RemediationModal}
122
+ generateRuleUrl={generateRuleUrl}
123
+ {...props}
124
+ />
125
+ </div>
126
+ );
162
127
 
163
128
  const IopInsightsTabWrapped = props => {
164
129
  const permissions = useInsightsPermissions();
@@ -170,18 +135,7 @@ const IopInsightsTabWrapped = props => {
170
135
  };
171
136
 
172
137
  const InsightsTab = props => {
173
- const { response } = props;
174
138
  const isIop = useIopConfig();
175
- const isHostDataLoaded = Boolean(response?.id);
176
- const shouldHideTab = useTabRedirect(
177
- isHostDataLoaded &&
178
- (isNotRhelHost({ hostDetails: response }) ||
179
- hasNoInsightsFacet({ response, hostDetails: response }))
180
- );
181
-
182
- if (shouldHideTab) {
183
- return null;
184
- }
185
139
 
186
140
  return isIop ? (
187
141
  <IopInsightsTabWrapped {...props} />
@@ -190,16 +144,6 @@ const InsightsTab = props => {
190
144
  );
191
145
  };
192
146
 
193
- InsightsTab.propTypes = {
194
- response: PropTypes.shape({
195
- id: PropTypes.number,
196
- operatingsystem_name: PropTypes.string,
197
- insights_attributes: PropTypes.object,
198
- }),
199
- };
200
-
201
- InsightsTab.defaultProps = {
202
- response: {},
203
- };
147
+ InsightsTab.defaultProps = {};
204
148
 
205
149
  export default InsightsTab;
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.2.11
4
+ version: 14.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-02-25 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: foreman_ansible
@@ -30,9 +31,6 @@ dependencies:
30
31
  - - ">="
31
32
  - !ruby/object:Gem::Version
32
33
  version: 10.0.0
33
- - - "<"
34
- - !ruby/object:Gem::Version
35
- version: 13.0.0
36
34
  type: :runtime
37
35
  prerelease: false
38
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -40,9 +38,6 @@ dependencies:
40
38
  - - ">="
41
39
  - !ruby/object:Gem::Version
42
40
  version: 10.0.0
43
- - - "<"
44
- - !ruby/object:Gem::Version
45
- version: 13.0.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: katello
48
43
  requirement: !ruby/object:Gem::Requirement
@@ -107,7 +102,6 @@ files:
107
102
  - app/controllers/concerns/foreman_rh_cloud/iop_smart_proxy_access.rb
108
103
  - app/controllers/concerns/foreman_rh_cloud/registration_manager_extensions.rb
109
104
  - app/controllers/concerns/insights_cloud/candlepin_cache.rb
110
- - app/controllers/concerns/insights_cloud/candlepin_proxies_extensions.rb
111
105
  - app/controllers/concerns/insights_cloud/client_authentication.rb
112
106
  - app/controllers/concerns/insights_cloud/package_profile_upload_extensions.rb
113
107
  - app/controllers/concerns/inventory_upload/report_actions.rb
@@ -240,22 +234,31 @@ files:
240
234
  - locale/Makefile
241
235
  - locale/foreman_rh_cloud.pot
242
236
  - locale/fr/LC_MESSAGES/foreman_rh_cloud.mo
237
+ - locale/fr/foreman_rh_cloud.edit.po
243
238
  - locale/fr/foreman_rh_cloud.po
239
+ - locale/fr/foreman_rh_cloud.po.time_stamp
244
240
  - locale/gemspec.rb
245
241
  - locale/ja/LC_MESSAGES/foreman_rh_cloud.mo
242
+ - locale/ja/foreman_rh_cloud.edit.po
246
243
  - locale/ja/foreman_rh_cloud.po
244
+ - locale/ja/foreman_rh_cloud.po.time_stamp
247
245
  - locale/ka/LC_MESSAGES/foreman_rh_cloud.mo
246
+ - locale/ka/foreman_rh_cloud.edit.po
248
247
  - locale/ka/foreman_rh_cloud.po
248
+ - locale/ka/foreman_rh_cloud.po.time_stamp
249
249
  - locale/ko/LC_MESSAGES/foreman_rh_cloud.mo
250
+ - locale/ko/foreman_rh_cloud.edit.po
250
251
  - locale/ko/foreman_rh_cloud.po
252
+ - locale/ko/foreman_rh_cloud.po.time_stamp
251
253
  - locale/zh_CN/LC_MESSAGES/foreman_rh_cloud.mo
254
+ - locale/zh_CN/foreman_rh_cloud.edit.po
252
255
  - locale/zh_CN/foreman_rh_cloud.po
256
+ - locale/zh_CN/foreman_rh_cloud.po.time_stamp
253
257
  - package.json
254
258
  - test/controllers/accounts_controller_test.rb
255
259
  - test/controllers/insights_cloud/api/advisor_engine_controller_test.rb
256
260
  - test/controllers/insights_cloud/api/cloud_request_controller_test.rb
257
261
  - test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb
258
- - test/controllers/insights_cloud/candlepin_proxies_extensions_test.rb
259
262
  - test/controllers/insights_cloud/ui_requests_controller_test.rb
260
263
  - test/controllers/insights_sync/settings_controller_test.rb
261
264
  - test/controllers/inventory_upload/api/inventory_controller_test.rb
@@ -271,7 +274,6 @@ files:
271
274
  - test/jobs/host_inventory_report_job_test.rb
272
275
  - test/jobs/insights_client_status_aging_test.rb
273
276
  - test/jobs/insights_full_sync_test.rb
274
- - test/jobs/insights_generate_notifications_test.rb
275
277
  - test/jobs/insights_resolutions_sync_test.rb
276
278
  - test/jobs/insights_rules_sync_test.rb
277
279
  - test/jobs/inventory_full_sync_test.rb
@@ -283,7 +285,6 @@ files:
283
285
  - test/jobs/single_host_report_job_test.rb
284
286
  - test/jobs/upload_report_direct_job_test.rb
285
287
  - test/models/insights_client_report_status_test.rb
286
- - test/models/inventory_sync/inventory_status_test.rb
287
288
  - test/test_plugin_helper.rb
288
289
  - test/unit/archived_report_generator_test.rb
289
290
  - test/unit/fact_helpers_test.rb
@@ -328,33 +329,45 @@ files:
328
329
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountListSelectors.js
329
330
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/EmptyResults.js
330
331
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/EmptyResults.test.js
332
+ - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/__snapshots__/EmptyResults.test.js.snap
331
333
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/emptyResults.scss
332
334
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/index.js
333
335
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyState.fixtures.js
334
336
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyState.js
335
337
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyStateHelper.js
336
338
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js
339
+ - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/__snapshots__/EmptyState.test.js.snap
337
340
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/emptyState.scss
338
341
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/index.js
339
342
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/ErrorState.fixtures.js
340
343
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/ErrorState.js
341
344
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/ErrorStateHelper.js
342
345
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js
346
+ - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/__snapshots__/ErrorState.test.js.snap
343
347
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/errorState.scss
344
348
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/index.js
345
349
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.fixtures.js
346
350
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
347
351
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItemHelper.js
348
352
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js
353
+ - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap
349
354
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/index.js
350
355
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.fixtures.js
351
356
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
352
357
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatusHelper.js
353
358
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js
359
+ - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap
354
360
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/index.js
355
361
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js
362
+ - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
356
363
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListHelper.test.js
364
+ - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js
357
365
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js
366
+ - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js
367
+ - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap
368
+ - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap
369
+ - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap
370
+ - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap
358
371
  - webpack/ForemanInventoryUpload/Components/AccountList/accountList.scss
359
372
  - webpack/ForemanInventoryUpload/Components/AccountList/index.js
360
373
  - webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.fixtures.js
@@ -368,6 +381,7 @@ files:
368
381
  - webpack/ForemanInventoryUpload/Components/FileDownload/FileDownload.js
369
382
  - webpack/ForemanInventoryUpload/Components/FileDownload/FileDownloadHelper.js
370
383
  - webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js
384
+ - webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/__snapshots__/FileDownload.test.js.snap
371
385
  - webpack/ForemanInventoryUpload/Components/FileDownload/fileDownload.scss
372
386
  - webpack/ForemanInventoryUpload/Components/FileDownload/index.js
373
387
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/Components/ClearButton/ClearButton.js
@@ -379,11 +393,21 @@ files:
379
393
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterReducer.js
380
394
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterSelectors.js
381
395
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilter.test.js
396
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterActions.test.js
397
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
398
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterSelectors.test.js
399
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilter.test.js.snap
400
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterActions.test.js.snap
401
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterReducer.test.js.snap
402
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterSelectors.test.js.snap
403
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/integration.test.js.snap
382
404
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/integration.test.js
383
405
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/index.js
384
406
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss
385
407
  - webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/AdvancedSettingActions.js
386
408
  - webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/AdvancedSettingsConstants.js
409
+ - webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/AdvancedSettingActions.test.js
410
+ - webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/__snapshots__/AdvancedSettingActions.test.js.snap
387
411
  - webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/index.js
388
412
  - webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettings.js
389
413
  - webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettings.scss
@@ -391,6 +415,8 @@ files:
391
415
  - webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettingsConstants.js
392
416
  - webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettingsSelectors.js
393
417
  - webpack/ForemanInventoryUpload/Components/InventorySettings/MinimalInventoryDropdown.js
418
+ - webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/InventorySettingsActions.test.js
419
+ - webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/__snapshots__/InventorySettingsActions.test.js.snap
394
420
  - webpack/ForemanInventoryUpload/Components/InventorySettings/index.js
395
421
  - webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.fixtures.js
396
422
  - webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.js
@@ -403,11 +429,15 @@ files:
403
429
  - webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js
404
430
  - webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageHeader.test.js
405
431
  - webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageTitle.test.js
432
+ - webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap
406
433
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorActions.js
407
434
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorButton.js
408
435
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorConstants.js
409
436
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorSelectors.js
437
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorActions.test.js
410
438
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorButton.test.js
439
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorActions.test.js.snap
440
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorButton.test.js.snap
411
441
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/index.js
412
442
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js
413
443
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js
@@ -415,6 +445,7 @@ files:
415
445
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/index.js
416
446
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/SettingsWarning.js
417
447
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/SettingsWarning.test.js
448
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/__snapshots__/SettingsWarning.test.js.snap
418
449
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/index.js
419
450
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js
420
451
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonActions.js
@@ -423,9 +454,11 @@ files:
423
454
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButton.test.js
424
455
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonFixtures.js
425
456
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonSelectors.test.js
457
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap
458
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonSelectors.test.js.snap
459
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/integrations.test.js.snap
426
460
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/integrations.test.js
427
461
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
428
- - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/__tests__/Toast.test.js
429
462
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/index.js
430
463
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/ToolbarButtons.js
431
464
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/__tests__/ToolbarButtons.test.js
@@ -436,24 +469,28 @@ files:
436
469
  - webpack/ForemanInventoryUpload/Components/ScheduledRun/ScheduledRun.js
437
470
  - webpack/ForemanInventoryUpload/Components/ScheduledRun/ScheduledRunHelper.js
438
471
  - webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js
472
+ - webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/__snapshots__/ScheduledRun.test.js.snap
439
473
  - webpack/ForemanInventoryUpload/Components/ScheduledRun/index.js
440
474
  - webpack/ForemanInventoryUpload/Components/ScheduledRun/scheduledRun.scss
441
475
  - webpack/ForemanInventoryUpload/Components/StatusChart/StatusChart.fixtures.js
442
476
  - webpack/ForemanInventoryUpload/Components/StatusChart/StatusChart.js
443
477
  - webpack/ForemanInventoryUpload/Components/StatusChart/StatusChartHelper.js
444
478
  - webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js
479
+ - webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/__snapshots__/StatusChart.test.js.snap
445
480
  - webpack/ForemanInventoryUpload/Components/StatusChart/index.js
446
481
  - webpack/ForemanInventoryUpload/Components/StatusChart/statusChart.scss
447
482
  - webpack/ForemanInventoryUpload/Components/TabContainer/TabContainer.fixtures.js
448
483
  - webpack/ForemanInventoryUpload/Components/TabContainer/TabContainer.js
449
484
  - webpack/ForemanInventoryUpload/Components/TabContainer/TabContainerHelper.js
450
485
  - webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js
486
+ - webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/__snapshots__/TabContainer.test.js.snap
451
487
  - webpack/ForemanInventoryUpload/Components/TabContainer/index.js
452
488
  - webpack/ForemanInventoryUpload/Components/TabContainer/tabContainer.scss
453
489
  - webpack/ForemanInventoryUpload/Components/TabFooter/TabFooter.fixtures.js
454
490
  - webpack/ForemanInventoryUpload/Components/TabFooter/TabFooter.js
455
491
  - webpack/ForemanInventoryUpload/Components/TabFooter/TabFooterHelper.js
456
492
  - webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js
493
+ - webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/__snapshots__/TabFooter.test.js.snap
457
494
  - webpack/ForemanInventoryUpload/Components/TabFooter/index.js
458
495
  - webpack/ForemanInventoryUpload/Components/TabFooter/tabFooter.scss
459
496
  - webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.fixtures.js
@@ -474,8 +511,12 @@ files:
474
511
  - webpack/ForemanInventoryUpload/ForemanInventoryUploadReducers.js
475
512
  - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js
476
513
  - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js
514
+ - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap
477
515
  - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/index.js
478
516
  - webpack/ForemanInventoryUpload/__tests__/ForemanInventoryHelpers.test.js
517
+ - webpack/ForemanInventoryUpload/__tests__/ForemanInventoryUpload.test.js
518
+ - webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap
519
+ - webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryUpload.test.js.snap
479
520
  - webpack/ForemanInventoryUpload/index.js
480
521
  - webpack/ForemanRhCloudFills.js
481
522
  - webpack/ForemanRhCloudHelpers.js
@@ -556,7 +597,6 @@ files:
556
597
  - webpack/InsightsHostDetailsTab/__tests__/InsightsTabReducer.test.js
557
598
  - webpack/InsightsHostDetailsTab/__tests__/InsightsTabSelectors.test.js
558
599
  - webpack/InsightsHostDetailsTab/__tests__/InsightsTotalRiskChart.test.js
559
- - webpack/InsightsHostDetailsTab/__tests__/NewHostDetailsTab.test.js
560
600
  - webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTab.test.js.snap
561
601
  - webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabActions.test.js.snap
562
602
  - webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabReducer.test.js.snap
@@ -622,6 +662,7 @@ homepage: https://github.com/theforeman/foreman_rh_cloud
622
662
  licenses:
623
663
  - GPL-3.0
624
664
  metadata: {}
665
+ post_install_message:
625
666
  rdoc_options: []
626
667
  require_paths:
627
668
  - lib
@@ -639,7 +680,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
639
680
  - !ruby/object:Gem::Version
640
681
  version: '0'
641
682
  requirements: []
642
- rubygems_version: 4.0.16
683
+ rubygems_version: 3.2.33
684
+ signing_key:
643
685
  specification_version: 4
644
686
  summary: Summary of ForemanRhCloud.
645
687
  test_files:
@@ -647,7 +689,6 @@ test_files:
647
689
  - test/controllers/insights_cloud/api/advisor_engine_controller_test.rb
648
690
  - test/controllers/insights_cloud/api/cloud_request_controller_test.rb
649
691
  - test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb
650
- - test/controllers/insights_cloud/candlepin_proxies_extensions_test.rb
651
692
  - test/controllers/insights_cloud/ui_requests_controller_test.rb
652
693
  - test/controllers/insights_sync/settings_controller_test.rb
653
694
  - test/controllers/inventory_upload/api/inventory_controller_test.rb
@@ -663,7 +704,6 @@ test_files:
663
704
  - test/jobs/host_inventory_report_job_test.rb
664
705
  - test/jobs/insights_client_status_aging_test.rb
665
706
  - test/jobs/insights_full_sync_test.rb
666
- - test/jobs/insights_generate_notifications_test.rb
667
707
  - test/jobs/insights_resolutions_sync_test.rb
668
708
  - test/jobs/insights_rules_sync_test.rb
669
709
  - test/jobs/inventory_full_sync_test.rb
@@ -675,7 +715,6 @@ test_files:
675
715
  - test/jobs/single_host_report_job_test.rb
676
716
  - test/jobs/upload_report_direct_job_test.rb
677
717
  - test/models/insights_client_report_status_test.rb
678
- - test/models/inventory_sync/inventory_status_test.rb
679
718
  - test/test_plugin_helper.rb
680
719
  - test/unit/archived_report_generator_test.rb
681
720
  - test/unit/fact_helpers_test.rb
@@ -1,23 +0,0 @@
1
- module InsightsCloud
2
- module CandlepinProxiesExtensions
3
- extend ActiveSupport::Concern
4
-
5
- included do
6
- # Update insights client status when hosts check in via subscription-manager facts upload
7
- # rubocop:disable Rails/LexicallyScopedActionFilter
8
- after_action :update_insights_client_status, only: [:facts]
9
- # rubocop:enable Rails/LexicallyScopedActionFilter
10
- end
11
-
12
- def update_insights_client_status
13
- # Update InsightsClientReportStatus whenever host checks in via subscription-manager
14
- # This ensures USER_OMITTED status gets set even when insights-client isn't installed
15
- # (parameter=false means insights-client won't be installed, so it won't hit MachineTelemetriesController)
16
- hoststatus = @host.get_status(InsightsClientReportStatus)
17
- Rails.logger.debug "Current status: #{hoststatus.to_label}"
18
- @host.get_status(InsightsClientReportStatus).refresh!
19
- @host.refresh_global_status!
20
- Rails.logger.debug "New status: #{hoststatus.to_label}"
21
- end
22
- end
23
- end
@@ -1,70 +0,0 @@
1
- require 'test_plugin_helper'
2
-
3
- module InsightsCloud
4
- class CandlepinProxiesExtensionsTest < ActiveSupport::TestCase
5
- setup do
6
- @organization = FactoryBot.create(:organization)
7
- @host = FactoryBot.create(:host, :with_subscription, :managed, organization: @organization)
8
- end
9
-
10
- test 'updates InsightsClientReportStatus to USER_OMITTED when parameter is false' do
11
- # Set parameter to false so status should be USER_OMITTED
12
- FactoryBot.create(:common_parameter, name: 'host_registration_insights', key_type: 'boolean', value: false)
13
-
14
- # Simulate what the callback does
15
- @host.get_status(InsightsClientReportStatus).refresh!
16
- @host.refresh_global_status!
17
-
18
- # Verify the status was updated
19
- @host.reload
20
- insights_status = @host.get_status(InsightsClientReportStatus)
21
- assert insights_status.persisted?, 'InsightsClientReportStatus should be persisted'
22
- assert_equal InsightsClientReportStatus::USER_OMITTED, insights_status.status,
23
- 'Status should be USER_OMITTED when host_registration_insights=false'
24
- end
25
-
26
- test 'sets USER_OMITTED status when parameter is inherited from hostgroup' do
27
- # Create hostgroup with parameter
28
- hostgroup = FactoryBot.create(:hostgroup)
29
- hostgroup.group_parameters << GroupParameter.create(
30
- name: 'host_registration_insights',
31
- value: 'false',
32
- key_type: 'boolean'
33
- )
34
- hostgroup.save!
35
-
36
- @host.hostgroup = hostgroup
37
- @host.save!
38
-
39
- # Simulate what the callback does
40
- @host.get_status(InsightsClientReportStatus).refresh!
41
- @host.refresh_global_status!
42
-
43
- # Verify status respects inherited parameter
44
- @host.reload
45
- insights_status = @host.get_status(InsightsClientReportStatus)
46
- assert_equal InsightsClientReportStatus::USER_OMITTED, insights_status.status,
47
- 'Status should be USER_OMITTED when host_registration_insights=false is inherited from hostgroup'
48
- end
49
-
50
- test 'refreshes global status' do
51
- FactoryBot.create(:common_parameter, name: 'host_registration_insights', key_type: 'boolean', value: true)
52
-
53
- # Simulate what the callback does
54
- @host.get_status(InsightsClientReportStatus).refresh!
55
- @host.refresh_global_status!
56
-
57
- # Verify global status was updated
58
- @host.reload
59
- assert_not_nil @host.global_status, 'Global status should be set'
60
- end
61
-
62
- test 'CandlepinProxiesController includes the update_insights_client_status method' do
63
- # Verify the concern is included and method is available
64
- controller = Katello::Api::Rhsm::CandlepinProxiesController.new
65
-
66
- assert_respond_to controller, :update_insights_client_status,
67
- 'CandlepinProxiesController should have update_insights_client_status method from concern'
68
- end
69
- end
70
- end