foreman_rh_cloud 12.2.3 → 12.2.5

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: c2002305657053ddee42c958f1050b73e0d6b83bc9a41acadff095d216b07899
4
- data.tar.gz: 5d4e414ae8ce2e25a4f3d845c226fe64e808471dd3ef96161f414f36ba0d1190
3
+ metadata.gz: 2081fbfa1331d1d17e96c000bfad7990a679973d5702ae47bc9f544591d1b27a
4
+ data.tar.gz: 5e33001a27be919fa1394b235ee4374ef8e8b7086eaffa898ddcd601acca5933
5
5
  SHA512:
6
- metadata.gz: f8a0ec3ca0ce175a0f72a81a12a7b2457e6f68f894fa91434decd92e6bd484cbcb467538376dc41180dbf6cd65ef344fe121ec7d0c6dba7095095f779b0239cb
7
- data.tar.gz: e60d883392d906b2de8d439989ed89062f4cceab79a46382229fec503d541209cc921ebcd09ed0b860418ef55df37771eb2388519ab81b43d0dbf27897623bb6
6
+ metadata.gz: d04457f59d4c0a027dcd87f996efb850e04db2f123753f5636c134f4e8c0c04226e96854bcb686a7200f83b4ee32fe75deba2c9af6680009dfb2e70a816502f8
7
+ data.tar.gz: 716f79c957a3a563374ba257f623b34bfdf30a5ef1a29f5404994cef658146e26d01fb0a52cf218d307734de85edce662f4ea63eb55c88de149b1c5bfd5d5899
@@ -253,7 +253,6 @@ module ForemanInventoryUpload
253
253
 
254
254
  def report_yum_repos(host)
255
255
  return unless host&.content_facet&.bound_repositories&.any?
256
- return unless ForemanRhCloud.with_iop_smart_proxy?
257
256
 
258
257
  @stream.array_field('yum_repos') do
259
258
  host.content_facet.bound_repositories.each_with_index do |repo, index|
@@ -58,7 +58,7 @@ module ForemanInventoryUpload
58
58
 
59
59
  def self.upload_url
60
60
  # for testing set ENV to 'https://ci.cloud.redhat.com/api/ingress/v1/upload'
61
- @upload_url ||= ENV['SATELLITE_INVENTORY_UPLOAD_URL'] || 'https://cert.cloud.redhat.com/api/ingress/v1/upload'
61
+ ENV['SATELLITE_INVENTORY_UPLOAD_URL'] || "#{ForemanRhCloud.cert_base_url}/api/ingress/v1/upload"
62
62
  end
63
63
 
64
64
  def self.slice_size
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '12.2.3'.freeze
2
+ VERSION = '12.2.5'.freeze
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "12.2.3",
3
+ "version": "12.2.5",
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -999,7 +999,6 @@ class SliceGeneratorTest < ActiveSupport::TestCase
999
999
  end
1000
1000
 
1001
1001
  test 'reports yum repos' do
1002
- ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(true)
1003
1002
  FactoryBot.create(:katello_content, cp_content_id: '1', organization: @host.organization, name: 'Test Content', label: 'test-content')
1004
1003
  repo = FactoryBot.build(
1005
1004
  :katello_repository,
@@ -6,7 +6,7 @@ import { translate as __ } from 'foremanReact/common/I18n';
6
6
  import { propsToCamelCase } from 'foremanReact/common/helpers';
7
7
  import { CVECountCell } from '../InsightsVulnerabilityHostIndexExtensions/CVECountCell';
8
8
 
9
- const HostedRecommendationsCell = hostDetails => {
9
+ const HostedRecommendationsCell = ({ hostDetails }) => {
10
10
  const insightsAttributes = propsToCamelCase(
11
11
  // eslint-disable-next-line camelcase
12
12
  hostDetails?.insights_attributes ?? {}
@@ -19,6 +19,10 @@ const HostedRecommendationsCell = hostDetails => {
19
19
  return <a href={hitsUrl}>{hitsCount}</a>;
20
20
  };
21
21
 
22
+ HostedRecommendationsCell.propTypes = {
23
+ hostDetails: PropTypes.object.isRequired,
24
+ };
25
+
22
26
  const IopRecommendationsCell = ({ hostDetails }) => {
23
27
  // eslint-disable-next-line camelcase
24
28
  const uuid = hostDetails?.insights_attributes?.uuid;
@@ -21,7 +21,7 @@ const fills = [
21
21
  weight: 400,
22
22
  metadata: {
23
23
  hideTab: isNotRhelHost,
24
- title: __('Insights'),
24
+ title: __('Recommendations'),
25
25
  },
26
26
  },
27
27
  {
@@ -3,8 +3,10 @@ import React from 'react';
3
3
  import { orderBy } from 'lodash';
4
4
  import Resolutions from './Resolutions';
5
5
 
6
- export const getResolutionId = (selectedResolution, id) =>
7
- `${id}_${selectedResolution}`;
6
+ export const getResolutionId = (selectedResolution, id, isIop = true) => {
7
+ if (isIop) return `${id}_${selectedResolution}`;
8
+ return selectedResolution;
9
+ };
8
10
 
9
11
  export const modifyRows = (
10
12
  remediations,
@@ -25,20 +27,26 @@ export const modifyRows = (
25
27
  const selectedResolution = resolutions[0]?.id;
26
28
  /* eslint-disable spellcheck/spell-checker */
27
29
 
28
- // For IoP: {
29
- // hit_id: "c7c6727e-2966-4f7c-87f1-20ef14db7a2d",
30
+ // For IoP:
31
+ // All of the values will be plain strings
32
+ // {
33
+ // hit_id: "c7c6727e-2966-4f7c-87f1-20ef14db7a2d", <-- this refers to a host by insights ID
30
34
  // rule_id: "hardening_ssh_client_alive|OPENSSH_HARDENING_CLIENT_ALIVE",
31
35
  // resolution_type: "less_secure",
32
- // resolution_id:"hardening_ssh_client_alive|OPENSSH_HARDENING_CLIENT_ALIVE_less_secure",
36
+ // resolution_id:"hardening_ssh_client_alive|OPENSSH_HARDENING_CLIENT_ALIVE_less_secure", <-- joined rule id and resolution type
33
37
  // }
34
- // for Hosted, hit_id and rule_id will be Foreman database IDs
38
+ // For non-IoP:
39
+ // All of the values will be numeric Foreman database IDs
40
+ // hit_id refers to an InsightsHit
41
+ // rule_id refers to an InsightsRule
42
+ // resolution_type and resolution_id both refer to an InsightsResolution (InsightsHit.find(xx).rule.resolutions)
35
43
 
36
44
  /* eslint-enable spellcheck/spell-checker */
37
45
  resolutionToSubmit.push({
38
46
  hit_id: isIop ? host_id : id,
39
47
  rule_id: id,
40
48
  resolution_type: selectedResolution /** defaults to the first resolution if many */,
41
- resolution_id: getResolutionId(selectedResolution, id),
49
+ resolution_id: getResolutionId(selectedResolution, id, isIop),
42
50
  });
43
51
  return {
44
52
  cells: [
@@ -22,7 +22,7 @@ const Resolutions = ({
22
22
  key={resolution_id}
23
23
  ouiaId={`resolution-radio-${resolution_id}`}
24
24
  className="resolution-radio"
25
- id={resolution_id}
25
+ id={`${hit_id}_${resolution_id}`}
26
26
  isChecked={resolution_id === checkedID}
27
27
  onChange={() =>
28
28
  setResolutions(stateRes =>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.2.3
4
+ version: 12.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team