foreman_rh_cloud 11.0.3 → 11.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/controllers/api/v2/advisor_engine/advisor_engine_controller.rb +98 -0
- data/app/controllers/api/v2/rh_cloud/advisor_engine_config_controller.rb +16 -0
- data/app/models/concerns/rh_cloud_host.rb +5 -0
- data/app/services/foreman_rh_cloud/cloud_connector.rb +1 -1
- data/app/services/foreman_rh_cloud/cloud_request.rb +1 -1
- data/app/services/foreman_rh_cloud/hits_uploader.rb +55 -0
- data/app/views/api/v2/advisor_engine/host_details.json.rabl +9 -0
- data/app/views/api/v2/hosts/insights/base.rabl +5 -0
- data/app/views/api/v2/hosts/insights/insights.rabl +3 -0
- data/config/routes.rb +6 -1
- data/db/migrate/20241217190624_add_unique_index_to_rule_id_and_host_id_in_insights_hits.rb +5 -0
- data/db/migrate/20241220184900_change_sync_insights_recommendations_to_true.rb +5 -0
- data/lib/foreman_inventory_upload/async/generate_all_reports_job.rb +21 -13
- data/lib/foreman_inventory_upload/async/upload_report_job.rb +1 -1
- data/lib/foreman_inventory_upload/generators/slice.rb +1 -1
- data/lib/foreman_rh_cloud/engine.rb +24 -5
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/lib/foreman_rh_cloud.rb +21 -31
- data/lib/insights_cloud/async/insights_scheduled_sync.rb +10 -2
- data/lib/inventory_sync/async/inventory_full_sync.rb +0 -10
- data/lib/inventory_sync/async/inventory_scheduled_sync.rb +15 -7
- data/package.json +1 -1
- data/test/controllers/insights_cloud/api/advisor_engine_controller_test.rb +48 -0
- data/test/controllers/insights_sync/settings_controller_test.rb +3 -0
- data/test/factories/insights_factories.rb +1 -1
- data/test/jobs/inventory_scheduled_sync_test.rb +10 -0
- data/test/unit/rh_cloud_http_proxy_test.rb +1 -26
- data/test/unit/services/foreman_rh_cloud/hits_uploader_test.rb +120 -0
- data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap +1 -1
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorButton.js +2 -2
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorButton.test.js.snap +2 -2
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js +3 -1
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/__tests__/__snapshots__/PageDescription.test.js.snap +1 -1
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +1 -1
- data/webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js +1 -1
- data/webpack/ForemanInventoryUpload/ForemanInventoryConstants.js +1 -1
- data/webpack/ForemanInventoryUpload/ForemanInventoryHelpers.js +1 -1
- data/webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js +26 -22
- data/webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsActions.js +2 -1
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js +10 -1
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableConstants.js +8 -1
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableHelpers.js +3 -1
- data/webpack/InsightsCloudSync/Components/ToolbarDropdown.js +5 -0
- data/webpack/InsightsCloudSync/InsightsCloudSync.js +1 -2
- data/webpack/InsightsCloudSync/__snapshots__/InsightsCloudSync.test.js.snap +1 -1
- data/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js +3 -1
- data/webpack/__mocks__/foremanReact/common/hooks/API/APIHooks.js +3 -0
- data/webpack/common/Hooks/ConfigHooks.js +19 -0
- metadata +17 -9
- data/webpack/InsightsCloudSync/Components/InsightsHeader/InsightsHeader.scss +0 -8
- data/webpack/InsightsCloudSync/Components/InsightsHeader/index.js +0 -16
- data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettings.test.js +0 -18
- data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettings.test.js.snap +0 -15
- data/webpack/InsightsCloudSync/Components/__tests__/InsightsHeader.test.js +0 -10
- data/webpack/InsightsCloudSync/Components/__tests__/__snapshots__/InsightsHeader.test.js.snap +0 -13
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: 11.0
|
4
|
+
version: 11.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Red Hat Cloud team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman_ansible
|
@@ -95,6 +95,8 @@ files:
|
|
95
95
|
- app/assets/javascripts/foreman_rh_cloud/locale/ja/foreman_rh_cloud.js
|
96
96
|
- app/assets/javascripts/foreman_rh_cloud/locale/ka/foreman_rh_cloud.js
|
97
97
|
- app/assets/javascripts/foreman_rh_cloud/locale/zh_CN/foreman_rh_cloud.js
|
98
|
+
- app/controllers/api/v2/advisor_engine/advisor_engine_controller.rb
|
99
|
+
- app/controllers/api/v2/rh_cloud/advisor_engine_config_controller.rb
|
98
100
|
- app/controllers/api/v2/rh_cloud/cloud_request_controller.rb
|
99
101
|
- app/controllers/api/v2/rh_cloud/inventory_controller.rb
|
100
102
|
- app/controllers/concerns/insights_cloud/candlepin_cache.rb
|
@@ -134,10 +136,14 @@ files:
|
|
134
136
|
- app/services/foreman_rh_cloud/cloud_request.rb
|
135
137
|
- app/services/foreman_rh_cloud/cloud_request_forwarder.rb
|
136
138
|
- app/services/foreman_rh_cloud/hit_remediations_retriever.rb
|
139
|
+
- app/services/foreman_rh_cloud/hits_uploader.rb
|
137
140
|
- app/services/foreman_rh_cloud/insights_status_cleaner.rb
|
138
141
|
- app/services/foreman_rh_cloud/remediations_retriever.rb
|
139
142
|
- app/services/foreman_rh_cloud/template_renderer_helper.rb
|
140
143
|
- app/services/foreman_rh_cloud/url_remediations_retriever.rb
|
144
|
+
- app/views/api/v2/advisor_engine/host_details.json.rabl
|
145
|
+
- app/views/api/v2/hosts/insights/base.rabl
|
146
|
+
- app/views/api/v2/hosts/insights/insights.rabl
|
141
147
|
- app/views/hosts/_insights_tab.html.erb
|
142
148
|
- app/views/job_templates/cloud_connector.erb
|
143
149
|
- app/views/job_templates/rh_cloud_download_playbook.erb
|
@@ -162,6 +168,8 @@ files:
|
|
162
168
|
- db/migrate/20220321000001_add_unique_to_insights_rules.foreman_rh_cloud.rb
|
163
169
|
- db/migrate/20221102110254_fix_rh_cloud_settings_category_to_dsl.rb
|
164
170
|
- db/migrate/20230515140211_add_missing_hosts_table.foreman_rh_cloud.rb
|
171
|
+
- db/migrate/20241217190624_add_unique_index_to_rule_id_and_host_id_in_insights_hits.rb
|
172
|
+
- db/migrate/20241220184900_change_sync_insights_recommendations_to_true.rb
|
165
173
|
- db/seeds.d/179_ui_notifications.rb
|
166
174
|
- db/seeds.d/50_job_templates.rb
|
167
175
|
- lib/foreman_inventory_upload.rb
|
@@ -223,6 +231,7 @@ files:
|
|
223
231
|
- locale/zh_CN/foreman_rh_cloud.po
|
224
232
|
- package.json
|
225
233
|
- test/controllers/accounts_controller_test.rb
|
234
|
+
- test/controllers/insights_cloud/api/advisor_engine_controller_test.rb
|
226
235
|
- test/controllers/insights_cloud/api/cloud_request_controller_test.rb
|
227
236
|
- test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb
|
228
237
|
- test/controllers/insights_sync/settings_controller_test.rb
|
@@ -260,6 +269,7 @@ files:
|
|
260
269
|
- test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb
|
261
270
|
- test/unit/services/foreman_rh_cloud/cloud_status_service_test.rb
|
262
271
|
- test/unit/services/foreman_rh_cloud/hit_remediations_retriever_test.rb
|
272
|
+
- test/unit/services/foreman_rh_cloud/hits_uploader_test.rb
|
263
273
|
- test/unit/services/foreman_rh_cloud/insights_status_cleaner_test.rb
|
264
274
|
- test/unit/services/foreman_rh_cloud/template_renderer_helper_test.rb
|
265
275
|
- test/unit/services/foreman_rh_cloud/url_remediations_retriever_test.rb
|
@@ -520,18 +530,14 @@ files:
|
|
520
530
|
- webpack/ForemanRhCloudReducers.js
|
521
531
|
- webpack/ForemanRhCloudSelectors.js
|
522
532
|
- webpack/ForemanRhCloudTestHelpers.js
|
523
|
-
- webpack/InsightsCloudSync/Components/InsightsHeader/InsightsHeader.scss
|
524
|
-
- webpack/InsightsCloudSync/Components/InsightsHeader/index.js
|
525
533
|
- webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
|
526
534
|
- webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsActions.js
|
527
535
|
- webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsConstants.js
|
528
536
|
- webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsReducer.js
|
529
537
|
- webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsSelectors.js
|
530
|
-
- webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettings.test.js
|
531
538
|
- webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsActions.test.js
|
532
539
|
- webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsReducer.test.js
|
533
540
|
- webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsSelectors.test.js
|
534
|
-
- webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettings.test.js.snap
|
535
541
|
- webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsActions.test.js.snap
|
536
542
|
- webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsReducer.test.js.snap
|
537
543
|
- webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsSelectors.test.js.snap
|
@@ -563,8 +569,6 @@ files:
|
|
563
569
|
- webpack/InsightsCloudSync/Components/RemediationModal/Resolutions.js
|
564
570
|
- webpack/InsightsCloudSync/Components/RemediationModal/index.js
|
565
571
|
- webpack/InsightsCloudSync/Components/ToolbarDropdown.js
|
566
|
-
- webpack/InsightsCloudSync/Components/__tests__/InsightsHeader.test.js
|
567
|
-
- webpack/InsightsCloudSync/Components/__tests__/__snapshots__/InsightsHeader.test.js.snap
|
568
572
|
- webpack/InsightsCloudSync/InsightsCloudSync.js
|
569
573
|
- webpack/InsightsCloudSync/InsightsCloudSync.scss
|
570
574
|
- webpack/InsightsCloudSync/InsightsCloudSync.test.js
|
@@ -604,6 +608,7 @@ files:
|
|
604
608
|
- webpack/__mocks__/foremanReact/common/I18n.js
|
605
609
|
- webpack/__mocks__/foremanReact/common/MountingService.js
|
606
610
|
- webpack/__mocks__/foremanReact/common/helpers.js
|
611
|
+
- webpack/__mocks__/foremanReact/common/hooks/API/APIHooks.js
|
607
612
|
- webpack/__mocks__/foremanReact/components/ConfirmModal/index.js
|
608
613
|
- webpack/__mocks__/foremanReact/components/Head.js
|
609
614
|
- webpack/__mocks__/foremanReact/components/Layout/LayoutConstants.js
|
@@ -624,6 +629,7 @@ files:
|
|
624
629
|
- webpack/common/ForemanTasks/ForemanTasksActions.js
|
625
630
|
- webpack/common/ForemanTasks/ForemanTasksHelpers.js
|
626
631
|
- webpack/common/ForemanTasks/index.js
|
632
|
+
- webpack/common/Hooks/ConfigHooks.js
|
627
633
|
- webpack/common/Switcher/HelpLabel.js
|
628
634
|
- webpack/common/Switcher/SwitcherPF4.js
|
629
635
|
- webpack/common/Switcher/SwitcherPF4.scss
|
@@ -658,12 +664,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
658
664
|
- !ruby/object:Gem::Version
|
659
665
|
version: '0'
|
660
666
|
requirements: []
|
661
|
-
rubygems_version: 3.
|
667
|
+
rubygems_version: 3.3.27
|
662
668
|
signing_key:
|
663
669
|
specification_version: 4
|
664
670
|
summary: Summary of ForemanRhCloud.
|
665
671
|
test_files:
|
666
672
|
- test/controllers/accounts_controller_test.rb
|
673
|
+
- test/controllers/insights_cloud/api/advisor_engine_controller_test.rb
|
667
674
|
- test/controllers/insights_cloud/api/cloud_request_controller_test.rb
|
668
675
|
- test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb
|
669
676
|
- test/controllers/insights_sync/settings_controller_test.rb
|
@@ -701,6 +708,7 @@ test_files:
|
|
701
708
|
- test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb
|
702
709
|
- test/unit/services/foreman_rh_cloud/cloud_status_service_test.rb
|
703
710
|
- test/unit/services/foreman_rh_cloud/hit_remediations_retriever_test.rb
|
711
|
+
- test/unit/services/foreman_rh_cloud/hits_uploader_test.rb
|
704
712
|
- test/unit/services/foreman_rh_cloud/insights_status_cleaner_test.rb
|
705
713
|
- test/unit/services/foreman_rh_cloud/template_renderer_helper_test.rb
|
706
714
|
- test/unit/services/foreman_rh_cloud/url_remediations_retriever_test.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Text, TextVariants } from '@patternfly/react-core';
|
3
|
-
import { translate as __ } from 'foremanReact/common/I18n';
|
4
|
-
import './InsightsHeader.scss';
|
5
|
-
|
6
|
-
const InsightsHeader = () => (
|
7
|
-
<div className="insights-header">
|
8
|
-
<Text component={TextVariants.p}>
|
9
|
-
{__(
|
10
|
-
'Insights synchronization process is used to provide Insights recommendations output for hosts managed here.'
|
11
|
-
)}
|
12
|
-
</Text>
|
13
|
-
</div>
|
14
|
-
);
|
15
|
-
|
16
|
-
export default InsightsHeader;
|
data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettings.test.js
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
|
2
|
-
import { noop } from 'foremanReact/common/helpers';
|
3
|
-
|
4
|
-
import InsightsSettings from '../InsightsSettings';
|
5
|
-
|
6
|
-
const fixtures = {
|
7
|
-
'render without Props': {
|
8
|
-
insightsSyncEnabled: false,
|
9
|
-
getInsightsSyncSettings: noop,
|
10
|
-
setInsightsSyncEnabled: noop,
|
11
|
-
},
|
12
|
-
/** fixtures, props for the component */
|
13
|
-
};
|
14
|
-
|
15
|
-
describe('InsightsSettings', () => {
|
16
|
-
describe('rendering', () =>
|
17
|
-
testComponentSnapshotsWithFixtures(InsightsSettings, fixtures));
|
18
|
-
});
|
@@ -1,15 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`InsightsSettings rendering render without Props 1`] = `
|
4
|
-
<div
|
5
|
-
className="insights_settings"
|
6
|
-
>
|
7
|
-
<SwitcherPF4
|
8
|
-
id="insights_sync_switcher"
|
9
|
-
isChecked={false}
|
10
|
-
label="Sync automatically"
|
11
|
-
onChange={[Function]}
|
12
|
-
tooltip="Enable automatic synchronization of Insights recommendations from the Red Hat cloud"
|
13
|
-
/>
|
14
|
-
</div>
|
15
|
-
`;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
|
2
|
-
|
3
|
-
import InsightsHeader from '../InsightsHeader';
|
4
|
-
|
5
|
-
const fixtures = {
|
6
|
-
render: {},
|
7
|
-
};
|
8
|
-
|
9
|
-
describe('InsightsHeader', () =>
|
10
|
-
testComponentSnapshotsWithFixtures(InsightsHeader, fixtures));
|
data/webpack/InsightsCloudSync/Components/__tests__/__snapshots__/InsightsHeader.test.js.snap
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`InsightsHeader render 1`] = `
|
4
|
-
<div
|
5
|
-
className="insights-header"
|
6
|
-
>
|
7
|
-
<Text
|
8
|
-
component="p"
|
9
|
-
>
|
10
|
-
Insights synchronization process is used to provide Insights recommendations output for hosts managed here.
|
11
|
-
</Text>
|
12
|
-
</div>
|
13
|
-
`;
|