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]); @@ -68,33 +53,20 @@ const ActivationKeys = ({ } }, [activationKeys, onChange]); + 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)} + + + + )} ); }; @@ -142,10 +134,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/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 = () => {