foreman_rh_cloud 12.1.4 → 12.1.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 +4 -4
- data/app/controllers/insights_cloud/api/machine_telemetries_controller.rb +1 -2
- data/app/controllers/insights_cloud/ui_requests_controller.rb +99 -0
- data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +7 -13
- data/app/services/foreman_rh_cloud/gateway_request.rb +26 -0
- data/app/services/foreman_rh_cloud/insights_api_forwarder.rb +116 -0
- data/app/services/foreman_rh_cloud/tags_auth.rb +55 -0
- data/config/routes.rb +2 -0
- data/lib/foreman_rh_cloud/engine.rb +2 -1
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/lib/insights_cloud.rb +8 -0
- data/package.json +5 -1
- data/test/controllers/insights_cloud/ui_requests_controller_test.rb +169 -0
- data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +3 -3
- data/test/unit/services/foreman_rh_cloud/insights_api_forwarder_test.rb +176 -0
- data/test/unit/services/foreman_rh_cloud/tags_auth_test.rb +29 -0
- data/webpack/CVEsHostDetailsTab/CVEsHostDetailsTab.js +30 -10
- data/webpack/CVEsHostDetailsTab/__tests__/CVEsHostDetailsTab.test.js +18 -11
- data/webpack/CVEsHostDetailsTab/index.js +2 -2
- data/webpack/ForemanColumnExtensions/index.js +16 -6
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.js +1 -0
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilter.test.js.snap +1 -0
- data/webpack/ForemanInventoryUpload/Components/InventorySettings/MinimalInventoryDropdown.js +2 -0
- data/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js +8 -1
- data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap +4 -0
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorButton.js +3 -3
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorButton.test.js.snap +3 -0
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js +10 -4
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js +6 -6
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/SettingsWarning.js +2 -0
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/__snapshots__/SettingsWarning.test.js.snap +2 -0
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js +1 -0
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +1 -0
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js +3 -1
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +3 -0
- data/webpack/ForemanRhCloudFills.js +6 -3
- data/webpack/ForemanRhCloudPages.js +6 -3
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js +1 -0
- data/webpack/InsightsCloudSync/Components/InsightsTable/SelectAllAlert.js +2 -0
- data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/__snapshots__/InsightsTable.test.js.snap +1 -0
- data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.js +3 -0
- data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModalFooter.js +12 -2
- data/webpack/InsightsCloudSync/Components/RemediationModal/Resolutions.js +1 -0
- data/webpack/InsightsCloudSync/Components/ToolbarDropdown.js +6 -1
- data/webpack/InsightsVulnerability/InsightsVulnerabilityListPage.js +21 -0
- data/webpack/InsightsVulnerability/InsightsVulnerabilityListPage.test.js +20 -0
- data/webpack/InsightsVulnerabilityHostIndexExtensions/CVECountCell.js +45 -0
- data/webpack/InsightsVulnerabilityHostIndexExtensions/__tests__/CVECountCell.test.js +28 -0
- data/webpack/common/DropdownToggle.js +1 -0
- data/webpack/common/ScalprumModule/ScalprumContext.js +63 -0
- data/webpack/common/Switcher/SwitcherPF4.js +1 -0
- data/webpack/common/Switcher/__tests__/__snapshots__/SwitcherPF4.test.js.snap +1 -0
- data/webpack/common/Switcher/index.js +1 -0
- metadata +17 -4
- data/webpack/InsightsVulnerability/InsightsVulnerability.js +0 -13
- data/webpack/InsightsVulnerability/InsightsVulnerability.test.js +0 -18
@@ -41,6 +41,7 @@ exports[`InventoryAutoUpload rendering render with props 1`] = `
|
|
41
41
|
position="right"
|
42
42
|
>
|
43
43
|
<Button
|
44
|
+
ouiaId="button-advanced-settings"
|
44
45
|
style={
|
45
46
|
Object {
|
46
47
|
"fontSize": "small",
|
@@ -68,6 +69,7 @@ exports[`InventoryAutoUpload rendering render with props 1`] = `
|
|
68
69
|
>
|
69
70
|
<Text
|
70
71
|
component="p"
|
72
|
+
ouiaId="text-more-details"
|
71
73
|
>
|
72
74
|
<InfoAltIcon />
|
73
75
|
|
@@ -76,6 +78,7 @@ exports[`InventoryAutoUpload rendering render with props 1`] = `
|
|
76
78
|
<Text
|
77
79
|
component="a"
|
78
80
|
href="/foreman_rh_cloud/inventory_upload"
|
81
|
+
ouiaId="text-details-link"
|
79
82
|
rel="noopener noreferrer"
|
80
83
|
target="_blank"
|
81
84
|
>
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
|
3
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
3
4
|
import InventoryAutoUploadSwitcher from './ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload';
|
4
5
|
import NewHostDetailsTab from './InsightsHostDetailsTab/NewHostDetailsTab';
|
5
6
|
import { InsightsTotalRiskChartWrapper } from './InsightsHostDetailsTab/InsightsTotalRiskChartWrapper';
|
6
7
|
import { isNotRhelHost, vulnerabilityDisabled } from './ForemanRhCloudHelpers';
|
7
|
-
import
|
8
|
+
import CVEsHostDetailsTabWrapper from './CVEsHostDetailsTab/CVEsHostDetailsTab';
|
8
9
|
|
9
10
|
const fills = [
|
10
11
|
{
|
@@ -20,6 +21,7 @@ const fills = [
|
|
20
21
|
weight: 400,
|
21
22
|
metadata: {
|
22
23
|
hideTab: isNotRhelHost,
|
24
|
+
title: __('Insights'),
|
23
25
|
},
|
24
26
|
},
|
25
27
|
{
|
@@ -30,11 +32,12 @@ const fills = [
|
|
30
32
|
},
|
31
33
|
{
|
32
34
|
slot: 'host-details-page-tabs',
|
33
|
-
name: '
|
34
|
-
component: props => <
|
35
|
+
name: 'Vulnerabilities',
|
36
|
+
component: props => <CVEsHostDetailsTabWrapper {...props} />,
|
35
37
|
weight: 300,
|
36
38
|
metadata: {
|
37
39
|
hideTab: vulnerabilityDisabled,
|
40
|
+
title: __('Vulnerabilities'),
|
38
41
|
},
|
39
42
|
},
|
40
43
|
];
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import componentRegistry from 'foremanReact/components/componentRegistry';
|
3
3
|
import { registerRoutes as foremanRegisterRoutes } from 'foremanReact/routes/RoutingService';
|
4
4
|
import ForemanInventoryUpload from './ForemanInventoryUpload';
|
5
|
-
import
|
5
|
+
import InsightsVulnerabilityListPage from './InsightsVulnerability/InsightsVulnerabilityListPage';
|
6
6
|
import InsightsCloudSync from './InsightsCloudSync';
|
7
7
|
import InsightsHostDetailsTab from './InsightsHostDetailsTab';
|
8
8
|
|
@@ -10,7 +10,10 @@ const pages = [
|
|
10
10
|
{ name: 'ForemanInventoryUpload', type: ForemanInventoryUpload },
|
11
11
|
{ name: 'InsightsCloudSync', type: InsightsCloudSync },
|
12
12
|
{ name: 'InsightsHostDetailsTab', type: InsightsHostDetailsTab },
|
13
|
-
{
|
13
|
+
{
|
14
|
+
name: 'InsightsVulnerabilityListPage',
|
15
|
+
type: InsightsVulnerabilityListPage,
|
16
|
+
},
|
14
17
|
];
|
15
18
|
|
16
19
|
export const registerPages = () => {
|
@@ -31,7 +34,7 @@ export const routes = [
|
|
31
34
|
{
|
32
35
|
path: '/foreman_rh_cloud/insights_vulnerability',
|
33
36
|
exact: true,
|
34
|
-
render: props => <
|
37
|
+
render: props => <InsightsVulnerabilityListPage {...props} />,
|
35
38
|
},
|
36
39
|
];
|
37
40
|
|
@@ -75,6 +75,7 @@ const InsightsTable = ({
|
|
75
75
|
/>
|
76
76
|
<Table
|
77
77
|
className="rh-cloud-recommendations-table"
|
78
|
+
ouiaId="rh-cloud-recommendations-table"
|
78
79
|
aria-label="Recommendations Table"
|
79
80
|
onSelect={(_event, isSelected, rowId) =>
|
80
81
|
onTableSelect(isSelected, rowId, rows, selectedIds)
|
@@ -18,6 +18,7 @@ const SelectAllAlert = ({
|
|
18
18
|
<Alert
|
19
19
|
isInline
|
20
20
|
variant="info"
|
21
|
+
ouiaId="alert-recommendations-selected"
|
21
22
|
title={sprintf(__('Recommendations selected: %s.'), selectedCount)}
|
22
23
|
actionLinks={
|
23
24
|
<AlertActionLink onClick={selectAll}>
|
@@ -32,6 +33,7 @@ const SelectAllAlert = ({
|
|
32
33
|
<Alert
|
33
34
|
isInline
|
34
35
|
variant="info"
|
36
|
+
ouiaId="alert-all-selected"
|
35
37
|
title={__('All recommendations are now selected.')}
|
36
38
|
actionLinks={
|
37
39
|
<AlertActionLink onClick={clearAllSelection}>
|
@@ -46,6 +46,7 @@ const RemediationModal = ({
|
|
46
46
|
return (
|
47
47
|
<React.Fragment>
|
48
48
|
<Button
|
49
|
+
ouiaId="button-remediate"
|
49
50
|
variant="primary"
|
50
51
|
isDisabled={isEmpty(selectedIds)}
|
51
52
|
onClick={() => {
|
@@ -56,6 +57,7 @@ const RemediationModal = ({
|
|
56
57
|
</Button>{' '}
|
57
58
|
<Modal
|
58
59
|
id="remediation-modal"
|
60
|
+
ouiaId="remediation-modal"
|
59
61
|
appendTo={document.body}
|
60
62
|
variant={ModalVariant.large}
|
61
63
|
title={__('Remediation summary')}
|
@@ -71,6 +73,7 @@ const RemediationModal = ({
|
|
71
73
|
>
|
72
74
|
<Table
|
73
75
|
className="remediations-table"
|
76
|
+
ouiaId="remediations-table"
|
74
77
|
aria-label="remediations Table"
|
75
78
|
cells={columns}
|
76
79
|
rows={rows}
|
@@ -9,10 +9,20 @@ const ModalFooter = ({ toggleModal, resolutions, hostsIds }) => {
|
|
9
9
|
token = token?.content || '';
|
10
10
|
return (
|
11
11
|
<form action={JOB_INVOCATION_PATH} method="post">
|
12
|
-
<Button
|
12
|
+
<Button
|
13
|
+
type="submit"
|
14
|
+
ouiaId="button-confirm"
|
15
|
+
key="confirm"
|
16
|
+
variant="primary"
|
17
|
+
>
|
13
18
|
{__('Remediate')}
|
14
19
|
</Button>
|
15
|
-
<Button
|
20
|
+
<Button
|
21
|
+
key="cancel"
|
22
|
+
ouiaId="button-cancel"
|
23
|
+
variant="link"
|
24
|
+
onClick={toggleModal}
|
25
|
+
>
|
16
26
|
{__('Cancel')}
|
17
27
|
</Button>
|
18
28
|
<input type="hidden" name="feature" value="rh_cloud_remediate_hosts" />
|
@@ -18,6 +18,7 @@ const Resolutions = ({
|
|
18
18
|
{resolutions.map(({ id: resolution_id, description }) => (
|
19
19
|
<Radio
|
20
20
|
key={resolution_id}
|
21
|
+
ouiaId={`resolution-radio-${resolution_id}`}
|
21
22
|
className="resolution-radio"
|
22
23
|
id={resolution_id}
|
23
24
|
isChecked={resolution_id === checkedID}
|
@@ -19,11 +19,15 @@ const ToolbarDropdown = ({ onRecommendationSync }) => {
|
|
19
19
|
const dropdownItems = [
|
20
20
|
<DropdownItem
|
21
21
|
key="recommendation-manual-sync"
|
22
|
+
ouiaId="recommendation-manual-sync"
|
22
23
|
onClick={onRecommendationSync}
|
23
24
|
>
|
24
25
|
{__('Sync recommendations')}
|
25
26
|
</DropdownItem>,
|
26
|
-
<DropdownItem
|
27
|
+
<DropdownItem
|
28
|
+
key="cloud-advisor-systems-link"
|
29
|
+
ouiaId="cloud-advisor-systems-link"
|
30
|
+
>
|
27
31
|
<a
|
28
32
|
href={redHatAdvisorSystems()}
|
29
33
|
target="_blank"
|
@@ -38,6 +42,7 @@ const ToolbarDropdown = ({ onRecommendationSync }) => {
|
|
38
42
|
return (
|
39
43
|
<Dropdown
|
40
44
|
className="title-dropdown"
|
45
|
+
ouiaId="title-dropdown"
|
41
46
|
onSelect={() => setIsDropdownOpen(false)}
|
42
47
|
toggle={
|
43
48
|
<KebabToggle onToggle={(_event, isOpen) => setIsDropdownOpen(isOpen)} />
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ScalprumComponent, ScalprumProvider } from '@scalprum/react-core';
|
3
|
+
import { providerOptions } from '../common/ScalprumModule/ScalprumContext';
|
4
|
+
|
5
|
+
const InsightsVulnerabilityListPage = () => {
|
6
|
+
const scope = 'vulnerability';
|
7
|
+
const module = './CveListPage';
|
8
|
+
return (
|
9
|
+
<div className="rh-cloud-insights-vulnerability-page">
|
10
|
+
<ScalprumComponent scope={scope} module={module} />
|
11
|
+
</div>
|
12
|
+
);
|
13
|
+
};
|
14
|
+
|
15
|
+
const InsightsVulnerabilityListPageWrap = () => (
|
16
|
+
<ScalprumProvider {...providerOptions}>
|
17
|
+
<InsightsVulnerabilityListPage />
|
18
|
+
</ScalprumProvider>
|
19
|
+
);
|
20
|
+
|
21
|
+
export default InsightsVulnerabilityListPageWrap;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { render } from '@testing-library/react';
|
3
|
+
import '@testing-library/jest-dom';
|
4
|
+
import InsightsVulnerabilityListPage from './InsightsVulnerabilityListPage';
|
5
|
+
|
6
|
+
jest.mock('@scalprum/react-core', () => ({
|
7
|
+
ScalprumComponent: jest.fn(props => (
|
8
|
+
<div data-testid="mock-scalprum-component">{JSON.stringify(props)}</div>
|
9
|
+
)),
|
10
|
+
ScalprumProvider: jest.fn(({ children }) => <div>{children}</div>),
|
11
|
+
}));
|
12
|
+
|
13
|
+
describe('InsightsVulnerabilityListPage component', () => {
|
14
|
+
it('renders the container with correct class', () => {
|
15
|
+
const { container } = render(<InsightsVulnerabilityListPage />);
|
16
|
+
expect(
|
17
|
+
container.querySelector('.rh-cloud-insights-vulnerability-page')
|
18
|
+
).toBeTruthy();
|
19
|
+
});
|
20
|
+
});
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import { UnknownIcon } from '@patternfly/react-icons';
|
4
|
+
import { Link } from 'react-router-dom';
|
5
|
+
import { useAPI } from 'foremanReact/common/hooks/API/APIHooks';
|
6
|
+
|
7
|
+
import { insightsCloudUrl } from '../InsightsCloudSync/InsightsCloudSyncHelpers';
|
8
|
+
|
9
|
+
const vulnerabilityApiPath = path =>
|
10
|
+
insightsCloudUrl(`api/vulnerability/v1/${path}`);
|
11
|
+
|
12
|
+
export const CVECountCell = ({ hostDetails }) => {
|
13
|
+
// eslint-disable-next-line camelcase
|
14
|
+
const uuid = hostDetails?.subscription_facet_attributes?.uuid;
|
15
|
+
|
16
|
+
const key = `HOST_CVE_COUNT_${uuid}`;
|
17
|
+
const response = useAPI(
|
18
|
+
uuid ? 'get' : null,
|
19
|
+
vulnerabilityApiPath(`systems?uuid=${uuid}`),
|
20
|
+
{
|
21
|
+
key,
|
22
|
+
}
|
23
|
+
);
|
24
|
+
|
25
|
+
if (uuid === undefined) {
|
26
|
+
return <UnknownIcon />;
|
27
|
+
}
|
28
|
+
|
29
|
+
// eslint-disable-next-line camelcase
|
30
|
+
const { cve_count } = (response.response?.data || [])[0]?.attributes || {};
|
31
|
+
|
32
|
+
const cveLink = (
|
33
|
+
// eslint-disable-next-line camelcase
|
34
|
+
<Link to={`hosts/${hostDetails.name}#/Vulnerabilities`}>{cve_count}</Link>
|
35
|
+
);
|
36
|
+
|
37
|
+
// eslint-disable-next-line camelcase
|
38
|
+
return cve_count === undefined ? <UnknownIcon /> : cveLink;
|
39
|
+
};
|
40
|
+
|
41
|
+
CVECountCell.propTypes = {
|
42
|
+
hostDetails: PropTypes.object.isRequired,
|
43
|
+
};
|
44
|
+
|
45
|
+
export default CVECountCell;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { render, screen } from '@testing-library/react';
|
3
|
+
import { API } from 'foremanReact/redux/API';
|
4
|
+
import { CVECountCell } from '../CVECountCell';
|
5
|
+
|
6
|
+
jest.mock('foremanReact/redux/API');
|
7
|
+
API.get.mockImplementation(async () => ({
|
8
|
+
data: [
|
9
|
+
{
|
10
|
+
attributes: {
|
11
|
+
cve_count: 1,
|
12
|
+
},
|
13
|
+
},
|
14
|
+
],
|
15
|
+
}));
|
16
|
+
|
17
|
+
describe('CVECountCell', () => {
|
18
|
+
it('renders an empty cves count column', () => {
|
19
|
+
const hostDetailsMock = {
|
20
|
+
name: 'test-host.example.com',
|
21
|
+
subscription_facet_attributes: {
|
22
|
+
uuid: null, // no subscription
|
23
|
+
},
|
24
|
+
};
|
25
|
+
render(<CVECountCell hostDetails={hostDetailsMock} />);
|
26
|
+
expect(screen.getByRole('img', { hidden: true })).toBeTruthy();
|
27
|
+
});
|
28
|
+
});
|
@@ -6,6 +6,7 @@ const DropdownToggle = ({ items, ...props }) => {
|
|
6
6
|
const [isOpen, setOpen] = useState(false);
|
7
7
|
return (
|
8
8
|
<Dropdown
|
9
|
+
ouiaId="toggle-dropdown"
|
9
10
|
onSelect={() => setOpen(false)}
|
10
11
|
toggle={<KebabToggle onToggle={(_event, value) => setOpen(value)} />}
|
11
12
|
isOpen={isOpen}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
export const modulesConfig = {
|
2
|
+
vulnerability: {
|
3
|
+
name: 'vulnerability',
|
4
|
+
manifestLocation: `${window.location.origin}/assets/apps/vulnerability/fed-mods.json`,
|
5
|
+
cdnPath: `${window.location.origin}/assets/apps/vulnerability/`,
|
6
|
+
},
|
7
|
+
};
|
8
|
+
|
9
|
+
export const mockUser = {
|
10
|
+
entitlements: {},
|
11
|
+
identity: {
|
12
|
+
account_number: 'string',
|
13
|
+
org_id: 'FOREMAN',
|
14
|
+
internal: {
|
15
|
+
org_id: 'string',
|
16
|
+
account_id: 'string',
|
17
|
+
},
|
18
|
+
type: 'string',
|
19
|
+
user: {
|
20
|
+
username: 'string',
|
21
|
+
email: 'string',
|
22
|
+
first_name: 'string',
|
23
|
+
last_name: 'string',
|
24
|
+
is_active: 'boolean',
|
25
|
+
is_internal: 'boolean',
|
26
|
+
is_org_admin: 'boolean',
|
27
|
+
locale: 'string',
|
28
|
+
},
|
29
|
+
},
|
30
|
+
};
|
31
|
+
|
32
|
+
export const providerOptions = {
|
33
|
+
pluginSDKOptions: {
|
34
|
+
pluginLoaderOptions: {
|
35
|
+
transformPluginManifest: manifest => {
|
36
|
+
if (
|
37
|
+
manifest.baseURL === 'auto' &&
|
38
|
+
modulesConfig[manifest.name]?.cdnPath
|
39
|
+
) {
|
40
|
+
const _cdnPath = modulesConfig[manifest.name]?.cdnPath;
|
41
|
+
return {
|
42
|
+
...manifest,
|
43
|
+
baseURL: _cdnPath,
|
44
|
+
loadScripts: manifest.loadScripts.map(
|
45
|
+
script => `${_cdnPath}${script}`
|
46
|
+
),
|
47
|
+
};
|
48
|
+
}
|
49
|
+
return manifest;
|
50
|
+
},
|
51
|
+
},
|
52
|
+
},
|
53
|
+
api: {
|
54
|
+
chrome: {
|
55
|
+
isBeta: () => false,
|
56
|
+
on: () => {},
|
57
|
+
auth: {
|
58
|
+
getUser: () => Promise.resolve(mockUser),
|
59
|
+
},
|
60
|
+
},
|
61
|
+
},
|
62
|
+
config: modulesConfig,
|
63
|
+
};
|
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.1.
|
4
|
+
version: 12.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Red Hat Cloud team
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- app/controllers/insights_cloud/hits_controller.rb
|
115
115
|
- app/controllers/insights_cloud/settings_controller.rb
|
116
116
|
- app/controllers/insights_cloud/tasks_controller.rb
|
117
|
+
- app/controllers/insights_cloud/ui_requests_controller.rb
|
117
118
|
- app/helpers/foreman_insights_host_helper.rb
|
118
119
|
- app/helpers/foreman_inventory_upload_helper.rb
|
119
120
|
- app/helpers/foreman_inventory_upload_host_helper.rb
|
@@ -135,11 +136,14 @@ files:
|
|
135
136
|
- app/services/foreman_rh_cloud/cloud_presence.rb
|
136
137
|
- app/services/foreman_rh_cloud/cloud_request.rb
|
137
138
|
- app/services/foreman_rh_cloud/cloud_request_forwarder.rb
|
139
|
+
- app/services/foreman_rh_cloud/gateway_request.rb
|
138
140
|
- app/services/foreman_rh_cloud/hit_remediations_retriever.rb
|
139
141
|
- app/services/foreman_rh_cloud/hits_uploader.rb
|
142
|
+
- app/services/foreman_rh_cloud/insights_api_forwarder.rb
|
140
143
|
- app/services/foreman_rh_cloud/insights_status_cleaner.rb
|
141
144
|
- app/services/foreman_rh_cloud/remediations_retriever.rb
|
142
145
|
- app/services/foreman_rh_cloud/rules_ingester.rb
|
146
|
+
- app/services/foreman_rh_cloud/tags_auth.rb
|
143
147
|
- app/services/foreman_rh_cloud/template_renderer_helper.rb
|
144
148
|
- app/services/foreman_rh_cloud/url_remediations_retriever.rb
|
145
149
|
- app/views/api/v2/advisor_engine/host_details.json.rabl
|
@@ -239,6 +243,7 @@ files:
|
|
239
243
|
- test/controllers/insights_cloud/api/advisor_engine_controller_test.rb
|
240
244
|
- test/controllers/insights_cloud/api/cloud_request_controller_test.rb
|
241
245
|
- test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb
|
246
|
+
- test/controllers/insights_cloud/ui_requests_controller_test.rb
|
242
247
|
- test/controllers/insights_sync/settings_controller_test.rb
|
243
248
|
- test/controllers/inventory_upload/api/inventory_controller_test.rb
|
244
249
|
- test/controllers/inventory_upload/cloud_status_controller_test.rb
|
@@ -275,8 +280,10 @@ files:
|
|
275
280
|
- test/unit/services/foreman_rh_cloud/cloud_status_service_test.rb
|
276
281
|
- test/unit/services/foreman_rh_cloud/hit_remediations_retriever_test.rb
|
277
282
|
- test/unit/services/foreman_rh_cloud/hits_uploader_test.rb
|
283
|
+
- test/unit/services/foreman_rh_cloud/insights_api_forwarder_test.rb
|
278
284
|
- test/unit/services/foreman_rh_cloud/insights_status_cleaner_test.rb
|
279
285
|
- test/unit/services/foreman_rh_cloud/rules_ingester_test.rb
|
286
|
+
- test/unit/services/foreman_rh_cloud/tags_auth_test.rb
|
280
287
|
- test/unit/services/foreman_rh_cloud/template_renderer_helper_test.rb
|
281
288
|
- test/unit/services/foreman_rh_cloud/url_remediations_retriever_test.rb
|
282
289
|
- test/unit/shell_process_job_test.rb
|
@@ -610,8 +617,10 @@ files:
|
|
610
617
|
- webpack/InsightsHostDetailsTab/components/ListItem/ListItem.js
|
611
618
|
- webpack/InsightsHostDetailsTab/components/ListItem/index.js
|
612
619
|
- webpack/InsightsHostDetailsTab/index.js
|
613
|
-
- webpack/InsightsVulnerability/
|
614
|
-
- webpack/InsightsVulnerability/
|
620
|
+
- webpack/InsightsVulnerability/InsightsVulnerabilityListPage.js
|
621
|
+
- webpack/InsightsVulnerability/InsightsVulnerabilityListPage.test.js
|
622
|
+
- webpack/InsightsVulnerabilityHostIndexExtensions/CVECountCell.js
|
623
|
+
- webpack/InsightsVulnerabilityHostIndexExtensions/__tests__/CVECountCell.test.js
|
615
624
|
- webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js
|
616
625
|
- webpack/__mocks__/foremanReact/common/I18n.js
|
617
626
|
- webpack/__mocks__/foremanReact/common/MountingService.js
|
@@ -638,6 +647,7 @@ files:
|
|
638
647
|
- webpack/common/ForemanTasks/ForemanTasksHelpers.js
|
639
648
|
- webpack/common/ForemanTasks/index.js
|
640
649
|
- webpack/common/Hooks/ConfigHooks.js
|
650
|
+
- webpack/common/ScalprumModule/ScalprumContext.js
|
641
651
|
- webpack/common/Switcher/HelpLabel.js
|
642
652
|
- webpack/common/Switcher/SwitcherPF4.js
|
643
653
|
- webpack/common/Switcher/SwitcherPF4.scss
|
@@ -671,7 +681,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
671
681
|
- !ruby/object:Gem::Version
|
672
682
|
version: '0'
|
673
683
|
requirements: []
|
674
|
-
rubygems_version: 3.6.
|
684
|
+
rubygems_version: 3.6.9
|
675
685
|
specification_version: 4
|
676
686
|
summary: Summary of ForemanRhCloud.
|
677
687
|
test_files:
|
@@ -679,6 +689,7 @@ test_files:
|
|
679
689
|
- test/controllers/insights_cloud/api/advisor_engine_controller_test.rb
|
680
690
|
- test/controllers/insights_cloud/api/cloud_request_controller_test.rb
|
681
691
|
- test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb
|
692
|
+
- test/controllers/insights_cloud/ui_requests_controller_test.rb
|
682
693
|
- test/controllers/insights_sync/settings_controller_test.rb
|
683
694
|
- test/controllers/inventory_upload/api/inventory_controller_test.rb
|
684
695
|
- test/controllers/inventory_upload/cloud_status_controller_test.rb
|
@@ -715,8 +726,10 @@ test_files:
|
|
715
726
|
- test/unit/services/foreman_rh_cloud/cloud_status_service_test.rb
|
716
727
|
- test/unit/services/foreman_rh_cloud/hit_remediations_retriever_test.rb
|
717
728
|
- test/unit/services/foreman_rh_cloud/hits_uploader_test.rb
|
729
|
+
- test/unit/services/foreman_rh_cloud/insights_api_forwarder_test.rb
|
718
730
|
- test/unit/services/foreman_rh_cloud/insights_status_cleaner_test.rb
|
719
731
|
- test/unit/services/foreman_rh_cloud/rules_ingester_test.rb
|
732
|
+
- test/unit/services/foreman_rh_cloud/tags_auth_test.rb
|
720
733
|
- test/unit/services/foreman_rh_cloud/template_renderer_helper_test.rb
|
721
734
|
- test/unit/services/foreman_rh_cloud/url_remediations_retriever_test.rb
|
722
735
|
- test/unit/shell_process_job_test.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
|
3
|
-
import { translate as __ } from 'foremanReact/common/I18n';
|
4
|
-
|
5
|
-
const InsightsVulnerability = () => (
|
6
|
-
<PageLayout searchable={false} header={__('Vulnerability')}>
|
7
|
-
<div className="insights-vulnerability">
|
8
|
-
<p>This page is under development. Please check back soon for updates.</p>
|
9
|
-
</div>
|
10
|
-
</PageLayout>
|
11
|
-
);
|
12
|
-
|
13
|
-
export default InsightsVulnerability;
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { render, screen } from '@testing-library/react';
|
3
|
-
import '@testing-library/jest-dom';
|
4
|
-
import InsightsVulnerability from './InsightsVulnerability';
|
5
|
-
|
6
|
-
describe('InsightsVulnerability component', () => {
|
7
|
-
it('renders the "under development" message', () => {
|
8
|
-
render(<InsightsVulnerability />);
|
9
|
-
expect(
|
10
|
-
screen.getByText(/this page is under development/i)
|
11
|
-
).toBeInTheDocument();
|
12
|
-
});
|
13
|
-
|
14
|
-
it('renders the container with correct class', () => {
|
15
|
-
const { container } = render(<InsightsVulnerability />);
|
16
|
-
expect(container.querySelector('.insights-vulnerability')).toBeTruthy();
|
17
|
-
});
|
18
|
-
});
|