diff --git a/package.json b/package.json
index e0e0dcf6c..dad1a0ab4 100644
--- a/package.json
+++ b/package.json
@@ -29,8 +29,7 @@
"prettier": "^1.19.1",
"redux-mock-store": "^1.2.2",
"graphql-tag": "^2.11.0",
- "graphql": "^15.5.0",
- "victory-core": "~36.8.6"
+ "graphql": "^15.5.0"
},
"peerDependencies": {
"@theforeman/vendor": ">= 12.0.1"
diff --git a/webpack/JobInvocationDetail/JobInvocationDetail.scss b/webpack/JobInvocationDetail/JobInvocationDetail.scss
index 6cc58986e..f68500355 100644
--- a/webpack/JobInvocationDetail/JobInvocationDetail.scss
+++ b/webpack/JobInvocationDetail/JobInvocationDetail.scss
@@ -15,22 +15,22 @@
.legend-title {
font-weight: bold;
- font-size: var(--pf-global--FontSize--sm);
+ font-size: var(--pf-v5-global--FontSize--sm);
margin-left: 8px;
margin-bottom: 0;
}
- .pf-c-description-list {
+ .pf-v5-c-description-list {
margin-left: 8px;
margin-top: 8px;
- .pf-c-description-list__term .pf-c-description-list__text {
+ .pf-v5-c-description-list__term .pf-v5-c-description-list__text {
font-weight: normal;
}
}
}
- .pf-c-divider {
+ .pf-v5-c-divider {
max-height: $chart_size;
}
diff --git a/webpack/JobInvocationDetail/JobInvocationToolbarButtons.js b/webpack/JobInvocationDetail/JobInvocationToolbarButtons.js
index 02e838c70..8f24dc71b 100644
--- a/webpack/JobInvocationDetail/JobInvocationToolbarButtons.js
+++ b/webpack/JobInvocationDetail/JobInvocationToolbarButtons.js
@@ -2,15 +2,17 @@ import PropTypes from 'prop-types';
import React, { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import {
- Button,
- Dropdown,
- DropdownItem,
- DropdownPosition,
- DropdownSeparator,
- DropdownToggle,
- Split,
- SplitItem,
+ Button,
+ Split,
+ SplitItem
} from '@patternfly/react-core';
+import {
+ Dropdown,
+ DropdownItem,
+ DropdownPosition,
+ DropdownSeparator,
+ DropdownToggle
+} from '@patternfly/react-core/deprecated';
import { translate as __ } from 'foremanReact/common/I18n';
import { foremanUrl } from 'foremanReact/common/helpers';
import { STATUS as APIStatus } from 'foremanReact/constants';
@@ -242,7 +244,7 @@ const JobInvocationToolbarButtons = ({
,
]}
splitButtonVariant="action"
- onToggle={setIsActionOpen}
+ onToggle={(_event, val) => setIsActionOpen(val)}
/>
}
isOpen={isActionOpen}
diff --git a/webpack/JobInvocationDetail/__tests__/MainInformation.test.js b/webpack/JobInvocationDetail/__tests__/MainInformation.test.js
index bfcc4d158..4cb75633e 100644
--- a/webpack/JobInvocationDetail/__tests__/MainInformation.test.js
+++ b/webpack/JobInvocationDetail/__tests__/MainInformation.test.js
@@ -97,7 +97,7 @@ describe('JobInvocationDetailPage', () => {
expect(screen.getByText('Description')).toBeInTheDocument();
expect(
- container.querySelector('.chart-donut .pf-c-chart')
+ container.querySelector('.chart-donut .pf-v5-c-chart')
).toBeInTheDocument();
expect(screen.getByText('2/6')).toBeInTheDocument();
expect(screen.getByText('Systems')).toBeInTheDocument();
@@ -116,22 +116,22 @@ describe('JobInvocationDetailPage', () => {
Object.entries(informationToCheck).forEach(([term, expectedText]) => {
const termContainers = container.querySelectorAll(
- '.pf-c-description-list__term .pf-c-description-list__text'
+ '.pf-v5-c-description-list__term .pf-v5-c-description-list__text'
);
termContainers.forEach(termContainer => {
if (termContainer.textContent.includes(term)) {
let descriptionContainer;
if (term === 'SSH user:') {
descriptionContainer = termContainer
- .closest('.pf-c-description-list__group')
+ .closest('.pf-v5-c-description-list__group')
.querySelector(
- '.pf-c-description-list__description .pf-c-description-list__text .disabled-text'
+ '.pf-v5-c-description-list__description .pf-v5-c-description-list__text .disabled-text'
);
} else {
descriptionContainer = termContainer
- .closest('.pf-c-description-list__group')
+ .closest('.pf-v5-c-description-list__group')
.querySelector(
- '.pf-c-description-list__description .pf-c-description-list__text'
+ '.pf-v5-c-description-list__description .pf-v5-c-description-list__text'
);
}
expect(descriptionContainer.textContent).toContain(expectedText);
diff --git a/webpack/JobWizard/Footer.js b/webpack/JobWizard/Footer.js
index 745844532..bf67d8648 100644
--- a/webpack/JobWizard/Footer.js
+++ b/webpack/JobWizard/Footer.js
@@ -2,12 +2,14 @@ import React from 'react';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import {
- Button,
- WizardFooter,
- WizardContextConsumer,
- Tooltip,
- Spinner,
+ Button,
+ Tooltip,
+ Spinner
} from '@patternfly/react-core';
+import {
+ WizardFooter,
+ WizardContextConsumer
+} from '@patternfly/react-core/deprecated';
import { translate as __ } from 'foremanReact/common/I18n';
import { WIZARD_TITLES } from './JobWizardConstants';
import { selectIsSubmitting } from './JobWizardSelectors';
diff --git a/webpack/JobWizard/JobWizard.js b/webpack/JobWizard/JobWizard.js
index 9f329ecd3..d10d57571 100644
--- a/webpack/JobWizard/JobWizard.js
+++ b/webpack/JobWizard/JobWizard.js
@@ -3,7 +3,9 @@
import React, { useState, useEffect, useCallback } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import PropTypes from 'prop-types';
-import { Wizard } from '@patternfly/react-core';
+import {
+ Wizard
+} from '@patternfly/react-core/deprecated';
import { get } from 'foremanReact/redux/API';
import history from 'foremanReact/history';
diff --git a/webpack/JobWizard/JobWizard.scss b/webpack/JobWizard/JobWizard.scss
index 0da73762f..08e3afb0b 100644
--- a/webpack/JobWizard/JobWizard.scss
+++ b/webpack/JobWizard/JobWizard.scss
@@ -1,21 +1,21 @@
.job-wizard {
- font-size: var(--pf-global--FontSize--md);
+ font-size: var(--pf-v5-global--FontSize--md);
.wizard-title {
margin-bottom: 25px;
}
- .pf-c-wizard__nav.pf-m-expanded {
+ .pf-v5-c-wizard__nav.pf-m-expanded {
z-index: calc(
- var(--pf-c-wizard__toggle--ZIndex) + 2
+ var(--pf-v5-cwizard__toggle--ZIndex) + 2
); // So the small screen navigation can be shown above the select box and wizard body
}
- .pf-c-wizard__main {
+ .pf-v5-c-wizard__main {
z-index: calc(
- var(--pf-c-wizard__toggle--ZIndex) + 1
+ var(--pf-v5-cwizard__toggle--ZIndex) + 1
); // So the select box can be shown above the wizard footer and navigation toggle
}
- .pf-c-wizard__main-body {
+ .pf-v5-c-wizard__main-body {
@media (max-width: 600px) {
max-width: 100%;
}
@@ -34,19 +34,19 @@
}
.gray-text {
- color: var(--pf-global--Color--dark-200);
+ color: var(--pf-v5-global--Color--dark-200);
}
.target-hosts-and-inputs {
- .pf-c-chip-group.pf-m-category {
+ .pf-v5-c-chip-group.pf-m-category {
margin-bottom: 10px;
}
- .pf-c-select__toggle-typeahead {
+ .pf-v5-c-select__toggle-typeahead {
border: 0px;
}
.target-method-select {
- .pf-c-select__toggle-wrapper {
+ .pf-v5-c-select__toggle-wrapper {
flex-wrap: nowrap;
}
}
@@ -63,8 +63,8 @@
display: grid;
grid-template-columns: repeat(7, 1fr);
}
- .pf-l-grid {
- gap: var(--pf-c-form--GridGap);
+ .pf-v5-l-grid {
+ gap: var(--pf-v5-cform--GridGap);
}
#repeat-on-hourly {
max-height: 300px;
@@ -99,14 +99,14 @@
.clear-datetime-button {
margin-left: 10px;
align-self: center;
- font-size: var(--pf-global--FontSize--md);
+ font-size: var(--pf-v5-global--FontSize--md);
}
- .pf-c-form__group-control {
+ .pf-v5-c-form__group-control {
display: flex;
flex-wrap: wrap;
}
}
- .pf-c-date-picker {
+ .pf-v5-c-date-picker {
vertical-align: top;
}
@@ -123,7 +123,7 @@
min-height: 40px;
min-width: 100px;
}
- .pf-c-modal-box {
+ .pf-v5-c-modal-box {
width: auto;
}
@@ -132,15 +132,15 @@
margin-left: 10px;
}
}
- .pf-c-radio__body {
- font-size: var(--pf-c-radio__label--FontSize);
+ .pf-v5-c-radio__body {
+ font-size: var(--pf-v5-cradio__label--FontSize);
}
.reset-default {
padding-bottom: 0;
}
}
-.job-wizard-alert.pf-c-alert.pf-m-warning {
+.job-wizard-alert.pf-v5-c-alert.pf-m-warning {
margin-bottom: 10px;
margin-top: 10px;
}
diff --git a/webpack/JobWizard/JobWizardPageRerun.js b/webpack/JobWizard/JobWizardPageRerun.js
index 8655d11b2..4fbfc99be 100644
--- a/webpack/JobWizard/JobWizardPageRerun.js
+++ b/webpack/JobWizard/JobWizardPageRerun.js
@@ -7,11 +7,10 @@ import {
Divider,
Skeleton,
Button,
- Title,
EmptyState,
EmptyStateVariant,
EmptyStateIcon,
- EmptyStateBody,
+ EmptyStateBody, EmptyStateHeader, EmptyStateFooter,
} from '@patternfly/react-core';
import { ExclamationCircleIcon } from '@patternfly/react-icons';
import { global_palette_red_200 as exclamationColor } from '@patternfly/react-tokens';
@@ -63,15 +62,12 @@ const JobWizardPageRerun = ({
const currentLocation = useForemanLocation();
const emptyStateLarge = (
-
-
+ {__('Unable to run job')}>} icon={
-
- {__('Unable to run job')}
-
- {sprintf(errorMessage)}
+ />} headingLevel="h4" />
+ {sprintf(errorMessage)}
-
+
);
useEffect(() => {
diff --git a/webpack/JobWizard/PermissionDenied.js b/webpack/JobWizard/PermissionDenied.js
index 7f053cdde..7e70cfa17 100644
--- a/webpack/JobWizard/PermissionDenied.js
+++ b/webpack/JobWizard/PermissionDenied.js
@@ -3,11 +3,10 @@ import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import { Icon } from 'patternfly-react';
import {
- Title,
Button,
EmptyState,
EmptyStateVariant,
- EmptyStateBody,
+ EmptyStateBody, EmptyStateHeader, EmptyStateFooter,
} from '@patternfly/react-core';
const PermissionDenied = ({ missingPermissions, setProceedAnyway }) => {
@@ -37,10 +36,8 @@ const PermissionDenied = ({ missingPermissions, setProceedAnyway }) => {
-
- {__('Permission Denied')}
-
- {description}
+ {__('Permission Denied')}>} headingLevel="h5" />
+ {description}
-
+
);
};
diff --git a/webpack/JobWizard/__tests__/integration.test.js b/webpack/JobWizard/__tests__/integration.test.js
index e3e011233..8f3262c94 100644
--- a/webpack/JobWizard/__tests__/integration.test.js
+++ b/webpack/JobWizard/__tests__/integration.test.js
@@ -59,26 +59,28 @@ describe('Job wizard fill', () => {
);
- expect(wrapper.find('.pf-c-wizard__nav-link.pf-m-disabled')).toHaveLength(
- 5
- );
+ expect(
+ wrapper.find('.pf-v5-c-wizard__nav-link.pf-m-disabled')
+ ).toHaveLength(5);
selectors.selectJobCategoriesStatus.mockImplementation(() => 'RESOLVED');
expect(store.getActions()).toMatchSnapshot('initial');
selectors.selectJobTemplate.mockRestore();
jest.spyOn(selectors, 'selectJobTemplate');
selectors.selectJobTemplate.mockImplementation(() => jobTemplate);
- wrapper.find('.pf-c-button.pf-c-select__toggle-button').simulate('click');
+ wrapper
+ .find('.pf-v5-c-button.pf-v5-c-select__toggle-button')
+ .simulate('click');
await act(async () => {
await wrapper
- .find('.pf-c-select__menu-item')
+ .find('.pf-v5-c-select__menu-item')
.first()
.simulate('click');
});
expect(store.getActions().slice(-1)).toMatchSnapshot('select template');
wrapper.update();
- expect(wrapper.find('.pf-c-wizard__nav-link.pf-m-disabled')).toHaveLength(
- 0
- );
+ expect(
+ wrapper.find('.pf-v5-c-wizard__nav-link.pf-m-disabled')
+ ).toHaveLength(0);
});
it('have all steps', async () => {
diff --git a/webpack/JobWizard/steps/AdvancedFields/DescriptionField.js b/webpack/JobWizard/steps/AdvancedFields/DescriptionField.js
index 2bcd24c20..d85a0710f 100644
--- a/webpack/JobWizard/steps/AdvancedFields/DescriptionField.js
+++ b/webpack/JobWizard/steps/AdvancedFields/DescriptionField.js
@@ -1,7 +1,15 @@
import React, { useState, useEffect, useCallback } from 'react';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
-import { FormGroup, TextInput, Tooltip, Button } from '@patternfly/react-core';
+import {
+ FormGroup,
+ TextInput,
+ Tooltip,
+ Button,
+ FormHelperText,
+ HelperText,
+ HelperTextItem,
+} from '@patternfly/react-core';
import { translate as __ } from 'foremanReact/common/I18n';
import {
selectTemplateInputs,
@@ -55,18 +63,6 @@ export const DescriptionField = ({
}
fieldId="description"
- helperText={
-
- }
>
{isPreview ? (
@@ -89,9 +85,25 @@ export const DescriptionField = ({
autoComplete="description"
id="description"
value={value}
- onChange={newValue => setValue(newValue)}
+ onChange={(_event, newValue) => setValue(newValue)}
/>
)}
+
+
+
+
+
+
+
);
};
diff --git a/webpack/JobWizard/steps/AdvancedFields/Fields.js b/webpack/JobWizard/steps/AdvancedFields/Fields.js
index ecb07d97f..1bcaa6c83 100644
--- a/webpack/JobWizard/steps/AdvancedFields/Fields.js
+++ b/webpack/JobWizard/steps/AdvancedFields/Fields.js
@@ -25,7 +25,7 @@ export const EffectiveUserField = ({ value, setValue, defaultValue }) => (
id="effective-user"
type="text"
value={value}
- onChange={newValue => setValue(newValue)}
+ onChange={(_event, newValue) => setValue(newValue)}
/>
);
@@ -94,7 +94,7 @@ export const PasswordField = ({ value, setValue }) => (
type="password"
placeholder="*****"
value={value}
- onChange={newValue => setValue(newValue)}
+ onChange={(_event, newValue) => setValue(newValue)}
/>
);
@@ -118,7 +118,7 @@ export const KeyPassphraseField = ({ value, setValue }) => (
type="password"
placeholder="*****"
value={value}
- onChange={newValue => setValue(newValue)}
+ onChange={(_event, newValue) => setValue(newValue)}
/>
);
@@ -142,7 +142,7 @@ export const EffectiveUserPasswordField = ({ value, setValue }) => (
type="password"
placeholder="*****"
value={value}
- onChange={newValue => setValue(newValue)}
+ onChange={(_event, newValue) => setValue(newValue)}
/>
);
@@ -228,7 +228,7 @@ export const SSHUserField = ({ value, setValue, defaultValue }) => (
id="ssh-user"
type="text"
value={value}
- onChange={newValue => setValue(newValue)}
+ onChange={(_event, newValue) => setValue(newValue)}
/>
);
diff --git a/webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js b/webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js
index 850b6e617..531fac5b4 100644
--- a/webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js
+++ b/webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js
@@ -44,18 +44,20 @@ describe('AdvancedFields', () => {
);
// setup
- wrapper.find('.pf-c-button.pf-c-select__toggle-button').simulate('click');
wrapper
- .find('.pf-c-select__menu-item')
+ .find('.pf-v5-c-button.pf-v5-c-select__toggle-button')
+ .simulate('click');
+ wrapper
+ .find('.pf-v5-c-select__menu-item')
.first()
.simulate('click');
// test
- expect(wrapper.find('.pf-c-wizard__nav-link.pf-m-disabled')).toHaveLength(
- 0
- );
+ expect(
+ wrapper.find('.pf-v5-c-wizard__nav-link.pf-m-disabled')
+ ).toHaveLength(0);
wrapper
- .find('.pf-c-wizard__nav-link')
+ .find('.pf-v5-c-wizard__nav-link')
.at(2)
.simulate('click'); // Advanced step
@@ -64,7 +66,7 @@ describe('AdvancedFields', () => {
});
const effectiveUserInput = () => wrapper.find('input#effective-user');
const advancedTemplateInput = () =>
- wrapper.find('.pf-c-form__group-control textarea');
+ wrapper.find('.pf-v5-c-form__group-control textarea');
const effectiveUesrValue = 'effective user new value';
const advancedTemplateInputValue = 'advanced input new value';
effectiveUserInput().getDOMNode().value = effectiveUesrValue;
@@ -79,15 +81,15 @@ describe('AdvancedFields', () => {
);
wrapper
- .find('.pf-c-wizard__nav-link')
+ .find('.pf-v5-c-wizard__nav-link')
.at(1)
.simulate('click');
- expect(wrapper.find('.pf-c-wizard__nav-link.pf-m-current').text()).toEqual(
- 'Target hosts and inputs'
- );
+ expect(
+ wrapper.find('.pf-v5-c-wizard__nav-link.pf-m-current').text()
+ ).toEqual('Target hosts and inputs');
wrapper
- .find('.pf-c-wizard__nav-link')
+ .find('.pf-v5-c-wizard__nav-link')
.at(2)
.simulate('click'); // Advanced step
diff --git a/webpack/JobWizard/steps/HostsAndInputs/SelectAPI.js b/webpack/JobWizard/steps/HostsAndInputs/SelectAPI.js
index 4d072a0c0..efdea0a46 100644
--- a/webpack/JobWizard/steps/HostsAndInputs/SelectAPI.js
+++ b/webpack/JobWizard/steps/HostsAndInputs/SelectAPI.js
@@ -1,7 +1,9 @@
import React from 'react';
import { useSelector, useDispatch } from 'react-redux';
import URI from 'urijs';
-import { SelectVariant } from '@patternfly/react-core';
+import {
+ SelectVariant
+} from '@patternfly/react-core/deprecated';
import { get } from 'foremanReact/redux/API';
import { selectResponse, selectIsLoading } from '../../JobWizardSelectors';
import { SearchSelect } from '../form/SearchSelect';
diff --git a/webpack/JobWizard/steps/HostsAndInputs/SelectGQL.js b/webpack/JobWizard/steps/HostsAndInputs/SelectGQL.js
index 884bc6958..b6f7c4168 100644
--- a/webpack/JobWizard/steps/HostsAndInputs/SelectGQL.js
+++ b/webpack/JobWizard/steps/HostsAndInputs/SelectGQL.js
@@ -1,6 +1,8 @@
import React, { useState } from 'react';
import { useQuery } from '@apollo/client';
-import { SelectVariant } from '@patternfly/react-core';
+import {
+ SelectVariant
+} from '@patternfly/react-core/deprecated';
import {
useForemanOrganization,
useForemanLocation,
diff --git a/webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js b/webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js
index 816661e93..28c0723a5 100644
--- a/webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js
+++ b/webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js
@@ -43,7 +43,7 @@ describe('Hosts', () => {
await act(async () => {
fireEvent.click(
screen.getByText('host1', {
- selector: '.pf-c-select__menu-item',
+ selector: '.pf-v5-c-select__menu-item',
})
);
fireEvent.blur(select('hosts'));
@@ -56,7 +56,7 @@ describe('Hosts', () => {
fireEvent.click(screen.getByText('host2'));
});
fireEvent.click(
- screen.getByText('Hosts', { selector: '.pf-c-select__toggle-text' })
+ screen.getByText('Hosts', { selector: '.pf-v5-c-select__toggle-text' })
);
await act(async () => {
fireEvent.click(screen.getByText('Host groups'));
@@ -71,7 +71,7 @@ describe('Hosts', () => {
await act(async () => {
fireEvent.click(
screen.getByText('Host groups', {
- selector: '.pf-c-select__toggle-text',
+ selector: '.pf-v5-c-select__toggle-text',
})
);
});
@@ -128,7 +128,7 @@ describe('Hosts', () => {
expect(screen.queryAllByText('Hosts')).toHaveLength(1);
await act(async () => {
fireEvent.click(
- screen.getByText('Hosts', { selector: '.pf-c-select__toggle-text' })
+ screen.getByText('Hosts', { selector: '.pf-v5-c-select__toggle-text' })
);
});
expect(screen.queryAllByText('Host groups')).toHaveLength(1);
@@ -138,7 +138,7 @@ describe('Hosts', () => {
await act(async () => {
fireEvent.click(
// Close the select
- screen.getByText('Hosts', { selector: '.pf-c-select__toggle-text' })
+ screen.getByText('Hosts', { selector: '.pf-v5-c-select__toggle-text' })
);
});
});
diff --git a/webpack/JobWizard/steps/HostsAndInputs/index.js b/webpack/JobWizard/steps/HostsAndInputs/index.js
index 9661b76cd..065473af2 100644
--- a/webpack/JobWizard/steps/HostsAndInputs/index.js
+++ b/webpack/JobWizard/steps/HostsAndInputs/index.js
@@ -8,6 +8,9 @@ import {
InputGroup,
Text,
Spinner,
+ InputGroupItem,
+ FormHelperText,
+ HelperText,
} from '@patternfly/react-core';
import PropTypes from 'prop-types';
import { useSelector, useDispatch } from 'react-redux';
@@ -145,43 +148,40 @@ const HostsAndInputs = ({
/>
)}
>
diff --git a/webpack/JobWizard/steps/Schedule/ScheduleRecurring.js b/webpack/JobWizard/steps/Schedule/ScheduleRecurring.js
index 0b88ecba3..ad881f711 100644
--- a/webpack/JobWizard/steps/Schedule/ScheduleRecurring.js
+++ b/webpack/JobWizard/steps/Schedule/ScheduleRecurring.js
@@ -5,8 +5,10 @@ import {
FormGroup,
Radio,
TextInput,
- ValidatedOptions,
Divider,
+ FormHelperText,
+ HelperText,
+ HelperTextItem,
} from '@patternfly/react-core';
import { ExclamationCircleIcon } from '@patternfly/react-icons';
import { translate as __ } from 'foremanReact/common/I18n';
@@ -86,7 +88,7 @@ export const ScheduleRecurring = ({