foreman_rh_cloud 12.2.7 → 12.2.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa3670133f6dd32aaab98f365d7fa78cd19f011af4f44c63d6fa0877bdfb5399
4
- data.tar.gz: ad6b6a1912b22ad2c9392c89b5307bb577476b77e099b95ee8a6234861dc769b
3
+ metadata.gz: 63d8defd7b60eed828c60406f2b1a033fa933355f02b040b0f44e9018ca8d5d1
4
+ data.tar.gz: fbe5cb540881d63b46deea02356a85a091813fe7b379743eacb40b274f9e0975
5
5
  SHA512:
6
- metadata.gz: 58f9f0a15c108f50e1caf9e070455cd1c89f8fff373df97657506dd952827cb953c3708543db8c13f599faa205fefed5ab6fcb474efb26ee5ef3002ddf5c51c6
7
- data.tar.gz: 8d4de0a8e5653fd52ca3238090158c94a4107dabfd6cd0097329bcb2d1648adc90a8901975ebca9a9f54aa1d2a34f8adef400e87d34dc33810c2a5ca0786b766
6
+ metadata.gz: f7d0c5e06c009759a191f015ac3fe8fd81380591c1ce8357618bd2b80a202f499d011b599ee6e7ab370dd451188fe0db2a8b952d66bd8ac841f7a35c0fdcf7eb
7
+ data.tar.gz: 7f8968b0aaea95c2b8e3f656964dae6a7ccdf7ec4cab1b2eecc550ebf0fea889e64eda671959ce3a13aa99318918977fbe5ee39fe4c06f8bbd6067813f40945d
@@ -115,23 +115,20 @@ module ForemanRhCloud
115
115
  if defined?(Katello) && !Foreman.in_setup_db_rake?
116
116
  Katello::Api::V2::OrganizationsController.include Foreman::Controller::SmartProxyAuth
117
117
  # patch the callbacks order for :download_debug_certificate, since local_find_taxonomy has to run after the user is already initialized
118
- Katello::Api::V2::OrganizationsController.skip_before_action(:local_find_taxonomy, only: :download_debug_certificate)
119
- Katello::Api::V2::OrganizationsController.add_smart_proxy_filters(
120
- [:index, :download_debug_certificate],
121
- features: ForemanRhCloud.on_prem_smart_proxy_features
122
- )
123
- Katello::Api::V2::OrganizationsController.before_action(:local_find_taxonomy, only: :download_debug_certificate)
124
-
118
+ Katello::Api::V2::OrganizationsController.before_find_taxonomy_actions do
119
+ Katello::Api::V2::OrganizationsController.add_smart_proxy_filters(
120
+ [:index, :download_debug_certificate],
121
+ features: ForemanRhCloud.on_prem_smart_proxy_features
122
+ )
123
+ end
125
124
  Katello::Api::V2::RepositoriesController.include Foreman::Controller::SmartProxyAuth
126
125
  # patch the callbacks order for :index, since find_product has to run after the user is already initialized
127
- Katello::Api::V2::RepositoriesController.skip_before_action(:find_product, only: :index)
128
- Katello::Api::V2::RepositoriesController.skip_before_action(:find_optional_organization, only: :index)
129
- Katello::Api::V2::RepositoriesController.add_smart_proxy_filters(
130
- :index,
131
- features: ForemanRhCloud.on_prem_smart_proxy_features
132
- )
133
- Katello::Api::V2::RepositoriesController.before_action(:find_product, only: :index)
134
- Katello::Api::V2::RepositoriesController.before_action(:find_optional_organization, only: :index)
126
+ Katello::Api::V2::RepositoriesController.before_index_actions do
127
+ Katello::Api::V2::RepositoriesController.add_smart_proxy_filters(
128
+ :index,
129
+ features: ForemanRhCloud.on_prem_smart_proxy_features
130
+ )
131
+ end
135
132
  end
136
133
  end
137
134
 
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '12.2.7'.freeze
2
+ VERSION = '12.2.9'.freeze
3
3
  end
@@ -45,6 +45,7 @@ namespace :rh_cloud_inventory do
45
45
  archived_report_generator = ForemanInventoryUpload::Generators::ArchivedReport.new(target, Logger.new(STDOUT))
46
46
  archived_report_generator.render(organization: organization, filter: filter)
47
47
  puts "Successfully generated #{target} for organization id #{organization}"
48
+ puts "Check the Uploading tab for report uploading status." if Setting[:subscription_connection_enabled]
48
49
 
49
50
  next unless ForemanRhCloud.with_iop_smart_proxy?
50
51
 
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "12.2.7",
3
+ "version": "12.2.9",
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,7 +4,11 @@ import { translate as __ } from 'foremanReact/common/I18n';
4
4
  import InventoryAutoUploadSwitcher from './ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload';
5
5
  import NewHostDetailsTab from './InsightsHostDetailsTab/NewHostDetailsTab';
6
6
  import { InsightsTotalRiskChartWrapper } from './InsightsHostDetailsTab/InsightsTotalRiskChartWrapper';
7
- import { isNotRhelHost, vulnerabilityDisabled } from './ForemanRhCloudHelpers';
7
+ import {
8
+ isNotRhelHost,
9
+ vulnerabilityDisabled,
10
+ hasNoInsightsFacet,
11
+ } from './ForemanRhCloudHelpers';
8
12
  import CVEsHostDetailsTabWrapper from './CVEsHostDetailsTab/CVEsHostDetailsTab';
