foreman_remote_execution 15.0.2 → 16.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/app/controllers/api/v2/job_templates_controller.rb +3 -0
- data/app/views/api/v2/job_invocations/main.json.rabl +1 -1
- data/lib/foreman_remote_execution/engine.rb +1 -1
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/locale/foreman_remote_execution.pot +138 -135
- data/package.json +8 -7
- data/webpack/JobInvocationDetail/JobAdditionInfo.js +4 -4
- data/webpack/JobInvocationDetail/JobInvocationDetail.scss +5 -5
- data/webpack/JobInvocationDetail/JobInvocationHostTable.js +7 -4
- data/webpack/JobInvocationDetail/JobInvocationHostTableToolbar.js +8 -3
- data/webpack/JobInvocationDetail/JobInvocationToolbarButtons.js +3 -5
- data/webpack/JobInvocationDetail/TemplateInvocationComponents/OutputToggleGroup.js +1 -1
- data/webpack/JobInvocationDetail/TemplateInvocationComponents/PreviewTemplate.js +3 -10
- data/webpack/JobInvocationDetail/TemplateInvocationComponents/TemplateActionButtons.js +5 -5
- data/webpack/JobInvocationDetail/TemplateInvocationComponents/index.scss +1 -1
- data/webpack/JobInvocationDetail/__tests__/MainInformation.test.js +6 -6
- data/webpack/JobInvocationDetail/__tests__/TemplateInvocation.test.js +1 -1
- data/webpack/JobInvocationDetail/__tests__/fixtures.js +1 -0
- data/webpack/JobInvocationDetail/index.js +14 -13
- data/webpack/JobWizard/Footer.js +2 -4
- data/webpack/JobWizard/JobWizard.js +1 -1
- data/webpack/JobWizard/JobWizard.scss +19 -19
- data/webpack/JobWizard/JobWizardPageRerun.js +22 -16
- data/webpack/JobWizard/PermissionDenied.js +15 -11
- data/webpack/JobWizard/__tests__/integration.test.js +10 -8
- data/webpack/JobWizard/steps/AdvancedFields/DescriptionField.js +26 -14
- data/webpack/JobWizard/steps/AdvancedFields/Fields.js +5 -5
- data/webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js +14 -12
- data/webpack/JobWizard/steps/HostsAndInputs/SelectAPI.js +1 -1
- data/webpack/JobWizard/steps/HostsAndInputs/SelectGQL.js +1 -1
- data/webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js +5 -5
- data/webpack/JobWizard/steps/HostsAndInputs/index.js +41 -36
- data/webpack/JobWizard/steps/ReviewDetails/ReviewDetails.test.js +3 -3
- data/webpack/JobWizard/steps/ReviewDetails/index.js +1 -1
- data/webpack/JobWizard/steps/Schedule/PurposeField.js +1 -1
- data/webpack/JobWizard/steps/Schedule/RepeatCron.js +1 -1
- data/webpack/JobWizard/steps/Schedule/RepeatDaily.js +1 -1
- data/webpack/JobWizard/steps/Schedule/RepeatHour.js +6 -4
- data/webpack/JobWizard/steps/Schedule/RepeatMonth.js +1 -1
- data/webpack/JobWizard/steps/Schedule/RepeatWeek.js +1 -1
- data/webpack/JobWizard/steps/Schedule/ScheduleFuture.js +10 -3
- data/webpack/JobWizard/steps/Schedule/ScheduleRecurring.js +29 -19
- data/webpack/JobWizard/steps/form/DateTimePicker.js +1 -1
- data/webpack/JobWizard/steps/form/FormHelpers.js +7 -4
- data/webpack/JobWizard/steps/form/Formatter.js +3 -1
- data/webpack/JobWizard/steps/form/GroupedSelectField.js +3 -3
- data/webpack/JobWizard/steps/form/NumberInput.js +17 -7
- data/webpack/JobWizard/steps/form/ResourceSelect.js +8 -4
- data/webpack/JobWizard/steps/form/SearchSelect.js +6 -2
- data/webpack/JobWizard/steps/form/SelectField.js +3 -2
- data/webpack/react_app/components/FeaturesDropdown/index.js +1 -1
- data/webpack/react_app/components/FeaturesDropdown/index.scss +2 -2
- data/webpack/react_app/components/HostKebab/KebabItems.js +1 -1
- data/webpack/react_app/components/RecentJobsCard/RecentJobsCard.js +2 -1
- data/webpack/react_app/components/RecentJobsCard/RecentJobsTable.js +3 -3
- data/webpack/react_app/components/RecentJobsCard/styles.scss +3 -3
- data/webpack/react_app/components/RegistrationExtension/RexInterface.js +5 -3
- data/webpack/react_app/components/RegistrationExtension/RexPull.js +1 -1
- data/webpack/react_app/components/RegistrationExtension/__tests__/__snapshots__/RexInterface.test.js.snap +6 -6
- metadata +2 -2
data/package.json
CHANGED
@@ -19,20 +19,21 @@
|
|
19
19
|
},
|
20
20
|
"devDependencies": {
|
21
21
|
"@babel/core": "^7.7.0",
|
22
|
-
"@theforeman/builder": ">=
|
23
|
-
"@theforeman/eslint-plugin-foreman": ">=
|
24
|
-
"@theforeman/eslint-plugin-rules": ">=
|
25
|
-
"@theforeman/test": ">=
|
26
|
-
"@theforeman/vendor-dev": ">=
|
22
|
+
"@theforeman/builder": ">= 15.0.1",
|
23
|
+
"@theforeman/eslint-plugin-foreman": ">= 15.0.1",
|
24
|
+
"@theforeman/eslint-plugin-rules": ">= 15.0.1",
|
25
|
+
"@theforeman/test": ">= 15.0.1",
|
26
|
+
"@theforeman/vendor-dev": ">= 15.0.1",
|
27
27
|
"babel-eslint": "^10.0.0",
|
28
28
|
"eslint": "^6.8.0",
|
29
29
|
"prettier": "^1.19.1",
|
30
30
|
"redux-mock-store": "^1.2.2",
|
31
31
|
"graphql-tag": "^2.11.0",
|
32
32
|
"graphql": "^15.5.0",
|
33
|
-
"victory-core": "~36.8.6"
|
33
|
+
"victory-core": "~36.8.6",
|
34
|
+
"victory-pie": "~36.8.6"
|
34
35
|
},
|
35
36
|
"peerDependencies": {
|
36
|
-
"@theforeman/vendor": ">=
|
37
|
+
"@theforeman/vendor": ">= 15.0.1"
|
37
38
|
}
|
38
39
|
}
|
@@ -69,7 +69,7 @@ const Schedule = ({ data }) => {
|
|
69
69
|
return (
|
70
70
|
<ExpandableSection
|
71
71
|
toggleText={__('Schedule')}
|
72
|
-
onToggle={setIsExpanded}
|
72
|
+
onToggle={(_event, val) => setIsExpanded(val)}
|
73
73
|
isExpanded={isExpanded}
|
74
74
|
>
|
75
75
|
<DataList isCompact>
|
@@ -107,7 +107,7 @@ const Recurring = ({ data }) => {
|
|
107
107
|
return (
|
108
108
|
<ExpandableSection
|
109
109
|
toggleText={__('Recurring logic')}
|
110
|
-
onToggle={setIsExpanded}
|
110
|
+
onToggle={(_event, val) => setIsExpanded(val)}
|
111
111
|
isExpanded={isExpanded}
|
112
112
|
>
|
113
113
|
<DataList isCompact>
|
@@ -149,7 +149,7 @@ const TargetHosts = ({ data }) => {
|
|
149
149
|
return (
|
150
150
|
<ExpandableSection
|
151
151
|
toggleText={__('Target Hosts')}
|
152
|
-
onToggle={setIsExpanded}
|
152
|
+
onToggle={(_event, val) => setIsExpanded(val)}
|
153
153
|
isExpanded={isExpanded}
|
154
154
|
>
|
155
155
|
<span>{targetingSelectioning}</span>{' '}
|
@@ -173,7 +173,7 @@ const Inputs = ({ data }) => {
|
|
173
173
|
return (
|
174
174
|
<ExpandableSection
|
175
175
|
toggleText={__('User Inputs')}
|
176
|
-
onToggle={setIsExpanded}
|
176
|
+
onToggle={(_event, val) => setIsExpanded(val)}
|
177
177
|
isExpanded={isExpanded}
|
178
178
|
>
|
179
179
|
<DataList isCompact>
|
@@ -15,22 +15,22 @@
|
|
15
15
|
|
16
16
|
.legend-title {
|
17
17
|
font-weight: bold;
|
18
|
-
font-size: var(--pf-global--FontSize--sm);
|
18
|
+
font-size: var(--pf-v5-global--FontSize--sm);
|
19
19
|
margin-left: 8px;
|
20
20
|
margin-bottom: 0;
|
21
21
|
}
|
22
22
|
|
23
|
-
.pf-c-description-list {
|
23
|
+
.pf-v5-c-description-list {
|
24
24
|
margin-left: 8px;
|
25
25
|
margin-top: 8px;
|
26
26
|
|
27
|
-
.pf-c-description-list__term .pf-c-description-list__text {
|
27
|
+
.pf-v5-c-description-list__term .pf-v5-c-description-list__text {
|
28
28
|
font-weight: normal;
|
29
29
|
}
|
30
30
|
}
|
31
31
|
}
|
32
32
|
|
33
|
-
.pf-c-divider {
|
33
|
+
.pf-v5-c-divider {
|
34
34
|
max-height: $chart_size;
|
35
35
|
}
|
36
36
|
|
@@ -104,7 +104,7 @@
|
|
104
104
|
margin-top: 10px;
|
105
105
|
}
|
106
106
|
|
107
|
-
.pf-c-toggle-group {
|
107
|
+
.pf-v5-c-toggle-group {
|
108
108
|
margin-bottom: 10px;
|
109
109
|
}
|
110
110
|
}
|
@@ -6,10 +6,10 @@ import { translate as __ } from 'foremanReact/common/I18n';
|
|
6
6
|
import { FormattedMessage } from 'react-intl';
|
7
7
|
import { Tr, Td, Tbody, ExpandableRowContent } from '@patternfly/react-table';
|
8
8
|
import {
|
9
|
-
Title,
|
10
9
|
EmptyState,
|
11
10
|
EmptyStateVariant,
|
12
11
|
EmptyStateBody,
|
12
|
+
EmptyStateHeader,
|
13
13
|
} from '@patternfly/react-core';
|
14
14
|
import { foremanUrl } from 'foremanReact/common/helpers';
|
15
15
|
import { useAPI } from 'foremanReact/common/hooks/API/APIHooks';
|
@@ -163,9 +163,10 @@ const JobInvocationHostTable = ({
|
|
163
163
|
<span className="empty-state-icon">
|
164
164
|
<Icon name="add-circle-o" type="pf" size="2x" />
|
165
165
|
</span>
|
166
|
-
<
|
167
|
-
{__('No Results')}
|
168
|
-
|
166
|
+
<EmptyStateHeader
|
167
|
+
titleText={<>{__('No Results')}</>}
|
168
|
+
headingLevel="h5"
|
169
|
+
/>
|
169
170
|
<EmptyStateBody>
|
170
171
|
<div className="empty-state-description">
|
171
172
|
{targeting?.targeting_type === 'dynamic_query' ? (
|
@@ -217,10 +218,12 @@ const JobInvocationHostTable = ({
|
|
217
218
|
setShowAlert={setShowAlert}
|
218
219
|
results={results}
|
219
220
|
id={id}
|
221
|
+
key="OpenAlInvocations"
|
220
222
|
/>,
|
221
223
|
<JobInvocationHostTableToolbar
|
222
224
|
dropdownFilter={selectedFilter}
|
223
225
|
setDropdownFilter={wrapSetSelectedFilter}
|
226
|
+
key="JobInvocationHostTableToolbar"
|
224
227
|
/>,
|
225
228
|
]}
|
226
229
|
>
|
@@ -1,8 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { translate as __ } from 'foremanReact/common/I18n';
|
4
|
-
import {
|
5
|
-
|
4
|
+
import {
|
5
|
+
MenuToggle,
|
6
|
+
ToolbarItem,
|
7
|
+
Select,
|
8
|
+
SelectOption,
|
9
|
+
SelectList,
|
10
|
+
} from '@patternfly/react-core';
|
6
11
|
import { STATUS_TITLES } from './JobInvocationConstants';
|
7
12
|
|
8
13
|
const JobInvocationHostTableToolbar = ({
|
@@ -43,7 +48,7 @@ const JobInvocationHostTableToolbar = ({
|
|
43
48
|
{Object.values(STATUS_TITLES).map(result => (
|
44
49
|
<SelectOption
|
45
50
|
key={result.id}
|
46
|
-
|
51
|
+
value={result.id}
|
47
52
|
isSelected={result.id === dropdownFilter}
|
48
53
|
>
|
49
54
|
{result.title}
|
@@ -1,16 +1,14 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
2
|
import React, { useEffect, useState } from 'react';
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
4
|
+
import { Button, Split, SplitItem } from '@patternfly/react-core';
|
4
5
|
import {
|
5
|
-
Button,
|
6
6
|
Dropdown,
|
7
7
|
DropdownItem,
|
8
8
|
DropdownPosition,
|
9
9
|
DropdownSeparator,
|
10
10
|
DropdownToggle,
|
11
|
-
|
12
|
-
SplitItem,
|
13
|
-
} from '@patternfly/react-core';
|
11
|
+
} from '@patternfly/react-core/deprecated';
|
14
12
|
import { translate as __ } from 'foremanReact/common/I18n';
|
15
13
|
import { foremanUrl } from 'foremanReact/common/helpers';
|
16
14
|
import { STATUS as APIStatus } from 'foremanReact/constants';
|
@@ -242,7 +240,7 @@ const JobInvocationToolbarButtons = ({
|
|
242
240
|
</Button>,
|
243
241
|
]}
|
244
242
|
splitButtonVariant="action"
|
245
|
-
onToggle={setIsActionOpen}
|
243
|
+
onToggle={(_event, val) => setIsActionOpen(val)}
|
246
244
|
/>
|
247
245
|
}
|
248
246
|
isOpen={isActionOpen}
|
@@ -1,18 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import {
|
4
|
-
TableComposable,
|
5
|
-
Thead,
|
6
|
-
Tr,
|
7
|
-
Th,
|
8
|
-
Tbody,
|
9
|
-
Td,
|
10
|
-
} from '@patternfly/react-table';
|
3
|
+
import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
|
11
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
12
5
|
|
13
6
|
export const PreviewTemplate = ({ inputValues }) =>
|
14
7
|
inputValues.length ? (
|
15
|
-
<
|
8
|
+
<Table
|
16
9
|
ouiaId="template-invocation-preview-table"
|
17
10
|
isStriped
|
18
11
|
variant="compact"
|
@@ -36,7 +29,7 @@ export const PreviewTemplate = ({ inputValues }) =>
|
|
36
29
|
</Tr>
|
37
30
|
))}
|
38
31
|
</Tbody>
|
39
|
-
</
|
32
|
+
</Table>
|
40
33
|
) : (
|
41
34
|
<span>{__('No user input')}</span>
|
42
35
|
);
|
@@ -56,7 +56,7 @@ const actions = ({
|
|
56
56
|
},
|
57
57
|
abort: {
|
58
58
|
name: 'template-invocation-abort-job',
|
59
|
-
text: __('Abort
|
59
|
+
text: __('Abort task'),
|
60
60
|
permission: permissions.cancel_job_invocations,
|
61
61
|
onClick: () => {
|
62
62
|
dispatch(
|
@@ -137,7 +137,7 @@ export const TemplateActionButtons = ({
|
|
137
137
|
{rerun.permission && (
|
138
138
|
<FlexItem spacer={{ default: 'spacerXs' }}>
|
139
139
|
<Button
|
140
|
-
|
140
|
+
size="sm"
|
141
141
|
variant="secondary"
|
142
142
|
isInline
|
143
143
|
ouiaId={rerun.name}
|
@@ -152,7 +152,7 @@ export const TemplateActionButtons = ({
|
|
152
152
|
{details.permission && (
|
153
153
|
<FlexItem spacer={{ default: 'spacerXs' }}>
|
154
154
|
<Button
|
155
|
-
|
155
|
+
size="sm"
|
156
156
|
variant="secondary"
|
157
157
|
isInline
|
158
158
|
ouiaId={details.name}
|
@@ -167,7 +167,7 @@ export const TemplateActionButtons = ({
|
|
167
167
|
{cancel.permission && (
|
168
168
|
<FlexItem spacer={{ default: 'spacerXs' }}>
|
169
169
|
<Button
|
170
|
-
|
170
|
+
size="sm"
|
171
171
|
variant="danger"
|
172
172
|
isInline
|
173
173
|
ouiaId={cancel.name}
|
@@ -181,7 +181,7 @@ export const TemplateActionButtons = ({
|
|
181
181
|
{abort.permission && (
|
182
182
|
<FlexItem spacer={{ default: 'spacerXs' }}>
|
183
183
|
<Button
|
184
|
-
|
184
|
+
size="sm"
|
185
185
|
variant="danger"
|
186
186
|
isInline
|
187
187
|
ouiaId={abort.name}
|
@@ -97,7 +97,7 @@ describe('JobInvocationDetailPage', () => {
|
|
97
97
|
|
98
98
|
expect(screen.getByText('Description')).toBeInTheDocument();
|
99
99
|
expect(
|
100
|
-
container.querySelector('.chart-donut .pf-c-chart')
|
100
|
+
container.querySelector('.chart-donut .pf-c-chart') // todo: change to pf5 once we update @patternfly/react-charts to v7
|
101
101
|
).toBeInTheDocument();
|
102
102
|
expect(screen.getByText('2/6')).toBeInTheDocument();
|
103
103
|
expect(screen.getByText('Systems')).toBeInTheDocument();
|
@@ -116,22 +116,22 @@ describe('JobInvocationDetailPage', () => {
|
|
116
116
|
|
117
117
|
Object.entries(informationToCheck).forEach(([term, expectedText]) => {
|
118
118
|
const termContainers = container.querySelectorAll(
|
119
|
-
'.pf-c-description-list__term .pf-c-description-list__text'
|
119
|
+
'.pf-v5-c-description-list__term .pf-v5-c-description-list__text'
|
120
120
|
);
|
121
121
|
termContainers.forEach(termContainer => {
|
122
122
|
if (termContainer.textContent.includes(term)) {
|
123
123
|
let descriptionContainer;
|
124
124
|
if (term === 'SSH user:') {
|
125
125
|
descriptionContainer = termContainer
|
126
|
-
.closest('.pf-c-description-list__group')
|
126
|
+
.closest('.pf-v5-c-description-list__group')
|
127
127
|
.querySelector(
|
128
|
-
'.pf-c-description-list__description .pf-c-description-list__text .disabled-text'
|
128
|
+
'.pf-v5-c-description-list__description .pf-v5-c-description-list__text .disabled-text'
|
129
129
|
);
|
130
130
|
} else {
|
131
131
|
descriptionContainer = termContainer
|
132
|
-
.closest('.pf-c-description-list__group')
|
132
|
+
.closest('.pf-v5-c-description-list__group')
|
133
133
|
.querySelector(
|
134
|
-
'.pf-c-description-list__description .pf-c-description-list__text'
|
134
|
+
'.pf-v5-c-description-list__description .pf-v5-c-description-list__text'
|
135
135
|
);
|
136
136
|
}
|
137
137
|
expect(descriptionContainer.textContent).toContain(expectedText);
|
@@ -1,31 +1,33 @@
|
|
1
|
-
import PropTypes from 'prop-types';
|
2
|
-
import React, { useEffect, useState } from 'react';
|
3
|
-
import { useDispatch, useSelector } from 'react-redux';
|
4
1
|
import {
|
5
2
|
Divider,
|
6
3
|
Flex,
|
7
4
|
PageSection,
|
8
5
|
PageSectionVariants,
|
9
6
|
} from '@patternfly/react-core';
|
10
|
-
import { translate as __, documentLocale } from 'foremanReact/common/I18n';
|
11
|
-
import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
|
12
7
|
import { useAPI } from 'foremanReact/common/hooks/API/APIHooks';
|
8
|
+
import { translate as __, documentLocale } from 'foremanReact/common/I18n';
|
13
9
|
import { stopInterval } from 'foremanReact/redux/middlewares/IntervalMiddleware';
|
10
|
+
import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
|
11
|
+
import PropTypes from 'prop-types';
|
12
|
+
import React, { useEffect, useState } from 'react';
|
13
|
+
import { useDispatch, useSelector } from 'react-redux';
|
14
|
+
|
15
|
+
import { JobAdditionInfo } from './JobAdditionInfo';
|
14
16
|
import { getJobInvocation, getTask } from './JobInvocationActions';
|
15
17
|
import {
|
16
18
|
CURRENT_PERMISSIONS,
|
19
|
+
currentPermissionsUrl,
|
17
20
|
DATE_OPTIONS,
|
18
21
|
JOB_INVOCATION_KEY,
|
19
22
|
STATUS,
|
20
|
-
currentPermissionsUrl,
|
21
23
|
} from './JobInvocationConstants';
|
22
|
-
import './
|
24
|
+
import JobInvocationHostTable from './JobInvocationHostTable';
|
23
25
|
import JobInvocationOverview from './JobInvocationOverview';
|
24
26
|
import { selectItems } from './JobInvocationSelectors';
|
25
27
|
import JobInvocationSystemStatusChart from './JobInvocationSystemStatusChart';
|
26
28
|
import JobInvocationToolbarButtons from './JobInvocationToolbarButtons';
|
27
|
-
|
28
|
-
import
|
29
|
+
|
30
|
+
import './JobInvocationDetail.scss';
|
29
31
|
|
30
32
|
const JobInvocationDetailPage = ({
|
31
33
|
match: {
|
@@ -60,10 +62,9 @@ const JobInvocationDetailPage = ({
|
|
60
62
|
let isAlreadyStarted = false;
|
61
63
|
let formattedStartDate;
|
62
64
|
if (startAt) {
|
63
|
-
//
|
64
|
-
|
65
|
-
|
66
|
-
formattedStartDate = convertedDate.toLocaleString(
|
65
|
+
// eslint-disable-next-line camelcase
|
66
|
+
isAlreadyStarted = !!task?.started_at;
|
67
|
+
formattedStartDate = new Date(startAt).toLocaleString(
|
67
68
|
documentLocale(),
|
68
69
|
DATE_OPTIONS
|
69
70
|
);
|
data/webpack/JobWizard/Footer.js
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { useSelector } from 'react-redux';
|
3
3
|
import PropTypes from 'prop-types';
|
4
|
+
import { Button, Tooltip, Spinner } from '@patternfly/react-core';
|
4
5
|
import {
|
5
|
-
Button,
|
6
6
|
WizardFooter,
|
7
7
|
WizardContextConsumer,
|
8
|
-
|
9
|
-
Spinner,
|
10
|
-
} from '@patternfly/react-core';
|
8
|
+
} from '@patternfly/react-core/deprecated';
|
11
9
|
import { translate as __ } from 'foremanReact/common/I18n';
|
12
10
|
import { WIZARD_TITLES } from './JobWizardConstants';
|
13
11
|
import { selectIsSubmitting } from './JobWizardSelectors';
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import React, { useState, useEffect, useCallback } from 'react';
|
4
4
|
import { useDispatch, useSelector } from 'react-redux';
|
5
5
|
import PropTypes from 'prop-types';
|
6
|
-
import { Wizard } from '@patternfly/react-core';
|
6
|
+
import { Wizard } from '@patternfly/react-core/deprecated';
|
7
7
|
import { get } from 'foremanReact/redux/API';
|
8
8
|
import history from 'foremanReact/history';
|
9
9
|
|
@@ -1,21 +1,21 @@
|
|
1
1
|
.job-wizard {
|
2
|
-
font-size: var(--pf-global--FontSize--md);
|
2
|
+
font-size: var(--pf-v5-global--FontSize--md);
|
3
3
|
.wizard-title {
|
4
4
|
margin-bottom: 25px;
|
5
5
|
}
|
6
6
|
|
7
|
-
.pf-c-wizard__nav.pf-m-expanded {
|
7
|
+
.pf-v5-c-wizard__nav.pf-m-expanded {
|
8
8
|
z-index: calc(
|
9
|
-
var(--pf-
|
9
|
+
var(--pf-v5-cwizard__toggle--ZIndex) + 2
|
10
10
|
); // So the small screen navigation can be shown above the select box and wizard body
|
11
11
|
}
|
12
12
|
|
13
|
-
.pf-c-wizard__main {
|
13
|
+
.pf-v5-c-wizard__main {
|
14
14
|
z-index: calc(
|
15
|
-
var(--pf-
|
15
|
+
var(--pf-v5-cwizard__toggle--ZIndex) + 1
|
16
16
|
); // So the select box can be shown above the wizard footer and navigation toggle
|
17
17
|
}
|
18
|
-
.pf-c-wizard__main-body {
|
18
|
+
.pf-v5-c-wizard__main-body {
|
19
19
|
@media (max-width: 600px) {
|
20
20
|
max-width: 100%;
|
21
21
|
}
|
@@ -34,19 +34,19 @@
|
|
34
34
|
}
|
35
35
|
|
36
36
|
.gray-text {
|
37
|
-
color: var(--pf-global--Color--dark-200);
|
37
|
+
color: var(--pf-v5-global--Color--dark-200);
|
38
38
|
}
|
39
39
|
|
40
40
|
.target-hosts-and-inputs {
|
41
|
-
.pf-c-chip-group.pf-m-category {
|
41
|
+
.pf-v5-c-chip-group.pf-m-category {
|
42
42
|
margin-bottom: 10px;
|
43
43
|
}
|
44
|
-
.pf-c-select__toggle-typeahead {
|
44
|
+
.pf-v5-c-select__toggle-typeahead {
|
45
45
|
border: 0px;
|
46
46
|
}
|
47
47
|
|
48
48
|
.target-method-select {
|
49
|
-
.pf-c-select__toggle-wrapper {
|
49
|
+
.pf-v5-c-select__toggle-wrapper {
|
50
50
|
flex-wrap: nowrap;
|
51
51
|
}
|
52
52
|
}
|
@@ -63,8 +63,8 @@
|
|
63
63
|
display: grid;
|
64
64
|
grid-template-columns: repeat(7, 1fr);
|
65
65
|
}
|
66
|
-
.pf-l-grid {
|
67
|
-
gap: var(--pf-
|
66
|
+
.pf-v5-l-grid {
|
67
|
+
gap: var(--pf-v5-cform--GridGap);
|
68
68
|
}
|
69
69
|
#repeat-on-hourly {
|
70
70
|
max-height: 300px;
|
@@ -99,14 +99,14 @@
|
|
99
99
|
.clear-datetime-button {
|
100
100
|
margin-left: 10px;
|
101
101
|
align-self: center;
|
102
|
-
font-size: var(--pf-global--FontSize--md);
|
102
|
+
font-size: var(--pf-v5-global--FontSize--md);
|
103
103
|
}
|
104
|
-
.pf-c-form__group-control {
|
104
|
+
.pf-v5-c-form__group-control {
|
105
105
|
display: flex;
|
106
106
|
flex-wrap: wrap;
|
107
107
|
}
|
108
108
|
}
|
109
|
-
.pf-c-date-picker {
|
109
|
+
.pf-v5-c-date-picker {
|
110
110
|
vertical-align: top;
|
111
111
|
}
|
112
112
|
|
@@ -123,7 +123,7 @@
|
|
123
123
|
min-height: 40px;
|
124
124
|
min-width: 100px;
|
125
125
|
}
|
126
|
-
.pf-c-modal-box {
|
126
|
+
.pf-v5-c-modal-box {
|
127
127
|
width: auto;
|
128
128
|
}
|
129
129
|
|
@@ -132,15 +132,15 @@
|
|
132
132
|
margin-left: 10px;
|
133
133
|
}
|
134
134
|
}
|
135
|
-
.pf-c-radio__body {
|
136
|
-
font-size: var(--pf-
|
135
|
+
.pf-v5-c-radio__body {
|
136
|
+
font-size: var(--pf-v5-cradio__label--FontSize);
|
137
137
|
}
|
138
138
|
.reset-default {
|
139
139
|
padding-bottom: 0;
|
140
140
|
}
|
141
141
|
}
|
142
142
|
|
143
|
-
.job-wizard-alert.pf-c-alert.pf-m-warning {
|
143
|
+
.job-wizard-alert.pf-v5-c-alert.pf-m-warning {
|
144
144
|
margin-bottom: 10px;
|
145
145
|
margin-top: 10px;
|
146
146
|
}
|
@@ -7,11 +7,12 @@ import {
|
|
7
7
|
Divider,
|
8
8
|
Skeleton,
|
9
9
|
Button,
|
10
|
-
Title,
|
11
10
|
EmptyState,
|
12
11
|
EmptyStateVariant,
|
13
12
|
EmptyStateIcon,
|
14
13
|
EmptyStateBody,
|
14
|
+
EmptyStateHeader,
|
15
|
+
EmptyStateFooter,
|
15
16
|
} from '@patternfly/react-core';
|
16
17
|
import { ExclamationCircleIcon } from '@patternfly/react-icons';
|
17
18
|
import { global_palette_red_200 as exclamationColor } from '@patternfly/react-tokens';
|
@@ -63,23 +64,28 @@ const JobWizardPageRerun = ({
|
|
63
64
|
const currentLocation = useForemanLocation();
|
64
65
|
|
65
66
|
const emptyStateLarge = (
|
66
|
-
<EmptyState variant={EmptyStateVariant.
|
67
|
-
<
|
68
|
-
|
69
|
-
|
67
|
+
<EmptyState variant={EmptyStateVariant.lg}>
|
68
|
+
<EmptyStateHeader
|
69
|
+
titleText={<>{__('Unable to run job')}</>}
|
70
|
+
icon={
|
71
|
+
<EmptyStateIcon
|
72
|
+
icon={ExclamationCircleIcon}
|
73
|
+
color={exclamationColor.value}
|
74
|
+
/>
|
75
|
+
}
|
76
|
+
headingLevel="h4"
|
70
77
|
/>
|
71
|
-
<Title ouiaId="job-wizard-empty-state-header" headingLevel="h4" size="lg">
|
72
|
-
{__('Unable to run job')}
|
73
|
-
</Title>
|
74
78
|
<EmptyStateBody>{sprintf(errorMessage)}</EmptyStateBody>
|
75
|
-
<
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
<EmptyStateFooter>
|
80
|
+
<Button
|
81
|
+
ouiaId="job-wizard-run-job-button"
|
82
|
+
component="a"
|
83
|
+
href="/job_invocations/new"
|
84
|
+
variant="primary"
|
85
|
+
>
|
86
|
+
{__('Create job')}
|
87
|
+
</Button>
|
88
|
+
</EmptyStateFooter>
|
83
89
|
</EmptyState>
|
84
90
|
);
|
85
91
|
|
@@ -3,11 +3,12 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import { translate as __ } from 'foremanReact/common/I18n';
|
4
4
|
import { Icon } from 'patternfly-react';
|
5
5
|
import {
|
6
|
-
Title,
|
7
6
|
Button,
|
8
7
|
EmptyState,
|
9
8
|
EmptyStateVariant,
|
10
9
|
EmptyStateBody,
|
10
|
+
EmptyStateHeader,
|
11
|
+
EmptyStateFooter,
|
11
12
|
} from '@patternfly/react-core';
|
12
13
|
|
13
14
|
const PermissionDenied = ({ missingPermissions, setProceedAnyway }) => {
|
@@ -37,17 +38,20 @@ const PermissionDenied = ({ missingPermissions, setProceedAnyway }) => {
|
|
37
38
|
<span className="empty-state-icon">
|
38
39
|
<Icon name="lock" type="fa" size="2x" />
|
39
40
|
</span>
|
40
|
-
<
|
41
|
-
{__('Permission Denied')}
|
42
|
-
|
41
|
+
<EmptyStateHeader
|
42
|
+
titleText={<>{__('Permission Denied')}</>}
|
43
|
+
headingLevel="h5"
|
44
|
+
/>
|
43
45
|
<EmptyStateBody>{description}</EmptyStateBody>
|
44
|
-
<
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
46
|
+
<EmptyStateFooter>
|
47
|
+
<Button
|
48
|
+
ouiaId="job-invocation-proceed-anyway-button"
|
49
|
+
variant="primary"
|
50
|
+
onClick={handleProceedAnyway}
|
51
|
+
>
|
52
|
+
{__('Proceed Anyway')}
|
53
|
+
</Button>
|
54
|
+
</EmptyStateFooter>
|
51
55
|
</EmptyState>
|
52
56
|
);
|
53
57
|
};
|