foreman_rh_cloud 12.2.3 → 13.0.0
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 +4 -4
- data/lib/foreman_inventory_upload/generators/slice.rb +0 -1
- data/lib/foreman_inventory_upload.rb +1 -1
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/package.json +1 -1
- data/test/unit/slice_generator_test.rb +0 -1
- data/webpack/ForemanColumnExtensions/index.js +5 -1
- data/webpack/ForemanRhCloudFills.js +1 -1
- data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationHelpers.js +15 -7
- data/webpack/InsightsCloudSync/Components/RemediationModal/Resolutions.js +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 936f2b5f4d922c5f2a8b65baae327d9a70bc70bb40f3f9950e9c0755d842604f
|
4
|
+
data.tar.gz: bc36b4bad75d6ef32b513233c6476665df9ca8b6d694a87157cf75192395cd0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79e9a86baddfd9cddd5fe0ca26a34e09e29033e0066aacfa974cb1ea04b68a9c03a3559995e52df20b0677cf8487bd46155e42a0f7026cfde1700026580553e5
|
7
|
+
data.tar.gz: a3b16766dff66cf5d935e47b41b72d1de9a25334b35743f4e7cba07840c761fc1c2b601bf8090874773bd3fd08f596aa5d31a7e523e9edf57ab7ba43fccf39b4
|
@@ -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
|
-
|
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
|
data/package.json
CHANGED
@@ -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;
|
@@ -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
|
-
//
|
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
|
-
//
|
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 =>
|