9
13
 
10
14
  const fills = [
@@ -20,7 +24,7 @@ const fills = [
20
24
  component: props => <NewHostDetailsTab {...props} />,
21
25
  weight: 400,
22
26
  metadata: {
23
- hideTab: isNotRhelHost,
27
+ hideTab: props => isNotRhelHost(props) || hasNoInsightsFacet(props),
24
28
  title: __('Recommendations'),
25
29
  },
26
30
  },
@@ -14,3 +14,7 @@ export const isNotRhelHost = ({ hostDetails }) =>
14
14
 
15
15
  export const vulnerabilityDisabled = ({ hostDetails }) =>
16
16
  isNotRhelHost({ hostDetails }) || !hostDetails?.vulnerability?.enabled;
17
+
18
+ export const hasNoInsightsFacet = ({ response, hostDetails }) =>
19
+ // eslint-disable-next-line camelcase
20
+ !(response?.insights_attributes || hostDetails?.insights_attributes);
@@ -131,28 +131,15 @@ const IopInsightsTabWrapped = props => (
131
131
  );
132
132
 
133
133
  const InsightsTab = props => {
134
- const { response } = props;
135
- const isLocalAdvisorEngine =
136
- // eslint-disable-next-line camelcase
137
- response?.insights_attributes?.use_iop_mode;
134
+ const isLocalIop = useAdvisorEngineConfig();
138
135
 
139
- return isLocalAdvisorEngine ? (
136
+ return isLocalIop ? (
140
137
  <IopInsightsTabWrapped {...props} />
141
138
  ) : (
142
139
  <NewHostDetailsTab {...props} />
143
140
  );
144
141
  };
145
142
 
146
- InsightsTab.propTypes = {
147
- response: PropTypes.shape({
148
- insights_attributes: {
149
- use_iop_mode: PropTypes.bool,
150
- },
151
- }),
152
- };
153
-
154
- InsightsTab.defaultProps = {
155
- response: {},
156
- };
143
+ InsightsTab.defaultProps = {};
157
144
 
158
145
  export default InsightsTab;
@@ -1,5 +1,5 @@
1
1
  import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
- import { foremanUrl, vulnerabilityDisabled } from '../ForemanRhCloudHelpers';
2
+ import { foremanUrl, vulnerabilityDisabled, hasNoInsightsFacet } from '../ForemanRhCloudHelpers';
3
3
 
4
4
  global.URL_PREFIX = 'MY_TEST_URL_PREFIX.example.com';
5
5
 
@@ -34,6 +34,21 @@ const fixtures = {
34
34
  }),
35
35
  'vulnerabilityDisabled returns true for missing hostDetails': () =>
36
36
  vulnerabilityDisabled({}),
37
+ 'hasNoInsightsFacet returns false when insights_attributes is present': () =>
38
+ hasNoInsightsFacet({
39
+ response: {
40
+ insights_attributes: {
41
+ uuid: 'test-uuid',
42
+ insights_hits_count: 5,
43
+ },
44
+ },
45
+ }),
46
+ 'hasNoInsightsFacet returns true when insights_attributes is missing': () =>
47
+ hasNoInsightsFacet({
48
+ response: {},
49
+ }),
50
+ 'hasNoInsightsFacet returns true when response is missing': () =>
51
+ hasNoInsightsFacet({}),
37
52
  };
38
53
 
39
54
  describe('ForemanRhCloud helpers', () =>
@@ -1,5 +1,11 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`ForemanRhCloud helpers hasNoInsightsFacet returns false when insights_attributes is present 1`] = `false`;
4
+
5
+ exports[`ForemanRhCloud helpers hasNoInsightsFacet returns true when insights_attributes is missing 1`] = `true`;
6
+
7
+ exports[`ForemanRhCloud helpers hasNoInsightsFacet returns true when response is missing 1`] = `true`;
8
+
3
9
  exports[`ForemanRhCloud helpers should return foreman Url 1`] = `"MY_TEST_URL_PREFIX.example.com/test_path"`;
4
10
 
5
11
  exports[`ForemanRhCloud helpers vulnerabilityDisabled returns false for RHEL host with vulnerability enabled 1`] = `false`;
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.2.7
4
+ version: 12.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-09-15 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: foreman_ansible
@@ -44,14 +43,14 @@ dependencies:
44
43
  requirements:
45
44
  - - ">="
46
45
  - !ruby/object:Gem::Version
47
- version: 4.14.0.rc1.1
46
+ version: '4.18'
48
47
  type: :runtime
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
51
  - - ">="
53
52
  - !ruby/object:Gem::Version
54
- version: 4.14.0.rc1.1
53
+ version: '4.18'
55
54
  - !ruby/object:Gem::Dependency
56
55
  name: rdoc
57
56
  requirement: !ruby/object:Gem::Requirement
@@ -676,7 +675,6 @@ homepage: https://github.com/theforeman/foreman_rh_cloud
676
675
  licenses:
677
676
  - GPL-3.0
678
677
  metadata: {}
679
- post_install_message:
680
678
  rdoc_options: []
681
679
  require_paths:
682
680
  - lib
@@ -694,8 +692,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
694
692
  - !ruby/object:Gem::Version
695
693
  version: '0'
696
694
  requirements: []
697
- rubygems_version: 3.2.33
698
- signing_key:
695
+ rubygems_version: 3.6.9
699
696
  specification_version: 4
700
697
  summary: Summary of ForemanRhCloud.
701
698
  test_files: