diff --git a/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap b/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap
index 93867f03..af825b32 100644
--- a/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap
+++ b/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap
@@ -10,13 +10,7 @@ exports[`ListItem rendering render with Props 1`] = `
- }
+ icon={}
variant="outline"
/>
test
diff --git a/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap b/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap
index e5d2c56e..d0270697 100644
--- a/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap
+++ b/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap
@@ -12,11 +12,7 @@ exports[`ListItemStatus rendering render with Props 1`] = `
Generating
-
+
handleFilterChange(v)}
/>
diff --git a/webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss b/webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss
index 4d65979d..5f27a1bd 100644
--- a/webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss
+++ b/webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss
@@ -1,5 +1,5 @@
#inventory_filter_form {
- .pf-c-form__group-control {
+ .pf-v5-c-form__group-control {
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
diff --git a/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.scss b/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.scss
index cd2a3cfe..162085a9 100644
--- a/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.scss
+++ b/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.scss
@@ -12,16 +12,16 @@
font-size: 16px;
}
- .pf-c-dropdown__toggle {
+ .pf-v5-c-dropdown__toggle {
margin-right: -20px;
}
.settings-alert {
margin-bottom: 30px;
- .pf-c-alert {
+ .pf-v5-c-alert {
margin-bottom: 5px;
- .pf-c-alert__title {
+ .pf-v5-c-alert__title {
font-size: var(--pf-global--FontSize--md);
line-height: var(--pf-global--LineHeight--md);
}
diff --git a/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js b/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js
index c77d9d58..ea090810 100644
--- a/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js
+++ b/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js
@@ -1,12 +1,14 @@
import React, { useState } from 'react';
import {
- Dropdown,
- DropdownItem,
- KebabToggle,
- DropdownPosition,
- Grid,
- GridItem,
+ Grid,
+ GridItem
} from '@patternfly/react-core';
+import {
+ Dropdown,
+ DropdownItem,
+ KebabToggle,
+ DropdownPosition
+} from '@patternfly/react-core/deprecated';
import Head from 'foremanReact/components/Head';
import {
INVENTORY_PAGE_TITLE,
@@ -58,7 +60,7 @@ const PageTitle = () => {
className="title-dropdown"
onSelect={() => setIsDropdownOpen(false)}
toggle={
- setIsDropdownOpen(isOpen)} />
+ setIsDropdownOpen(isOpen)} />
}
isOpen={isDropdownOpen}
isPlain
diff --git a/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js b/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js
index f2815da1..b6108315 100644
--- a/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js
+++ b/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js
@@ -2,7 +2,11 @@
import React, { useCallback, useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { useDispatch, useSelector } from 'react-redux';
-import { Table, TableBody, TableHeader } from '@patternfly/react-table';
+import {
+ Table,
+ TableBody,
+ TableHeader,
+} from '@patternfly/react-table/deprecated';
import {
Card,
CardTitle,
@@ -11,6 +15,7 @@ import {
ModalVariant,
Spinner,
Text,
+ Icon,
} from '@patternfly/react-core';
import {
CheckCircleIcon,
@@ -108,8 +113,18 @@ const CloudPingModal = ({ title, isOpen, toggle }) => {
const StatusIcon = ({ isPending, authStatus }) => {
if (isPending) return ;
- if (authStatus.success) return ;
- if (authStatus.error) return ;
+ if (authStatus.success)
+ return (
+
+
+
+ );
+ if (authStatus.error)
+ return (
+
+
+
+ );
return ;
};
diff --git a/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap b/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap
index 91cf9bb2..0acb0047 100644
--- a/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap
+++ b/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap
@@ -56,11 +56,7 @@ exports[`InventoryAutoUpload rendering render with props 1`] = `
>
Show Advanced Settings
-
+
@@ -78,11 +74,7 @@ exports[`InventoryAutoUpload rendering render with props 1`] = `
-
+
More details can be found in
diff --git a/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js b/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js
index ed0d83f1..eed853c3 100644
--- a/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js
+++ b/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js
@@ -1,7 +1,11 @@
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
-import { Table, TableHeader, TableBody } from '@patternfly/react-table';
+import {
+ Table,
+ TableHeader,
+ TableBody
+} from '@patternfly/react-table/deprecated';
import { useForemanSettings } from 'foremanReact/Root/Context/ForemanContext';
import SelectAllAlert from './SelectAllAlert';
import {
diff --git a/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableConstants.js b/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableConstants.js
index 946462bb..e42de03b 100644
--- a/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableConstants.js
+++ b/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableConstants.js
@@ -4,7 +4,9 @@ import {
InsightsLabel,
Section,
} from '@redhat-cloud-services/frontend-components';
-import { DropdownItem } from '@patternfly/react-core';
+import {
+ DropdownItem
+} from '@patternfly/react-core/deprecated';
import { sortable, cellWidth } from '@patternfly/react-table';
import { AnsibeTowerIcon, ExternalLinkAltIcon } from '@patternfly/react-icons';
import { translate as __ } from 'foremanReact/common/I18n';
diff --git a/webpack/InsightsCloudSync/Components/InsightsTable/Pagination.js b/webpack/InsightsCloudSync/Components/InsightsTable/Pagination.js
index 9811007a..12adfc33 100644
--- a/webpack/InsightsCloudSync/Components/InsightsTable/Pagination.js
+++ b/webpack/InsightsCloudSync/Components/InsightsTable/Pagination.js
@@ -20,13 +20,13 @@ const paginationTitles = {
page: '', // doesn't work well with translations as it adds 's' for plural, see: https://github.com/patternfly/patternfly-react/issues/6707
itemsPerPage: __('Items per page'),
perPageSuffix: __('per page'),
- toFirstPage: __('Go to first page'),
- toPreviousPage: __('Go to previous page'),
- toLastPage: __('Go to last page'),
- toNextPage: __('Go to next page'),
- optionsToggle: __('Items per page'),
- currPage: __('Current page'),
- paginationTitle: __('Pagination'),
+ toFirstPageAriaLabel: __('Go to first page'),
+ toPreviousPageAriaLabel: __('Go to previous page'),
+ toLastPageAriaLabel: __('Go to last page'),
+ toNextPageAriaLabel: __('Go to next page'),
+ optionsToggleAriaLabel: __('Items per page'),
+ currPageAriaLabel: __('Current page'),
+ paginationAriaLabel: __('Pagination'),
};
const Pagination = ({ variant, ...props }) => {
diff --git a/webpack/InsightsCloudSync/Components/InsightsTable/table.scss b/webpack/InsightsCloudSync/Components/InsightsTable/table.scss
index 265040cc..4ce5ae6c 100644
--- a/webpack/InsightsCloudSync/Components/InsightsTable/table.scss
+++ b/webpack/InsightsCloudSync/Components/InsightsTable/table.scss
@@ -1,5 +1,5 @@
.rh-cloud-recommendations-table {
- .pf-c-table__check {
+ .pf-v5-c-table__check {
input:disabled {
display: none;
}
diff --git a/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.js b/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.js
index 303b3a5b..19839a15 100644
--- a/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.js
+++ b/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.js
@@ -1,7 +1,11 @@
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
-import { Table, TableHeader, TableBody } from '@patternfly/react-table';
+import {
+ Table,
+ TableHeader,
+ TableBody
+} from '@patternfly/react-table/deprecated';
import { Modal, ModalVariant, Button } from '@patternfly/react-core';
import { isEmpty } from 'lodash';
import { STATUS } from 'foremanReact/constants';
diff --git a/webpack/InsightsCloudSync/Components/RemediationModal/RemediationTableConstants.js b/webpack/InsightsCloudSync/Components/RemediationModal/RemediationTableConstants.js
index 5faccc96..967e584c 100644
--- a/webpack/InsightsCloudSync/Components/RemediationModal/RemediationTableConstants.js
+++ b/webpack/InsightsCloudSync/Components/RemediationModal/RemediationTableConstants.js
@@ -1,11 +1,12 @@
import React from 'react';
import { cellWidth } from '@patternfly/react-table';
+import { Icon } from '@patternfly/react-core';
import { CheckCircleIcon } from '@patternfly/react-icons';
import { translate as __ } from 'foremanReact/common/I18n';
import { foremanUrl } from '../../../ForemanRhCloudHelpers';
export const rebootFormatter = ({ title: reboot }) => ({
- children: reboot ? : __('No'),
+ children: reboot ? : __('No'),
});
export const columns = [
diff --git a/webpack/InsightsCloudSync/Components/ToolbarDropdown.js b/webpack/InsightsCloudSync/Components/ToolbarDropdown.js
index f6c82ad5..199dd613 100644
--- a/webpack/InsightsCloudSync/Components/ToolbarDropdown.js
+++ b/webpack/InsightsCloudSync/Components/ToolbarDropdown.js
@@ -1,7 +1,11 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
-import { Dropdown, DropdownItem, KebabToggle } from '@patternfly/react-core';
+import {
+ Dropdown,
+ DropdownItem,
+ KebabToggle
+} from '@patternfly/react-core/deprecated';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import { redHatAdvisorSystems } from '../InsightsCloudSyncHelpers';
@@ -30,7 +34,7 @@ const ToolbarDropdown = ({ onRecommendationSync }) => {
setIsDropdownOpen(false)}
- toggle={ setIsDropdownOpen(isOpen)} />}
+ toggle={ setIsDropdownOpen(isOpen)} />}
isOpen={isDropdownOpen}
isPlain
dropdownItems={dropdownItems}
diff --git a/webpack/InsightsCloudSync/InsightsCloudSync.scss b/webpack/InsightsCloudSync/InsightsCloudSync.scss
index 3cb19e81..bda35960 100644
--- a/webpack/InsightsCloudSync/InsightsCloudSync.scss
+++ b/webpack/InsightsCloudSync/InsightsCloudSync.scss
@@ -78,7 +78,7 @@
width: 100%;
}
- .pf-c-pagination {
+ .pf-v5-c-pagination {
padding-right: 0;
}
}
diff --git a/webpack/InsightsHostDetailsTab/InsightsTotalRiskChart.js b/webpack/InsightsHostDetailsTab/InsightsTotalRiskChart.js
index a8b9d9f7..335cbe5c 100644
--- a/webpack/InsightsHostDetailsTab/InsightsTotalRiskChart.js
+++ b/webpack/InsightsHostDetailsTab/InsightsTotalRiskChart.js
@@ -3,7 +3,13 @@ import PropTypes from 'prop-types';
import { useDispatch } from 'react-redux';
import { push } from 'connected-react-router';
import { useHistory } from 'react-router-dom';
-import { DropdownItem, Bullseye, Title } from '@patternfly/react-core';
+import {
+ Bullseye,
+ Title
+} from '@patternfly/react-core';
+import {
+ DropdownItem
+} from '@patternfly/react-core/deprecated';
import { ChartDonut, ChartLegend, ChartLabel } from '@patternfly/react-charts';
import { STATUS } from 'foremanReact/constants';
import { useAPI } from 'foremanReact/common/hooks/API/APIHooks';
diff --git a/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js b/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js
index ef85747b..f7fac8ac 100644
--- a/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js
+++ b/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js
@@ -4,12 +4,14 @@ import { useDispatch, useSelector } from 'react-redux';
import SearchBar from 'foremanReact/components/SearchBar';
import { translate as __ } from 'foremanReact/common/I18n';
import {
- Grid,
- GridItem,
- Dropdown,
- DropdownItem,
- KebabToggle,
+ Grid,
+ GridItem
} from '@patternfly/react-core';
+import {
+ Dropdown,
+ DropdownItem,
+ KebabToggle
+} from '@patternfly/react-core/deprecated';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import InsightsTable from '../InsightsCloudSync/Components/InsightsTable';
import RemediationModal from '../InsightsCloudSync/Components/RemediationModal';
@@ -74,7 +76,7 @@ const NewHostDetailsTab = ({ hostName, router }) => {
ouiaId="insights-dropdown"
onSelect={() => setIsDropdownOpen(false)}
toggle={
- setIsDropdownOpen(isOpen)} />
+ setIsDropdownOpen(isOpen)} />
}
isOpen={isDropdownOpen}
isPlain
diff --git a/webpack/common/DropdownToggle.js b/webpack/common/DropdownToggle.js
index 72d8d689..767fdffa 100644
--- a/webpack/common/DropdownToggle.js
+++ b/webpack/common/DropdownToggle.js
@@ -1,13 +1,16 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
-import { Dropdown, KebabToggle } from '@patternfly/react-core';
+import {
+ Dropdown,
+ KebabToggle
+} from '@patternfly/react-core/deprecated';
const DropdownToggle = ({ items, ...props }) => {
const [isOpen, setOpen] = useState(false);
return (
setOpen(false)}
- toggle={ setOpen(value)} />}
+ toggle={ setOpen(value)} />}
isOpen={isOpen}
isPlain
dropdownItems={items}
diff --git a/webpack/common/Switcher/HelpLabel.js b/webpack/common/Switcher/HelpLabel.js
index 8830561d..688f510e 100644
--- a/webpack/common/Switcher/HelpLabel.js
+++ b/webpack/common/Switcher/HelpLabel.js
@@ -9,7 +9,7 @@ export const HelpLabel = ({ text, id, className }) => {
diff --git a/webpack/common/Switcher/SwitcherPF4.scss b/webpack/common/Switcher/SwitcherPF4.scss
index c9d7abbc..4906876e 100644
--- a/webpack/common/Switcher/SwitcherPF4.scss
+++ b/webpack/common/Switcher/SwitcherPF4.scss
@@ -7,7 +7,7 @@ label.foreman-rh-cloud-switcher {
padding-left: 5px;
}
- .pf-c-switch__toggle {
+ .pf-v5-c-switch__toggle {
margin-right: 5px;
}
}
diff --git a/webpack/common/Switcher/__tests__/__snapshots__/HelpLabel.test.js.snap b/webpack/common/Switcher/__tests__/__snapshots__/HelpLabel.test.js.snap
index 461a70f3..05081bb0 100644
--- a/webpack/common/Switcher/__tests__/__snapshots__/HelpLabel.test.js.snap
+++ b/webpack/common/Switcher/__tests__/__snapshots__/HelpLabel.test.js.snap
@@ -7,14 +7,10 @@ exports[`InsightsCloudSync helpers should return insights cloud Url 1`] = `
id="some-id-help"
>
`;
diff --git a/webpack/common/table/EmptyState.js b/webpack/common/table/EmptyState.js
index 66fdc1d4..a6ca3721 100644
--- a/webpack/common/table/EmptyState.js
+++ b/webpack/common/table/EmptyState.js
@@ -4,9 +4,8 @@ import {
EmptyState,
EmptyStateIcon,
Spinner,
- EmptyStateVariant,
- Title,
-} from '@patternfly/react-core';
+ EmptyStateVariant, EmptyStateHeader,
+ } from '@patternfly/react-core';
import { ExclamationCircleIcon, CheckIcon } from '@patternfly/react-icons';
import { STATUS } from 'foremanReact/constants';
@@ -16,33 +15,24 @@ const TableEmptyState = ({ status, error, rowsLength }) => {
switch (status) {
case STATUS.PENDING:
return (
-
-
-
- {__('Loading')}
-
+
+ {__('Loading')}>} icon={} headingLevel="h2" />
);
case STATUS.ERROR:
return (
-
-
-
- {sprintf(__('The server returned the following error: %s'), error)}
-
+
+ {sprintf(__('The server returned the following error: %s'), error)}>} icon={} headingLevel="h2" />
);
case STATUS.RESOLVED:
if (rowsLength > 0) return null;
return (
-
-
-
- {__('There are no recommendations for your hosts')}
-
+
+ {__('There are no recommendations for your hosts')}>} icon={} headingLevel="h2" />
);
default: