foreman_rh_cloud 11.4.4 → 12.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/README.md +3 -3
- data/app/controllers/api/v2/rh_cloud/inventory_controller.rb +2 -2
- data/app/controllers/insights_cloud/api/machine_telemetries_controller.rb +22 -26
- data/app/services/foreman_rh_cloud/cloud_request.rb +2 -12
- data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +3 -17
- data/app/services/foreman_rh_cloud/rules_ingester.rb +1 -12
- data/config/routes.rb +0 -4
- data/lib/foreman_inventory_upload/async/queue_for_upload_job.rb +3 -3
- data/lib/foreman_inventory_upload/async/upload_report_job.rb +4 -4
- data/lib/foreman_inventory_upload/generators/fact_helpers.rb +13 -65
- data/lib/foreman_inventory_upload/generators/queries.rb +3 -5
- data/lib/foreman_inventory_upload/generators/slice.rb +1 -0
- data/lib/foreman_rh_cloud/engine.rb +0 -11
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/lib/foreman_rh_cloud.rb +0 -2
- data/lib/tasks/hybrid_cloud.rake +36 -94
- data/package.json +5 -5
- data/test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb +2 -14
- data/test/controllers/inventory_upload/api/inventory_controller_test.rb +1 -1
- data/test/jobs/upload_report_job_test.rb +1 -1
- data/test/unit/fact_helpers_test.rb +2 -267
- data/test/unit/slice_generator_test.rb +10 -69
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap +1 -7
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap +1 -5
- data/webpack/ForemanInventoryUpload/Components/AccountList/accountList.scss +3 -3
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss +1 -1
- data/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.scss +5 -5
- data/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js +5 -4
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js +18 -3
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js +0 -1
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +0 -1
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +2 -10
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js +5 -1
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableConstants.js +1 -1
- data/webpack/InsightsCloudSync/Components/InsightsTable/Pagination.js +7 -7
- data/webpack/InsightsCloudSync/Components/InsightsTable/table.scss +1 -1
- data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.js +5 -1
- data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationTableConstants.js +8 -1
- data/webpack/InsightsCloudSync/Components/ToolbarDropdown.js +8 -2
- data/webpack/InsightsCloudSync/InsightsCloudSync.scss +1 -1
- data/webpack/InsightsHostDetailsTab/InsightsTotalRiskChart.js +11 -2
- data/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js +5 -4
- data/webpack/common/DropdownToggle.js +2 -2
- data/webpack/common/Switcher/HelpLabel.js +1 -1
- data/webpack/common/Switcher/SwitcherPF4.scss +1 -1
- data/webpack/common/Switcher/__tests__/__snapshots__/HelpLabel.test.js.snap +2 -6
- data/webpack/common/table/EmptyState.js +25 -18
- metadata +3 -35
@@ -1,7 +1,11 @@
|
|
1
1
|
/* eslint-disable react-hooks/exhaustive-deps */
|
2
2
|
import React, { useEffect } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
|
-
import {
|
4
|
+
import {
|
5
|
+
Table,
|
6
|
+
TableHeader,
|
7
|
+
TableBody,
|
8
|
+
} from '@patternfly/react-table/deprecated';
|
5
9
|
import { useForemanSettings } from 'foremanReact/Root/Context/ForemanContext';
|
6
10
|
import SelectAllAlert from './SelectAllAlert';
|
7
11
|
import {
|
@@ -4,7 +4,7 @@ import {
|
|
4
4
|
InsightsLabel,
|
5
5
|
Section,
|
6
6
|
} from '@redhat-cloud-services/frontend-components';
|
7
|
-
import { DropdownItem } from '@patternfly/react-core';
|
7
|
+
import { DropdownItem } from '@patternfly/react-core/deprecated';
|
8
8
|
import { sortable, cellWidth } from '@patternfly/react-table';
|
9
9
|
import { AnsibeTowerIcon, ExternalLinkAltIcon } from '@patternfly/react-icons';
|
10
10
|
import { translate as __ } from 'foremanReact/common/I18n';
|
@@ -20,13 +20,13 @@ const paginationTitles = {
|
|
20
20
|
page: '', // doesn't work well with translations as it adds 's' for plural, see: https://github.com/patternfly/patternfly-react/issues/6707
|
21
21
|
itemsPerPage: __('Items per page'),
|
22
22
|
perPageSuffix: __('per page'),
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
toFirstPageAriaLabel: __('Go to first page'),
|
24
|
+
toPreviousPageAriaLabel: __('Go to previous page'),
|
25
|
+
toLastPageAriaLabel: __('Go to last page'),
|
26
|
+
toNextPageAriaLabel: __('Go to next page'),
|
27
|
+
optionsToggleAriaLabel: __('Items per page'),
|
28
|
+
currPageAriaLabel: __('Current page'),
|
29
|
+
paginationAriaLabel: __('Pagination'),
|
30
30
|
};
|
31
31
|
|
32
32
|
const Pagination = ({ variant, ...props }) => {
|
@@ -1,7 +1,11 @@
|
|
1
1
|
/* eslint-disable react-hooks/exhaustive-deps */
|
2
2
|
import React, { useEffect } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
|
-
import {
|
4
|
+
import {
|
5
|
+
Table,
|
6
|
+
TableHeader,
|
7
|
+
TableBody,
|
8
|
+
} from '@patternfly/react-table/deprecated';
|
5
9
|
import { Modal, ModalVariant, Button } from '@patternfly/react-core';
|
6
10
|
import { isEmpty } from 'lodash';
|
7
11
|
import { STATUS } from 'foremanReact/constants';
|
@@ -1,11 +1,18 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { cellWidth } from '@patternfly/react-table';
|
3
|
+
import { Icon } from '@patternfly/react-core';
|
3
4
|
import { CheckCircleIcon } from '@patternfly/react-icons';
|
4
5
|
import { translate as __ } from 'foremanReact/common/I18n';
|
5
6
|
import { foremanUrl } from '../../../ForemanRhCloudHelpers';
|
6
7
|
|
7
8
|
export const rebootFormatter = ({ title: reboot }) => ({
|
8
|
-
children: reboot ?
|
9
|
+
children: reboot ? (
|
10
|
+
<Icon color="green">
|
11
|
+
<CheckCircleIcon />
|
12
|
+
</Icon>
|
13
|
+
) : (
|
14
|
+
__('No')
|
15
|
+
),
|
9
16
|
});
|
10
17
|
|
11
18
|
export const columns = [
|
@@ -1,7 +1,11 @@
|
|
1
1
|
import React, { useState } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { translate as __ } from 'foremanReact/common/I18n';
|
4
|
-
import {
|
4
|
+
import {
|
5
|
+
Dropdown,
|
6
|
+
DropdownItem,
|
7
|
+
KebabToggle,
|
8
|
+
} from '@patternfly/react-core/deprecated';
|
5
9
|
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
|
6
10
|
import { redHatAdvisorSystems } from '../InsightsCloudSyncHelpers';
|
7
11
|
import { useAdvisorEngineConfig } from '../../common/Hooks/ConfigHooks';
|
@@ -35,7 +39,9 @@ const ToolbarDropdown = ({ onRecommendationSync }) => {
|
|
35
39
|
<Dropdown
|
36
40
|
className="title-dropdown"
|
37
41
|
onSelect={() => setIsDropdownOpen(false)}
|
38
|
-
toggle={
|
42
|
+
toggle={
|
43
|
+
<KebabToggle onToggle={(_event, isOpen) => setIsDropdownOpen(isOpen)} />
|
44
|
+
}
|
39
45
|
isOpen={isDropdownOpen}
|
40
46
|
isPlain
|
41
47
|
dropdownItems={dropdownItems}
|
@@ -3,8 +3,14 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import { useDispatch } from 'react-redux';
|
4
4
|
import { push } from 'connected-react-router';
|
5
5
|
import { useHistory } from 'react-router-dom';
|
6
|
-
import {
|
7
|
-
import {
|
6
|
+
import { Bullseye, Title } from '@patternfly/react-core';
|
7
|
+
import { DropdownItem } from '@patternfly/react-core/deprecated';
|
8
|
+
import {
|
9
|
+
ChartDonut,
|
10
|
+
ChartLegend,
|
11
|
+
ChartLabel,
|
12
|
+
ChartTooltip,
|
13
|
+
} from '@patternfly/react-charts';
|
8
14
|
import { STATUS } from 'foremanReact/constants';
|
9
15
|
import { useAPI } from 'foremanReact/common/hooks/API/APIHooks';
|
10
16
|
import CardTemplate from 'foremanReact/components/HostDetails/Templates/CardItem/CardTemplate';
|
@@ -90,6 +96,9 @@ const InsightsTotalRiskCard = ({ hostDetails: { id } }) => {
|
|
90
96
|
{ x: critical.title, y: critical.value },
|
91
97
|
]}
|
92
98
|
labels={({ datum: { x, y } }) => `${x}: ${y}`}
|
99
|
+
labelComponent={
|
100
|
+
<ChartTooltip constrainToVisibleArea renderInPortal={false} />
|
101
|
+
}
|
93
102
|
legendComponent={legend}
|
94
103
|
legendPosition="right"
|
95
104
|
subTitle="Recommendations"
|
@@ -3,13 +3,12 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
4
4
|
import SearchBar from 'foremanReact/components/SearchBar';
|
5
5
|
import { translate as __ } from 'foremanReact/common/I18n';
|
6
|
+
import { Grid, GridItem } from '@patternfly/react-core';
|
6
7
|
import {
|
7
|
-
Grid,
|
8
|
-
GridItem,
|
9
8
|
Dropdown,
|
10
9
|
DropdownItem,
|
11
10
|
KebabToggle,
|
12
|
-
} from '@patternfly/react-core';
|
11
|
+
} from '@patternfly/react-core/deprecated';
|
13
12
|
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
|
14
13
|
import InsightsTable from '../InsightsCloudSync/Components/InsightsTable';
|
15
14
|
import RemediationModal from '../InsightsCloudSync/Components/RemediationModal';
|
@@ -76,7 +75,9 @@ const NewHostDetailsTab = ({ hostName, router }) => {
|
|
76
75
|
ouiaId="insights-dropdown"
|
77
76
|
onSelect={() => setIsDropdownOpen(false)}
|
78
77
|
toggle={
|
79
|
-
<KebabToggle
|
78
|
+
<KebabToggle
|
79
|
+
onToggle={(_event, isOpen) => setIsDropdownOpen(isOpen)}
|
80
|
+
/>
|
80
81
|
}
|
81
82
|
isOpen={isDropdownOpen}
|
82
83
|
isPlain
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React, { useState } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import { Dropdown, KebabToggle } from '@patternfly/react-core';
|
3
|
+
import { Dropdown, KebabToggle } from '@patternfly/react-core/deprecated';
|
4
4
|
|
5
5
|
const DropdownToggle = ({ items, ...props }) => {
|
6
6
|
const [isOpen, setOpen] = useState(false);
|
7
7
|
return (
|
8
8
|
<Dropdown
|
9
9
|
onSelect={() => setOpen(false)}
|
10
|
-
toggle={<KebabToggle onToggle={value => setOpen(value)} />}
|
10
|
+
toggle={<KebabToggle onToggle={(_event, value) => setOpen(value)} />}
|
11
11
|
isOpen={isOpen}
|
12
12
|
isPlain
|
13
13
|
dropdownItems={items}
|
@@ -9,7 +9,7 @@ export const HelpLabel = ({ text, id, className }) => {
|
|
9
9
|
<Popover id={`${id}-help`} bodyContent={text} aria-label="help-text">
|
10
10
|
<button
|
11
11
|
onClick={e => e.preventDefault()}
|
12
|
-
className={`pf-c-form__group-label-help ${className}`}
|
12
|
+
className={`pf-v5-c-form__group-label-help ${className}`}
|
13
13
|
>
|
14
14
|
<HelpIcon />
|
15
15
|
</button>
|
@@ -7,14 +7,10 @@ exports[`InsightsCloudSync helpers should return insights cloud Url 1`] = `
|
|
7
7
|
id="some-id-help"
|
8
8
|
>
|
9
9
|
<button
|
10
|
-
className="pf-c-form__group-label-help some-class"
|
10
|
+
className="pf-v5-c-form__group-label-help some-class"
|
11
11
|
onClick={[Function]}
|
12
12
|
>
|
13
|
-
<HelpIcon
|
14
|
-
color="currentColor"
|
15
|
-
noVerticalAlign={false}
|
16
|
-
size="sm"
|
17
|
-
/>
|
13
|
+
<HelpIcon />
|
18
14
|
</button>
|
19
15
|
</Popover>
|
20
16
|
`;
|
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
EmptyStateIcon,
|
6
6
|
Spinner,
|
7
7
|
EmptyStateVariant,
|
8
|
-
|
8
|
+
EmptyStateHeader,
|
9
9
|
} from '@patternfly/react-core';
|
10
10
|
import { ExclamationCircleIcon, CheckIcon } from '@patternfly/react-icons';
|
11
11
|
|
@@ -16,33 +16,40 @@ const TableEmptyState = ({ status, error, rowsLength }) => {
|
|
16
16
|
switch (status) {
|
17
17
|
case STATUS.PENDING:
|
18
18
|
return (
|
19
|
-
<EmptyState variant={EmptyStateVariant.
|
20
|
-
<
|
21
|
-
|
22
|
-
{
|
23
|
-
|
19
|
+
<EmptyState variant={EmptyStateVariant.sm}>
|
20
|
+
<EmptyStateHeader
|
21
|
+
titleText={<>{__('Loading')}</>}
|
22
|
+
icon={<EmptyStateIcon icon={Spinner} />}
|
23
|
+
headingLevel="h2"
|
24
|
+
/>
|
24
25
|
</EmptyState>
|
25
26
|
);
|
26
27
|
case STATUS.ERROR:
|
27
28
|
return (
|
28
|
-
<EmptyState variant={EmptyStateVariant.
|
29
|
-
<
|
30
|
-
|
31
|
-
|
29
|
+
<EmptyState variant={EmptyStateVariant.sm}>
|
30
|
+
<EmptyStateHeader
|
31
|
+
titleText={
|
32
|
+
<>
|
33
|
+
{sprintf(
|
34
|
+
__('The server returned the following error: %s'),
|
35
|
+
error
|
36
|
+
)}
|
37
|
+
</>
|
38
|
+
}
|
39
|
+
icon={<EmptyStateIcon icon={ExclamationCircleIcon} />}
|
40
|
+
headingLevel="h2"
|
32
41
|
/>
|
33
|
-
<Title headingLevel="h2" size="lg">
|
34
|
-
{sprintf(__('The server returned the following error: %s'), error)}
|
35
|
-
</Title>
|
36
42
|
</EmptyState>
|
37
43
|
);
|
38
44
|
case STATUS.RESOLVED:
|
39
45
|
if (rowsLength > 0) return null;
|
40
46
|
return (
|
41
|
-
<EmptyState variant={EmptyStateVariant.
|
42
|
-
<
|
43
|
-
|
44
|
-
{
|
45
|
-
|
47
|
+
<EmptyState variant={EmptyStateVariant.lg}>
|
48
|
+
<EmptyStateHeader
|
49
|
+
titleText={<>{__('There are no recommendations for your hosts')}</>}
|
50
|
+
icon={<EmptyStateIcon icon={CheckIcon} />}
|
51
|
+
headingLevel="h2"
|
52
|
+
/>
|
46
53
|
</EmptyState>
|
47
54
|
);
|
48
55
|
default:
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_rh_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 12.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Red Hat Cloud team
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: foreman_ansible
|
@@ -16,9 +16,6 @@ dependencies:
|
|
16
16
|
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
18
|
version: 15.0.0
|
19
|
-
- - "<"
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 16.0.0
|
22
19
|
type: :runtime
|
23
20
|
prerelease: false
|
24
21
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,29 +23,6 @@ dependencies:
|
|
26
23
|
- - ">="
|
27
24
|
- !ruby/object:Gem::Version
|
28
25
|
version: 15.0.0
|
29
|
-
- - "<"
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version: 16.0.0
|
32
|
-
- !ruby/object:Gem::Dependency
|
33
|
-
name: foreman_remote_execution
|
34
|
-
requirement: !ruby/object:Gem::Requirement
|
35
|
-
requirements:
|
36
|
-
- - ">="
|
37
|
-
- !ruby/object:Gem::Version
|
38
|
-
version: 15.0.0
|
39
|
-
- - "<"
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: 16.0.0
|
42
|
-
type: :runtime
|
43
|
-
prerelease: false
|
44
|
-
version_requirements: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - ">="
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: 15.0.0
|
49
|
-
- - "<"
|
50
|
-
- !ruby/object:Gem::Version
|
51
|
-
version: 16.0.0
|
52
26
|
- !ruby/object:Gem::Dependency
|
53
27
|
name: foreman-tasks
|
54
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,9 +30,6 @@ dependencies:
|
|
56
30
|
- - ">="
|
57
31
|
- !ruby/object:Gem::Version
|
58
32
|
version: 10.0.0
|
59
|
-
- - "<"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 11.0.0
|
62
33
|
type: :runtime
|
63
34
|
prerelease: false
|
64
35
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -66,9 +37,6 @@ dependencies:
|
|
66
37
|
- - ">="
|
67
38
|
- !ruby/object:Gem::Version
|
68
39
|
version: 10.0.0
|
69
|
-
- - "<"
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: 11.0.0
|
72
40
|
- !ruby/object:Gem::Dependency
|
73
41
|
name: katello
|
74
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -697,7 +665,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
697
665
|
- !ruby/object:Gem::Version
|
698
666
|
version: '0'
|
699
667
|
requirements: []
|
700
|
-
rubygems_version: 3.6.
|
668
|
+
rubygems_version: 3.6.2
|
701
669
|
specification_version: 4
|
702
670
|
summary: Summary of ForemanRhCloud.
|
703
671
|
test_files:
|