From ab8ba2b78e5b53797c7025408f884920fa597688 Mon Sep 17 00:00:00 2001 From: MariaAga Date: Fri, 6 Sep 2024 17:06:23 +0100 Subject: [PATCH] Fixes #37752 - Update to Patternfly 5 --- .../components/ActivationKeysSearch/index.js | 13 +- .../components/Bookmark/AddBookmarkModal.js | 6 +- webpack/components/Bookmark/Bookmark.scss | 6 +- webpack/components/Bookmark/index.js | 9 +- webpack/components/EditableSwitch.js | 2 +- .../EditableTextInput/EditableTextInput.js | 2 +- webpack/components/Errata/index.js | 2 +- webpack/components/Loading.js | 16 +- webpack/components/Packages/index.js | 3 +- webpack/components/SelectAllCheckbox/index.js | 10 +- .../SelectableDropdown/SelectableDropdown.js | 13 +- webpack/components/Table/EmptyStateMessage.js | 26 ++-- webpack/components/Table/MainTable.js | 15 +- webpack/components/Table/MainTable.scss | 8 +- .../HostDetails/ActionsBar/index.js | 5 +- .../ChangeHostCVModal.js | 2 +- .../ContentViewDetailsCard.js | 10 +- .../__tests__/changeHostCVModal.test.js | 3 +- .../HostDetails/Cards/ErrataOverviewCard.scss | 2 +- .../HostCollectionsCard.js | 8 +- .../HostCollectionsCard.scss | 4 +- .../HostCollectionsModal.js | 2 +- .../__tests__/hostCollectionsModal.test.js | 34 +++-- .../SystemPurposeCard/SystemPurposeCard.js | 7 +- .../SystemPurposeCard/SystemPurposeCard.scss | 4 +- .../SystemPurposeEditModal.js | 14 +- .../__tests__/SystemPurposeCard.test.js | 9 +- .../__tests__/SystemPurposeEditModal.test.js | 31 ++-- .../Tabs/DebsTab/DebInstallModal.js | 14 +- .../Tabs/DebsTab/DebInstallModal.scss | 2 +- .../HostDetails/Tabs/DebsTab/DebsTab.js | 23 ++- .../HostDetails/Tabs/DebsTab/DebsTab.scss | 2 +- .../HostDetails/Tabs/ErrataTab/ErrataTab.js | 33 ++-- .../HostDetails/Tabs/ErrataTab/ErrataTab.scss | 2 +- .../Tabs/ModuleStreamsTab/ModuleStreamsTab.js | 19 ++- .../Tabs/PackagesTab/PackageInstallModal.js | 16 +- .../Tabs/PackagesTab/PackageInstallModal.scss | 2 +- .../Tabs/PackagesTab/PackagesTab.js | 30 ++-- .../Tabs/PackagesTab/PackagesTab.scss | 2 +- .../RepositorySetsTab/RepositorySetsTab.js | 14 +- .../Tabs/TracesTab/EnableTracerModal.js | 8 +- .../Tabs/TracesTab/EnableTracerModal.scss | 2 +- .../Tabs/TracesTab/TracesEnabler.js | 25 ++- .../HostDetails/Tabs/TracesTab/TracesTab.js | 22 ++- .../Tabs/__tests__/debsInstallModal.test.js | 15 +- .../Tabs/__tests__/debsTab.test.js | 70 ++++++--- .../Tabs/__tests__/errataTab.test.js | 142 ++++++++++++------ .../Tabs/__tests__/moduleStreamsTab.test.js | 21 ++- .../__tests__/packageInstallModal.test.js | 15 +- .../Tabs/__tests__/packagesTab.test.js | 92 ++++++++---- .../Tabs/__tests__/repositorySetsTab.test.js | 75 ++++++--- .../Tabs/__tests__/tracesTab.test.js | 75 ++++++--- .../BulkActions/BulkErrataWizard/04_Review.js | 18 ++- .../BulkErrataWizard/04_ReviewFooter.js | 8 +- .../BulkErrataWizard/BulkErrataWizard.js | 8 +- .../BulkPackagesWizard/04_Review.js | 18 ++- .../BulkPackagesWizard/04_ReviewFooter.js | 8 +- .../BulkPackagesWizard/BulkPackagesWizard.js | 15 +- .../__tests__/bulkChangeHostCVModal.test.js | 3 +- .../__snapshots__/ActivationKeys.test.js.snap | 31 ++-- .../__snapshots__/Force.test.js.snap | 2 +- .../IgnoreSubmanErrors.test.js.snap | 2 +- .../fields/ActivationKeys.js | 87 +++++------ webpack/containers/Application/overrides.scss | 10 +- webpack/ouia_id_check.js | 26 ++-- .../__tests__/activationKeyDetails.test.js | 18 ++- .../Details/components/DeleteMenu.js | 14 +- .../Details/components/EditModal.js | 6 +- .../Create/ACSCreateWizard.js | 4 +- .../Create/Steps/ACSCreateFinish.js | 4 +- .../Create/Steps/ACSCredentials.js | 15 +- .../Create/Steps/ACSSmartProxies.js | 2 +- .../Create/Steps/AcsUrlPaths.js | 29 +++- .../Create/Steps/NameACS.js | 4 +- .../Create/Steps/SelectSource.js | 2 +- .../Create/__tests__/acsCreate.test.js | 9 +- .../Details/ACSExpandableDetails.js | 30 ++-- .../Details/EditModals/ACSEditCredentials.js | 12 +- .../Details/EditModals/ACSEditDetails.js | 4 +- .../Details/EditModals/ACSEditSmartProxies.js | 2 +- .../Details/EditModals/ACSEditURLPaths.js | 40 ++++- .../Details/__tests__/ACSEdits.test.js | 15 +- .../__tests__/ACSExpandableDetails.test.js | 6 +- .../MainTable/ACSTable.js | 16 +- .../MainTable/__tests__/acsTable.test.js | 6 +- .../Details/__tests__/contentDetail.test.js | 12 +- .../Content/__tests__/contentTable.test.js | 6 +- .../ContentViews/Copy/CopyContentViewForm.js | 2 +- .../Copy/__tests__/copyContentView.test.js | 3 +- .../Create/CreateContentViewForm.js | 89 ++++++++--- .../Create/CreateContentViewForm.scss | 4 +- .../__tests__/createContentView.test.js | 12 +- .../Delete/ContentViewDeleteWizard.js | 4 +- .../Steps/CVDeleteEnvironmentsSelection.js | 12 +- .../CVDeletionReassignActivationKeysForm.js | 9 +- .../Steps/CVDeletionReassignHostsForm.js | 9 +- .../Delete/Steps/CVDeletionReview.js | 6 +- .../Steps/CVEnvironmentSelectionForm.scss | 2 +- .../__tests__/contentViewDelete.test.js | 18 ++- .../ComponentContentViewAddModal.js | 21 ++- .../ComponentContentViewBulkAddModal.js | 24 ++- .../ComponentEnvironments.js | 2 +- .../ContentViewComponents.js | 13 +- .../__tests__/contentViewComponents.test.js | 98 ++++++++---- .../Details/ContentViewDetails.js | 6 +- .../Details/Filters/Add/CVFilterAddModal.js | 27 +++- .../Filters/Add/__tests__/cvFilterAdd.test.js | 6 +- .../AffectedRepositorySelection.js | 7 +- .../AffectedRepositoryTable.js | 4 +- .../Details/Filters/ArtifactsWithNoErrata.js | 2 +- .../Filters/CVContainerImageFilterContent.js | 6 +- .../Details/Filters/CVDebFilterContent.js | 14 +- .../Filters/CVErrataDateFilterContent.js | 30 +++- .../Filters/CVErrataIDFilterContent.js | 28 +++- .../Filters/CVModuleStreamFilterContent.js | 18 ++- .../Filters/CVPackageGroupFilterContent.js | 18 ++- .../Details/Filters/CVRpmFilterContent.js | 14 +- .../Filters/ContentViewFilterDetailsHeader.js | 10 +- .../Details/Filters/ContentViewFilters.js | 12 +- .../__tests__/CVRpmMatchContentModal.test.js | 6 +- .../MatchContentModal/matchContentModal.scss | 2 +- .../DebPackage/AddEditDebPackageRuleModal.js | 4 +- .../Rules/Package/AddEditPackageRuleModal.js | 8 +- .../CVContainerImageFilterContent.test.js | 30 ++-- .../__tests__/CVRpmFilterContent.test.js | 18 +-- .../ContentViewPackageGroupFilter.test.js | 36 +++-- .../contentViewFilterDetails.test.js | 6 +- .../__tests__/contentViewFilters.test.js | 45 ++++-- .../cvErrataDateFilterContent.test.js | 13 +- .../__tests__/cvErrataIDFilter.test.js | 30 ++-- .../__tests__/cvModuleStreamFilter.test.js | 47 ++++-- .../Details/Histories/ContentViewHistories.js | 4 +- .../__tests__/contentViewHistory.test.js | 6 +- .../Promote/ContentViewVersionPromote.js | 2 +- .../Repositories/ContentViewRepositories.js | 12 +- .../__tests__/contentViewAddRemove.test.js | 9 +- .../Versions/BulkDelete/ActionSummary.js | 5 +- .../Versions/BulkDelete/BulkDeleteModal.js | 4 +- .../BulkDelete/Steps/ConfirmBulkDelete.js | 4 +- .../Steps/ReassignActivationKeys.js | 4 +- .../BulkDelete/Steps/ReassignHosts.js | 4 +- .../BulkDelete/Steps/ReviewEnvironments.js | 8 +- .../Versions/Compare/CVVersionCompare.scss | 14 +- .../Compare/CVVersionCompareHeader.js | 20 ++- .../ContentViewVersionEnvironments.js | 2 +- .../Details/Versions/ContentViewVersions.js | 16 +- .../Versions/Delete/RemoveCVVersionWizard.js | 4 +- .../RemoveSteps/CVEnvironmentSelectionForm.js | 18 +-- .../CVReassignActivationKeysForm.js | 9 +- .../Delete/RemoveSteps/CVReassignHostsForm.js | 9 +- .../RemoveSteps/CVVersionRemoveReview.js | 6 +- .../Delete/__tests__/cvVersionRemove.test.js | 30 ++-- .../ContentViewVersionDetails.scss | 10 +- .../ContentViewVersionDetailsHeader.js | 8 +- .../ContentViewVersionDetailsTable.js | 6 +- .../ContentViewVersionDetails.test.js | 9 +- .../ContentViewVersionDetailsEmpty.test.js | 3 +- .../__tests__/contentViewVersions.test.js | 12 +- .../__tests__/contentViewDetail.test.js | 12 +- .../ContentViews/Publish/CVPublishFinish.js | 10 +- .../ContentViews/Publish/CVPublishForm.js | 4 +- .../ContentViews/Publish/CVPublishReview.js | 6 +- .../Publish/PublishContentViewWizard.js | 4 +- .../__tests__/publishContentView.test.js | 22 ++- .../ContentViews/Publish/cvPublishForm.scss | 8 +- .../ContentViews/Table/ContentViewsTable.js | 4 +- .../__tests__/contentViewPage.test.js | 30 ++-- .../components/ContentViewIcon.js | 12 +- .../ContentViewSelect/ContentViewSelect.js | 5 +- .../ContentViewSelectOption.js | 7 +- .../components/EnvironmentLabels.js | 4 +- .../EnvironmentPaths/EnvironmentPaths.js | 2 +- .../EnvironmentPaths/EnvironmentPaths.scss | 2 +- .../components/FiltersAppliedIcon.js | 6 +- .../components/NeedsPublishIcon.js | 13 +- .../RelatedCompositeContentViewsModal.js | 6 +- .../contentViewComponentsModal.test.js | 3 +- .../components/ContentSourceForm.js | 8 +- .../components/ContentSourceTemplate.js | 4 +- .../components/FormField.js | 2 +- .../components/HostsModal.js | 2 +- webpack/scenes/RedHatRepositories/index.scss | 2 +- .../scenes/SmartProxy/ExpandableCvDetails.js | 8 +- .../SmartProxy/SmartProxyExpandableTable.js | 4 +- .../__tests__/SmartProxyContentTest.js | 3 +- .../CdnConfigurationForm.scss | 2 +- .../CdnConfigurationTab/CustomCdnTypeForm.js | 4 +- .../CdnConfigurationTab/NetworkSyncForm.js | 12 +- .../__tests__/CdnTypeForm.test.js | 3 +- .../__tests__/CustomCdnTypeForm.test.js | 3 +- .../__tests__/ExportSyncForm.test.js | 3 +- .../__tests__/NetworkSyncForm.test.js | 3 +- 192 files changed, 1766 insertions(+), 949 deletions(-) diff --git a/webpack/components/ActivationKeysSearch/index.js b/webpack/components/ActivationKeysSearch/index.js index 11ce44eefe6..c694bbce99c 100644 --- a/webpack/components/ActivationKeysSearch/index.js +++ b/webpack/components/ActivationKeysSearch/index.js @@ -5,13 +5,14 @@ import { FormGroup, Spinner, EmptyState, - Title, Button, + Alert, EmptyStateHeader, +} from '@patternfly/react-core'; +import { Select, SelectOption, SelectVariant, - Alert, -} from '@patternfly/react-core'; +} from '@patternfly/react-core/deprecated'; import { FormattedMessage } from 'react-intl'; import $ from 'jquery'; import { translate as __ } from 'foremanReact/common/I18n'; @@ -134,9 +135,7 @@ const ActivationKeysSearch = () => { if (!(selectedEnvId && selectedContentViewId)) { return ( - - {__('Please select a lifecycle environment and content view to view activation keys.')} - + {__('Please select a lifecycle environment and content view to view activation keys.')}} headingLevel="h4" /> ); } @@ -157,7 +156,7 @@ const ActivationKeysSearch = () => { + + + } + variant="error" + > + + Create new activation key + + + + `; diff --git a/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap b/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap index 8dab454e997..5eb5bfc07ae 100644 --- a/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +++ b/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap @@ -6,10 +6,10 @@ exports[`Force renders 1`] = ` > { handleInvalidField( 'Activation Keys', - akHasValidValue( - hostGroupId, - pluginValues?.activationKeys, - hostGroupActivationKeys, - ), + akHasValidValue(hostGroupId, pluginValues?.activationKeys, hostGroupActivationKeys), ); }, [handleInvalidField, hostGroupId, hostGroupActivationKeys, pluginValues]); + const isError = + validateAKField( + hasInteraction, + hostGroupId, + activationKeys, + pluginValues?.activationKeys, + hostGroupActivationKeys, + ) === 'error'; return ( setHasInteraction(true)} label={__('Activation Keys')} fieldId="activation_keys_field" - helperText={ - hostGroupActivationKeys && - sprintf('From host group: %s', hostGroupActivationKeys) - } - helperTextInvalid={ - activationKeys?.length === 0 ? ( - {__('Create new activation key')} - ) : ( - __('No Activation Keys selected') - ) - } - helperTextInvalidIcon={} - labelIcon={ - - } - validated={validateAKField( - hasInteraction, - hostGroupId, - activationKeys, - pluginValues?.activationKeys, - hostGroupActivationKeys, - )} + labelIcon={} isRequired > + {isError && ( + + + }> + {activationKeys?.length === 0 ? ( + {__('Create new activation key')} + ) : ( + __('No Activation Keys selected') + )} + + + + )} + {!isError && hostGroupActivationKeys && ( + + + + {sprintf('From host group: %s', hostGroupActivationKeys)} + + + + )} ); }; @@ -136,10 +128,7 @@ const ActivationKeys = ({ ActivationKeys.propTypes = { activationKeys: PropTypes.array, selectedKeys: PropTypes.array, - hostGroupActivationKeys: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.array, - ]), + hostGroupActivationKeys: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), hostGroupId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), pluginValues: PropTypes.shape({ activationKeys: PropTypes.array, diff --git a/webpack/containers/Application/overrides.scss b/webpack/containers/Application/overrides.scss index db911da7ec0..c282c0b48e9 100644 --- a/webpack/containers/Application/overrides.scss +++ b/webpack/containers/Application/overrides.scss @@ -122,7 +122,7 @@ html .pagination-pf-pagesize.btn-group { } // Modal sizing fix -.pf-l-bullseye .pf-c-modal-box { +.pf-l-bullseye .pf-v5-c-modal-box { margin-top: 76px; max-height: calc(100vh - 76px); @@ -168,24 +168,24 @@ html .pagination-pf-pagesize.btn-group { .primary-detail-border { border-top: 0.2px; - border-top-color: var(--pf-c-table--BorderColor); + border-top-color: var(--pf-v5-c-table--BorderColor); border-top-style: inset; } .primary-detail-stack-items-border { border-bottom: 0.2px; - border-bottom-color: var(--pf-c-table--BorderColor); + border-bottom-color: var(--pf-v5-c-table--BorderColor); border-bottom-style: inset; } .border-left { border-left: 0.2px; - border-left-color: var(--pf-c-table--BorderColor); + border-left-color: var(--pf-v5-c-table--BorderColor); border-left-style: inset; } .border-right { border-right: 0.2px; - border-right-color: var(--pf-c-table--BorderColor); + border-right-color: var(--pf-v5-c-table--BorderColor); border-right-style: inset; } diff --git a/webpack/ouia_id_check.js b/webpack/ouia_id_check.js index b14c03e6d42..e9fc2f9af6e 100644 --- a/webpack/ouia_id_check.js +++ b/webpack/ouia_id_check.js @@ -7,12 +7,6 @@ import { Checkbox, Chip, ChipGroup, - ContextSelector, - Dropdown, - DropdownItem, - DropdownSeparator, - DropdownToggle, - DropdownToggleCheckbox, FormSelect, Menu, Modal, @@ -20,10 +14,8 @@ import { Nav, NavExpandable, NavItem, - OptionsMenu, Pagination, Radio, - Select, Switch, TabButton, TabContent, @@ -34,10 +26,22 @@ import { Toolbar, } from '@patternfly/react-core'; import { - Table, - TableComposable, + ContextSelector, + Dropdown, + DropdownItem, + DropdownSeparator, + DropdownToggle, + DropdownToggleCheckbox, + OptionsMenu, + Select, +} from '@patternfly/react-core/deprecated'; +import { Tr, } from '@patternfly/react-table'; +import { + Table as TableDeprecated, + Table, +} from '@patternfly/react-table/deprecated'; const checkForOuiaIds = () => { const ouiaSupportedPFComponents = [ @@ -74,7 +78,7 @@ const checkForOuiaIds = () => { Title, Toolbar, Table, - TableComposable, + TableDeprecated, Tr, ]; beforeEach(() => { diff --git a/webpack/scenes/ActivationKeys/Details/__tests__/activationKeyDetails.test.js b/webpack/scenes/ActivationKeys/Details/__tests__/activationKeyDetails.test.js index a8ecc262172..6c5428b9f26 100644 --- a/webpack/scenes/ActivationKeys/Details/__tests__/activationKeyDetails.test.js +++ b/webpack/scenes/ActivationKeys/Details/__tests__/activationKeyDetails.test.js @@ -36,7 +36,8 @@ test('Makes API call and displays AK details on screen', async (done) => { expect(getByText('test description')).toBeInTheDocument(); expect(getByText('1/4')).toBeInTheDocument(); - assertNockRequest(akScope, done); + assertNockRequest(akScope); + done(); }); test('Displays placeholder when description is missing', async (done) => { @@ -54,7 +55,8 @@ test('Displays placeholder when description is missing', async (done) => { await patientlyWaitFor(() => expect(getByRole('heading', { name: 'test' })).toBeInTheDocument()); expect(getByText('No description provided')).toBeInTheDocument(); - assertNockRequest(akScope, done); + assertNockRequest(akScope); + done(); }); test('Delete menu appears when toggle is clicked', async (done) => { @@ -67,7 +69,8 @@ test('Delete menu appears when toggle is clicked', async (done) => { fireEvent.click(deleteToggle); await patientlyWaitFor(() => expect(getByText('Delete')).toBeInTheDocument()); - assertNockRequest(akScope, done); + assertNockRequest(akScope); + done(); }); test('Edit modal appears when button is clicked', async (done) => { @@ -79,7 +82,8 @@ test('Edit modal appears when button is clicked', async (done) => { fireEvent.click(editButton); await patientlyWaitFor(() => expect(getByText('Edit activation key')).toBeInTheDocument()); - assertNockRequest(akScope, done); + assertNockRequest(akScope); + done(); }); test('Page displays 0 when usage count is null', async (done) => { @@ -97,7 +101,8 @@ test('Page displays 0 when usage count is null', async (done) => { await patientlyWaitFor(() => expect(getByRole('heading', { name: 'test' })).toBeInTheDocument()); expect(getByText('0/4')).toBeInTheDocument(); - assertNockRequest(akScope, done); + assertNockRequest(akScope); + done(); }); test('Delete modal appears when link is clicked', async (done) => { @@ -113,5 +118,6 @@ test('Delete modal appears when link is clicked', async (done) => { fireEvent.click(deleteLink); await patientlyWaitFor(() => expect(getByText('Activation Key will no longer be available for use. This operation cannot be undone.')).toBeInTheDocument()); - assertNockRequest(akScope, done); + assertNockRequest(akScope); + done(); }); diff --git a/webpack/scenes/ActivationKeys/Details/components/DeleteMenu.js b/webpack/scenes/ActivationKeys/Details/components/DeleteMenu.js index a778a84491a..ce1270ebd5d 100644 --- a/webpack/scenes/ActivationKeys/Details/components/DeleteMenu.js +++ b/webpack/scenes/ActivationKeys/Details/components/DeleteMenu.js @@ -2,7 +2,17 @@ import React, { useState, } from 'react'; import PropTypes from 'prop-types'; -import { Dropdown, DropdownItem, KebabToggle, DropdownPosition, Split, Icon, Text } from '@patternfly/react-core'; +import { + Split, + Icon, + Text, +} from '@patternfly/react-core'; +import { + Dropdown, + DropdownItem, + KebabToggle, + DropdownPosition, +} from '@patternfly/react-core/deprecated'; import { UndoIcon, TrashIcon } from '@patternfly/react-icons'; import { noop } from 'foremanReact/common/helpers'; import { translate as __ } from 'foremanReact/common/I18n'; @@ -56,7 +66,7 @@ const DeleteMenu = ({ handleModalToggle, akId }) => { ouiaId="dekete-action" onSelect={onSelect} position={DropdownPosition.right} - toggle={} + toggle={ onToggle(isOpenValue)} />} isOpen={isOpen} isPlain dropdownItems={dropdownItems} diff --git a/webpack/scenes/ActivationKeys/Details/components/EditModal.js b/webpack/scenes/ActivationKeys/Details/components/EditModal.js index dce67c293af..2ac6ad0c14f 100644 --- a/webpack/scenes/ActivationKeys/Details/components/EditModal.js +++ b/webpack/scenes/ActivationKeys/Details/components/EditModal.js @@ -131,7 +131,7 @@ const EditModal = ({ akDetails, akId }) => { id="ak-name-input" type="text" value={nameValue} - onChange={handleNameInputChange} + onChange={(_event, value) => handleNameInputChange(value)} /> { minusBtnAriaLabel="minus" plusBtnAriaLabel="plus" isDisabled={isUnlimited} - allowEmptyInput + /> @@ -172,7 +172,7 @@ const EditModal = ({ akDetails, akId }) => { type="text" placeholder={__('Description')} value={descriptionValue || ''} - onChange={handleDescriptionInputChange} + onChange={(_event, value) => handleDescriptionInputChange(value)} /> diff --git a/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js b/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js index 0f3a41105f2..24d28810574 100644 --- a/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +++ b/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js @@ -1,7 +1,9 @@ import React, { useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; import PropTypes from 'prop-types'; -import { Wizard } from '@patternfly/react-core'; +import { + Wizard, +} from '@patternfly/react-core/deprecated'; import { translate as __ } from 'foremanReact/common/I18n'; import ACSCreateContext from './ACSCreateContext'; import SelectSource from './Steps/SelectSource'; diff --git a/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js b/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js index 3beb374d835..637b92ff9a5 100644 --- a/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js +++ b/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js @@ -3,7 +3,9 @@ import { useDispatch, useSelector } from 'react-redux'; import { useHistory } from 'react-router-dom'; import PropTypes from 'prop-types'; import useDeepCompareEffect from 'use-deep-compare-effect'; -import { WizardContextConsumer } from '@patternfly/react-core'; +import { + WizardContextConsumer, +} from '@patternfly/react-core/deprecated'; import { translate as __ } from 'foremanReact/common/I18n'; import { STATUS } from 'foremanReact/constants'; import ACSCreateContext from '../ACSCreateContext'; diff --git a/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js b/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js index 40dd20d9ad4..523d9fc44d7 100644 --- a/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +++ b/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js @@ -76,7 +76,7 @@ const ACSCredentials = () => { name="acs_username_field" aria-label="acs_username_field" value={username} - onChange={(value) => { setUsername(value); }} + onChange={(_event, value) => { setUsername(value); }} /> @@ -93,7 +93,7 @@ const ACSCredentials = () => { name="acs_password_field" aria-label="acs_password_field" value={password} - onChange={(value) => { setPassword(value); }} + onChange={(_event, value) => { setPassword(value); }} /> @@ -122,7 +122,10 @@ const ACSCredentials = () => { ouiaId="sslCert-select" isRequired value={sslCert} - onChange={(value) => { setSslCert(value); setSslCertName(getCertName(value)); }} + onChange={(_event, value) => { + setSslCert(value); + setSslCertName(getCertName(value)); + }} aria-label="sslCert_select" > { @@ -152,7 +155,7 @@ const ACSCredentials = () => { ouiaId="sslKey-select" isRequired value={sslKey} - onChange={(value) => { setSslKey(value); setSslKeyName(getCertName(value)); }} + onChange={(_event, value) => { setSslKey(value); setSslKeyName(getCertName(value)); }} aria-label="sslKey_select" > { @@ -198,7 +201,7 @@ const ACSCredentials = () => { ouiaId="verify-ssl-switch" aria-label="verify-ssl-switch" isChecked={verifySSL} - onChange={checked => setVerifySSL(checked)} + onChange={(_event, checked) => setVerifySSL(checked)} /> { isDisabled={!verifySSL} isRequired value={caCert} - onChange={(value) => { setCACert(value); setCACertName(getCertName(value)); }} + onChange={(_event, value) => { setCACert(value); setCACertName(getCertName(value)); }} aria-label="sslCAcert_select" > { diff --git a/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js b/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js index 56a2881d7e3..f127c8d75a6 100644 --- a/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +++ b/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js @@ -58,7 +58,7 @@ const ACSSmartProxies = () => { ouiaId="use-http-proxies-switch" aria-label="use-http-proxies-switch" isChecked={useHttpProxies} - onChange={checked => setUseHttpProxies(checked)} + onChange={(_event, checked) => setUseHttpProxies(checked)} /> diff --git a/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js b/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js index 8d84f5e9c3e..9e67fea21f3 100644 --- a/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +++ b/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js @@ -6,6 +6,9 @@ import { FormGroup, TextInput, TextArea, + FormHelperText, + HelperText, + HelperTextItem, } from '@patternfly/react-core'; import ACSCreateContext from '../ACSCreateContext'; import WizardHeader from '../../../ContentViews/components/WizardHeader'; @@ -41,8 +44,6 @@ const AcsUrlPaths = () => { { placeholder={baseURLplaceholder} value={url} validated={urlValidated} - onChange={value => setUrl(value)} + onChange={(_event, value) => setUrl(value)} /> + {urlValidated === 'error' && ( + + + + {helperTextInvalid} + + + + )} {acsType === 'rhui' && <> @@ -73,19 +83,24 @@ const AcsUrlPaths = () => {