foreman_ansible 15.0.7 → 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/assets/javascripts/foreman_ansible/locale/ca/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/cs_CZ/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/de/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/es/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/fr/foreman_ansible.js +4 -4
- data/app/assets/javascripts/foreman_ansible/locale/gl/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/it/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/ja/foreman_ansible.js +4 -4
- data/app/assets/javascripts/foreman_ansible/locale/ka/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/ko/foreman_ansible.js +3 -3
- data/app/assets/javascripts/foreman_ansible/locale/nl_NL/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/pl/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/pt_BR/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/ru/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/sv_SE/foreman_ansible.js +10 -1
- data/app/assets/javascripts/foreman_ansible/locale/zh_CN/foreman_ansible.js +4 -4
- data/app/assets/javascripts/foreman_ansible/locale/zh_TW/foreman_ansible.js +10 -1
- data/app/controllers/concerns/foreman/controller/parameters/job_template_extensions.rb +1 -1
- data/app/controllers/foreman_ansible/api/v2/job_templates_controller_extensions.rb +1 -0
- data/app/models/foreman_ansible/ansible_provider.rb +1 -0
- data/app/views/api/v2/job_templates/job_templates.json.rabl +1 -1
- data/app/views/job_templates/_job_template_callback_tab_content.html.erb +1 -0
- data/db/migrate/20241022000000_add_ansible_check_mode_to_templates.rb +5 -0
- data/lib/foreman_ansible/register.rb +1 -1
- data/lib/foreman_ansible/version.rb +1 -1
- data/locale/ca/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/ca/foreman_ansible.po +10 -1
- data/locale/cs_CZ/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/cs_CZ/foreman_ansible.po +10 -1
- data/locale/de/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/de/foreman_ansible.po +10 -1
- data/locale/en/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/en_GB/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/es/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/es/foreman_ansible.po +11 -2
- data/locale/foreman_ansible.pot +4 -4
- data/locale/fr/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/fr/foreman_ansible.po +5 -5
- data/locale/gl/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/gl/foreman_ansible.po +10 -1
- data/locale/it/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/it/foreman_ansible.po +10 -1
- data/locale/ja/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/ja/foreman_ansible.po +4 -4
- data/locale/ka/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/ka/foreman_ansible.po +10 -1
- data/locale/ko/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/ko/foreman_ansible.po +3 -3
- data/locale/nl_NL/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/nl_NL/foreman_ansible.po +10 -1
- data/locale/pl/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/pl/foreman_ansible.po +10 -1
- data/locale/pt_BR/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/pt_BR/foreman_ansible.po +10 -1
- data/locale/ru/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/ru/foreman_ansible.po +10 -1
- data/locale/sv_SE/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/sv_SE/foreman_ansible.po +10 -1
- data/locale/zh_CN/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/zh_CN/foreman_ansible.po +5 -5
- data/locale/zh_TW/LC_MESSAGES/foreman_ansible.mo +0 -0
- data/locale/zh_TW/foreman_ansible.po +10 -1
- data/webpack/components/AnsibleHostDetail/AnsibleHostDetail.scss +1 -1
- data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTable.js +4 -11
- data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/EditableValueHelper.js +11 -5
- data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/__test__/AnsibleVariableOverrides.test.js +1 -1
- data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/__test__/AnsibleVariableOverridesDelete.test.js +2 -2
- data/webpack/components/AnsibleHostDetail/components/JobsTab/NewRecurringJobModal.scss +2 -2
- data/webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js +3 -10
- data/webpack/components/AnsibleHostDetail/components/JobsTab/RecurringJobsTable.js +3 -10
- data/webpack/components/AnsibleHostDetail/components/JobsTab/__test__/JobsTab.test.js +2 -1
- data/webpack/components/AnsibleHostDetail/components/RolesTab/AllRolesModal/AllRolesTable.js +3 -10
- data/webpack/components/AnsibleHostDetail/components/RolesTab/EditRolesModal/EditRolesModal.scss +1 -1
- data/webpack/components/AnsibleHostDetail/components/RolesTab/RolesTable.js +3 -10
- data/webpack/components/AnsibleRolesAndVariables/AnsibleRolesAndVariables.js +3 -3
- data/webpack/components/DualList/ListControls.js +9 -9
- data/webpack/components/DualList/ListHeader.js +5 -3
- data/webpack/components/DualList/ListItem.js +9 -9
- data/webpack/components/DualList/ListPane.js +3 -3
- data/webpack/components/DualList/SelectedStatus.js +2 -2
- data/webpack/components/DualList/index.js +1 -1
- data/webpack/formHelper.js +26 -29
- data/webpack/routes/HostgroupJobs/__test__/HostgroupJobs.test.js +1 -0
- metadata +12 -16
- data/app/assets/javascripts/foreman_ansible/locale/en/foreman_ansible.js +0 -910
- data/app/assets/javascripts/foreman_ansible/locale/en_GB/foreman_ansible.js +0 -910
- data/locale/en/foreman_ansible.po +0 -908
- data/locale/en_GB/foreman_ansible.po +0 -912
data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/EditableValueHelper.js
CHANGED
@@ -5,17 +5,23 @@ import {
|
|
5
5
|
FormGroup,
|
6
6
|
FormSelect,
|
7
7
|
FormSelectOption,
|
8
|
+
FormHelperText,
|
9
|
+
HelperText,
|
10
|
+
HelperTextItem,
|
8
11
|
} from '@patternfly/react-core';
|
9
12
|
|
10
13
|
const withFormGroup = Component => componentProps => {
|
11
14
|
const { validation, ...rest } = componentProps;
|
12
15
|
return (
|
13
|
-
<FormGroup
|
14
|
-
label=""
|
15
|
-
helperTextInvalid={validation.msg}
|
16
|
-
validated={validation.key}
|
17
|
-
>
|
16
|
+
<FormGroup label="">
|
18
17
|
<Component {...rest} validated={validation.key} />
|
18
|
+
{validation.key === 'error' && (
|
19
|
+
<FormHelperText>
|
20
|
+
<HelperText>
|
21
|
+
<HelperTextItem>{validation.msg}</HelperTextItem>
|
22
|
+
</HelperText>
|
23
|
+
</FormHelperText>
|
24
|
+
)}
|
19
25
|
</FormGroup>
|
20
26
|
);
|
21
27
|
};
|
@@ -67,7 +67,7 @@ describe('AnsibleVariableOverrides', () => {
|
|
67
67
|
name: 'Edit override button',
|
68
68
|
});
|
69
69
|
expect(editBtns).toHaveLength(0);
|
70
|
-
const actions = screen.queryAllByRole('button', { name: '
|
70
|
+
const actions = screen.queryAllByRole('button', { name: 'Kebab toggle' });
|
71
71
|
expect(actions).toHaveLength(0);
|
72
72
|
});
|
73
73
|
});
|
@@ -33,7 +33,7 @@ describe('AnsibleVariableOverrides', () => {
|
|
33
33
|
/>
|
34
34
|
);
|
35
35
|
await waitFor(tick);
|
36
|
-
userEvent.click(screen.getAllByRole('button', { name: '
|
36
|
+
userEvent.click(screen.getAllByRole('button', { name: 'Kebab toggle' })[0]);
|
37
37
|
userEvent.click(screen.getByText('Delete'));
|
38
38
|
await waitFor(tick);
|
39
39
|
expect(
|
@@ -58,7 +58,7 @@ describe('AnsibleVariableOverrides', () => {
|
|
58
58
|
);
|
59
59
|
await waitFor(tick);
|
60
60
|
expect(screen.queryByText('21')).toBeInTheDocument();
|
61
|
-
userEvent.click(screen.getAllByRole('button', { name: '
|
61
|
+
userEvent.click(screen.getAllByRole('button', { name: 'Kebab toggle' })[0]);
|
62
62
|
userEvent.click(screen.getByText('Delete'));
|
63
63
|
await waitFor(tick);
|
64
64
|
userEvent.click(screen.getByText('Confirm'));
|
@@ -1,4 +1,4 @@
|
|
1
|
-
.pf-c-backdrop {
|
1
|
+
.pf-v5-c-backdrop {
|
2
2
|
z-index: 1040;
|
3
3
|
}
|
4
4
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
height: 70vh;
|
9
9
|
}
|
10
10
|
|
11
|
-
.pf-c-form-control, .pf-c-date-picker, .pf-c-date-picker__input {
|
11
|
+
.pf-v5-c-form-control, .pf-v5-c-date-picker, .pf-v5-c-date-picker__input {
|
12
12
|
width: 250px
|
13
13
|
}
|
14
14
|
}
|
@@ -3,14 +3,7 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import { translate as __ } from 'foremanReact/common/I18n';
|
4
4
|
import RelativeDateTime from 'foremanReact/components/common/dates/RelativeDateTime';
|
5
5
|
|
6
|
-
import {
|
7
|
-
TableComposable,
|
8
|
-
Thead,
|
9
|
-
Tbody,
|
10
|
-
Tr,
|
11
|
-
Th,
|
12
|
-
Td,
|
13
|
-
} from '@patternfly/react-table';
|
6
|
+
import { Table, Thead, Tbody, Tr, Th, Td } from '@patternfly/react-table';
|
14
7
|
import { Flex, FlexItem } from '@patternfly/react-core';
|
15
8
|
import Pagination from 'foremanReact/components/Pagination';
|
16
9
|
|
@@ -40,7 +33,7 @@ const PreviousJobsTable = ({ history, totalCount, jobs, pagination }) => {
|
|
40
33
|
/>
|
41
34
|
</FlexItem>
|
42
35
|
<FlexItem>
|
43
|
-
<
|
36
|
+
<Table ouiaId="table-composable-compact" variant="compact">
|
44
37
|
<Thead>
|
45
38
|
<Tr ouiaId="row-header">
|
46
39
|
{columns.map(col => (
|
@@ -73,7 +66,7 @@ const PreviousJobsTable = ({ history, totalCount, jobs, pagination }) => {
|
|
73
66
|
</Tr>
|
74
67
|
))}
|
75
68
|
</Tbody>
|
76
|
-
</
|
69
|
+
</Table>
|
77
70
|
</FlexItem>
|
78
71
|
<FlexItem align={{ default: 'alignRight' }}>
|
79
72
|
<Pagination
|
@@ -5,14 +5,7 @@ import { translate as __ } from 'foremanReact/common/I18n';
|
|
5
5
|
import RelativeDateTime from 'foremanReact/components/common/dates/RelativeDateTime';
|
6
6
|
import { openConfirmModal } from 'foremanReact/components/ConfirmModal';
|
7
7
|
|
8
|
-
import {
|
9
|
-
TableComposable,
|
10
|
-
Thead,
|
11
|
-
Tbody,
|
12
|
-
Tr,
|
13
|
-
Th,
|
14
|
-
Td,
|
15
|
-
} from '@patternfly/react-table';
|
8
|
+
import { Table, Thead, Tbody, Tr, Th, Td } from '@patternfly/react-table';
|
16
9
|
|
17
10
|
import {
|
18
11
|
useCancelMutation,
|
@@ -60,7 +53,7 @@ const RecurringJobsTable = ({
|
|
60
53
|
return (
|
61
54
|
<React.Fragment>
|
62
55
|
<h3>{__('Scheduled recurring jobs')}</h3>
|
63
|
-
<
|
56
|
+
<Table ouiaId="table-composable-compact" variant="compact">
|
64
57
|
<Thead>
|
65
58
|
<Tr ouiaId="row-header">
|
66
59
|
{columns.map(col => (
|
@@ -93,7 +86,7 @@ const RecurringJobsTable = ({
|
|
93
86
|
</Tr>
|
94
87
|
))}
|
95
88
|
</Tbody>
|
96
|
-
</
|
89
|
+
</Table>
|
97
90
|
</React.Fragment>
|
98
91
|
);
|
99
92
|
};
|
@@ -102,6 +102,7 @@ describe('JobsTab', () => {
|
|
102
102
|
/>
|
103
103
|
);
|
104
104
|
await waitFor(tick);
|
105
|
+
await waitFor(tick);
|
105
106
|
userEvent.click(
|
106
107
|
screen.getByRole('button', { name: 'schedule recurring job' })
|
107
108
|
);
|
@@ -156,7 +157,7 @@ describe('JobsTab', () => {
|
|
156
157
|
expect(
|
157
158
|
screen.queryByText('No config job for Ansible roles scheduled')
|
158
159
|
).not.toBeInTheDocument();
|
159
|
-
userEvent.click(screen.getAllByRole('button', { name: '
|
160
|
+
userEvent.click(screen.getAllByRole('button', { name: 'Kebab toggle' })[0]);
|
160
161
|
userEvent.click(screen.getByText('Cancel'));
|
161
162
|
await waitFor(tick);
|
162
163
|
expect(
|
data/webpack/components/AnsibleHostDetail/components/RolesTab/AllRolesModal/AllRolesTable.js
CHANGED
@@ -2,14 +2,7 @@ import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { translate as __ } from 'foremanReact/common/I18n';
|
4
4
|
|
5
|
-
import {
|
6
|
-
TableComposable,
|
7
|
-
Thead,
|
8
|
-
Tbody,
|
9
|
-
Tr,
|
10
|
-
Th,
|
11
|
-
Td,
|
12
|
-
} from '@patternfly/react-table';
|
5
|
+
import { Table, Thead, Tbody, Tr, Th, Td } from '@patternfly/react-table';
|
13
6
|
import { Flex, FlexItem } from '@patternfly/react-core';
|
14
7
|
import Pagination from 'foremanReact/components/Pagination';
|
15
8
|
import withLoading from '../../../../withLoading';
|
@@ -28,7 +21,7 @@ const AllRolesTable = ({ allAnsibleRoles, totalCount }) => {
|
|
28
21
|
variant="top"
|
29
22
|
/>
|
30
23
|
</FlexItem>
|
31
|
-
<
|
24
|
+
<Table ouiaId="table-composable-compact" variant="compact">
|
32
25
|
<Thead>
|
33
26
|
<Tr ouiaId="row-header">
|
34
27
|
<Th />
|
@@ -60,7 +53,7 @@ const AllRolesTable = ({ allAnsibleRoles, totalCount }) => {
|
|
60
53
|
</Tr>
|
61
54
|
))}
|
62
55
|
</Tbody>
|
63
|
-
</
|
56
|
+
</Table>
|
64
57
|
<FlexItem align={{ default: 'alignRight' }}>
|
65
58
|
<Pagination
|
66
59
|
ouiaId="pagination-bottom"
|
@@ -4,14 +4,7 @@ import { translate as __ } from 'foremanReact/common/I18n';
|
|
4
4
|
import { Route, Link } from 'react-router-dom';
|
5
5
|
import Pagination from 'foremanReact/components/Pagination';
|
6
6
|
|
7
|
-
import {
|
8
|
-
TableComposable,
|
9
|
-
Thead,
|
10
|
-
Tbody,
|
11
|
-
Tr,
|
12
|
-
Th,
|
13
|
-
Td,
|
14
|
-
} from '@patternfly/react-table';
|
7
|
+
import { Table, Thead, Tbody, Tr, Th, Td } from '@patternfly/react-table';
|
15
8
|
import { Flex, FlexItem, Button } from '@patternfly/react-core';
|
16
9
|
|
17
10
|
import EditRolesModal from './EditRolesModal';
|
@@ -66,7 +59,7 @@ const RolesTable = ({
|
|
66
59
|
</Flex>
|
67
60
|
<Flex direction={{ default: 'column' }}>
|
68
61
|
<FlexItem>
|
69
|
-
<
|
62
|
+
<Table variant="compact" ouiaId="table-composable-compact">
|
70
63
|
<Thead>
|
71
64
|
<Tr ouiaId="row-header">
|
72
65
|
{columns.map(col => (
|
@@ -92,7 +85,7 @@ const RolesTable = ({
|
|
92
85
|
</Tr>
|
93
86
|
))}
|
94
87
|
</Tbody>
|
95
|
-
</
|
88
|
+
</Table>
|
96
89
|
</FlexItem>
|
97
90
|
<FlexItem align={{ default: 'alignRight' }}>
|
98
91
|
<Pagination
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import React, { useState } from 'react';
|
2
|
+
import { cellWidth } from '@patternfly/react-table';
|
2
3
|
import {
|
3
4
|
Table,
|
4
5
|
TableHeader,
|
5
6
|
TableBody,
|
6
|
-
|
7
|
-
} from '@patternfly/react-table';
|
7
|
+
} from '@patternfly/react-table/deprecated';
|
8
8
|
import {
|
9
9
|
Button,
|
10
10
|
Toolbar,
|
@@ -99,7 +99,7 @@ const ImportRolesAndVariablesTable = ({
|
|
99
99
|
<Checkbox
|
100
100
|
ouiaId="ansible-roles-and-variables-table-select-all-checkbox"
|
101
101
|
isChecked={isChecked}
|
102
|
-
onChange={SelectAll}
|
102
|
+
onChange={(_event, checked) => SelectAll(checked)}
|
103
103
|
aria-label="select all checkbox"
|
104
104
|
id="select-all"
|
105
105
|
name="select-all"
|
@@ -3,10 +3,10 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import { translate as __ } from 'foremanReact/common/I18n';
|
4
4
|
|
5
5
|
const ListControls = props => (
|
6
|
-
<div className="pf-c-dual-list-selector__controls">
|
7
|
-
<div className="pf-c-dual-list-selector__controls-item">
|
6
|
+
<div className="pf-v5-c-dual-list-selector__controls">
|
7
|
+
<div className="pf-v5-c-dual-list-selector__controls-item">
|
8
8
|
<button
|
9
|
-
className="pf-c-button pf-m-plain"
|
9
|
+
className="pf-v5-c-button pf-m-plain"
|
10
10
|
type="button"
|
11
11
|
disabled={props.addSelectedDisabled}
|
12
12
|
onClick={props.onAddSelected}
|
@@ -15,9 +15,9 @@ const ListControls = props => (
|
|
15
15
|
<i className="fas fa-fw fa-angle-right" />
|
16
16
|
</button>
|
17
17
|
</div>
|
18
|
-
<div className="pf-c-dual-list-selector__controls-item">
|
18
|
+
<div className="pf-v5-c-dual-list-selector__controls-item">
|
19
19
|
<button
|
20
|
-
className="pf-c-button pf-m-plain"
|
20
|
+
className="pf-v5-c-button pf-m-plain"
|
21
21
|
type="button"
|
22
22
|
disabled={props.addAllDisabled}
|
23
23
|
onClick={props.onAddAll}
|
@@ -26,9 +26,9 @@ const ListControls = props => (
|
|
26
26
|
<i className="fas fa-fw fa-angle-double-right" />
|
27
27
|
</button>
|
28
28
|
</div>
|
29
|
-
<div className="pf-c-dual-list-selector__controls-item">
|
29
|
+
<div className="pf-v5-c-dual-list-selector__controls-item">
|
30
30
|
<button
|
31
|
-
className="pf-c-button pf-m-plain"
|
31
|
+
className="pf-v5-c-button pf-m-plain"
|
32
32
|
type="button"
|
33
33
|
disabled={props.removeAllDisabled}
|
34
34
|
onClick={props.onRemoveAll}
|
@@ -37,9 +37,9 @@ const ListControls = props => (
|
|
37
37
|
<i className="fas fa-fw fa-angle-double-left" />
|
38
38
|
</button>
|
39
39
|
</div>
|
40
|
-
<div className="pf-c-dual-list-selector__controls-item">
|
40
|
+
<div className="pf-v5-c-dual-list-selector__controls-item">
|
41
41
|
<button
|
42
|
-
className="pf-c-button pf-m-plain"
|
42
|
+
className="pf-v5-c-button pf-m-plain"
|
43
43
|
type="button"
|
44
44
|
disabled={props.removeSelectedDisabled}
|
45
45
|
onClick={props.onRemoveSelected}
|
@@ -2,9 +2,11 @@ import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
|
4
4
|
const ListHeader = props => (
|
5
|
-
<div className="pf-c-dual-list-selector__header">
|
6
|
-
<div className="pf-c-dual-list-selector__title">
|
7
|
-
<div className="pf-c-dual-list-selector__title-text">
|
5
|
+
<div className="pf-v5-c-dual-list-selector__header">
|
6
|
+
<div className="pf-v5-c-dual-list-selector__title">
|
7
|
+
<div className="pf-v5-c-dual-list-selector__title-text">
|
8
|
+
{props.title}
|
9
|
+
</div>
|
8
10
|
</div>
|
9
11
|
</div>
|
10
12
|
);
|
@@ -4,9 +4,9 @@ import PropTypes from 'prop-types';
|
|
4
4
|
|
5
5
|
const ListItem = props => {
|
6
6
|
const draggableBtn = (
|
7
|
-
<div className="pf-c-dual-list-selector__draggable">
|
7
|
+
<div className="pf-v5-c-dual-list-selector__draggable">
|
8
8
|
<button
|
9
|
-
className="pf-c-button pf-m-plain"
|
9
|
+
className="pf-v5-c-button pf-m-plain"
|
10
10
|
type="button"
|
11
11
|
aria-pressed="false"
|
12
12
|
aria-label="Reorder"
|
@@ -24,27 +24,27 @@ const ListItem = props => {
|
|
24
24
|
);
|
25
25
|
|
26
26
|
return (
|
27
|
-
<li className="pf-c-dual-list-selector__list-item">
|
27
|
+
<li className="pf-v5-c-dual-list-selector__list-item">
|
28
28
|
<div
|
29
|
-
className={classNames('pf-c-dual-list-selector__list-item-row ', {
|
29
|
+
className={classNames('pf-v5-c-dual-list-selector__list-item-row ', {
|
30
30
|
'pf-m-selected': props.selected,
|
31
31
|
'pf-m-ghost-row': props.dragging,
|
32
32
|
})}
|
33
33
|
>
|
34
34
|
{props.draggable && draggableBtn}
|
35
35
|
<button
|
36
|
-
className="pf-c-dual-list-selector__item"
|
36
|
+
className="pf-v5-c-dual-list-selector__item"
|
37
37
|
type="button"
|
38
38
|
onClick={props.onClick}
|
39
39
|
>
|
40
|
-
<span className="pf-c-dual-list-selector__item-main">
|
41
|
-
<span className="pf-c-dual-list-selector__item-text">
|
40
|
+
<span className="pf-v5-c-dual-list-selector__item-main">
|
41
|
+
<span className="pf-v5-c-dual-list-selector__item-text">
|
42
42
|
{props.draggable && orderBtn}
|
43
43
|
<span>{props.name}</span>
|
44
44
|
</span>
|
45
45
|
</span>
|
46
|
-
<span className="pf-c-dual-list-selector__item-count">
|
47
|
-
<span className="pf-c-badge pf-m-read" />
|
46
|
+
<span className="pf-v5-c-dual-list-selector__item-count">
|
47
|
+
<span className="pf-v5-c-badge pf-m-read" />
|
48
48
|
</span>
|
49
49
|
</button>
|
50
50
|
</div>
|
@@ -58,16 +58,16 @@ const ListPane = ({
|
|
58
58
|
|
59
59
|
return (
|
60
60
|
<div
|
61
|
-
className={`pf-c-dual-list-selector__pane pf-m-available ${paneClass}`}
|
61
|
+
className={`pf-v5-c-dual-list-selector__pane pf-m-available ${paneClass}`}
|
62
62
|
>
|
63
63
|
<ListHeader title={title} />
|
64
64
|
<SelectedStatus
|
65
65
|
selectedCount={selected.length}
|
66
66
|
totalCount={items.length}
|
67
67
|
/>
|
68
|
-
<div className="pf-c-dual-list-selector__menu">
|
68
|
+
<div className="pf-v5-c-dual-list-selector__menu">
|
69
69
|
<DndProvider backend={HTML5Backend}>
|
70
|
-
<ul className="pf-c-dual-list-selector__list">
|
70
|
+
<ul className="pf-v5-c-dual-list-selector__list">
|
71
71
|
{items.map(renderItem)}
|
72
72
|
</ul>
|
73
73
|
</DndProvider>
|
@@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import { translate as __, sprintf } from 'foremanReact/common/I18n';
|
4
4
|
|
5
5
|
const SelectedStatus = ({ selectedCount, totalCount }) => (
|
6
|
-
<div className="pf-c-dual-list-selector__status">
|
7
|
-
<span className="pf-c-dual-list-selector__status-text">
|
6
|
+
<div className="pf-v5-c-dual-list-selector__status">
|
7
|
+
<span className="pf-v5-c-dual-list-selector__status-text">
|
8
8
|
{sprintf(__('%(selectedCount)s of %(totalCount)s items selected'), {
|
9
9
|
selectedCount,
|
10
10
|
totalCount,
|
@@ -61,7 +61,7 @@ const DualList = props => {
|
|
61
61
|
props.onListChange(props.availableOptions, items);
|
62
62
|
|
63
63
|
return (
|
64
|
-
<div className="pf-c-dual-list-selector">
|
64
|
+
<div className="pf-v5-c-dual-list-selector">
|
65
65
|
<ListPane
|
66
66
|
title={__('Available Ansible roles')}
|
67
67
|
items={props.availableOptions}
|
data/webpack/formHelper.js
CHANGED
@@ -6,19 +6,12 @@ import {
|
|
6
6
|
FormSelectOption,
|
7
7
|
DatePicker,
|
8
8
|
TimePicker,
|
9
|
+
FormHelperText,
|
10
|
+
HelperText,
|
11
|
+
HelperTextItem,
|
9
12
|
} from '@patternfly/react-core';
|
10
13
|
import { ExclamationCircleIcon } from '@patternfly/react-icons';
|
11
14
|
|
12
|
-
const wrapFieldProps = fieldProps => {
|
13
|
-
const { onChange } = fieldProps;
|
14
|
-
// modify onChange args to correctly wire formik with pf4 input handlers
|
15
|
-
const wrappedOnChange = (value, event) => {
|
16
|
-
onChange(event);
|
17
|
-
};
|
18
|
-
|
19
|
-
return { ...fieldProps, onChange: wrappedOnChange };
|
20
|
-
};
|
21
|
-
|
22
15
|
const wrapPickerProps = fieldProps => {
|
23
16
|
const { onChange } = fieldProps;
|
24
17
|
// because pf4 does not provide consistent handlers for its inputs
|
@@ -45,18 +38,12 @@ export const SelectField = ({
|
|
45
38
|
isRequired,
|
46
39
|
blankLabel,
|
47
40
|
}) => {
|
48
|
-
const fieldProps =
|
41
|
+
const fieldProps = field;
|
49
42
|
|
50
43
|
const valid = shouldValidate(form, field.name);
|
51
44
|
|
52
45
|
return (
|
53
|
-
<FormGroup
|
54
|
-
label={label}
|
55
|
-
isRequired={isRequired}
|
56
|
-
helperTextInvalid={form.errors[field.name]}
|
57
|
-
helperTextInvalidIcon={<ExclamationCircleIcon />}
|
58
|
-
validated={valid}
|
59
|
-
>
|
46
|
+
<FormGroup label={label} isRequired={isRequired}>
|
60
47
|
<FormSelect
|
61
48
|
ouiaId={`select-${fieldProps.name}`}
|
62
49
|
{...fieldProps}
|
@@ -70,6 +57,15 @@ export const SelectField = ({
|
|
70
57
|
<FormSelectOption key={idx + 1} value={item.id} label={item.name} />
|
71
58
|
))}
|
72
59
|
</FormSelect>
|
60
|
+
{valid === 'error' && (
|
61
|
+
<FormHelperText>
|
62
|
+
<HelperText>
|
63
|
+
<HelperTextItem variant="icon" icon={<ExclamationCircleIcon />}>
|
64
|
+
{form.errors[field.name]}
|
65
|
+
</HelperTextItem>
|
66
|
+
</HelperText>
|
67
|
+
</FormHelperText>
|
68
|
+
)}
|
73
69
|
</FormGroup>
|
74
70
|
);
|
75
71
|
};
|
@@ -96,25 +92,26 @@ const pickerWithHandlers = ComponentType => {
|
|
96
92
|
|
97
93
|
const Component = ComponentType === 'date' ? DatePicker : TimePicker;
|
98
94
|
return (
|
99
|
-
<FormGroup
|
100
|
-
label={label}
|
101
|
-
isRequired={isRequired}
|
102
|
-
helperTextInvalid={form.errors[field.name]}
|
103
|
-
helperTextInvalidIcon={<ExclamationCircleIcon />}
|
104
|
-
validated={valid}
|
105
|
-
>
|
95
|
+
<FormGroup label={label} isRequired={isRequired}>
|
106
96
|
<Component
|
107
97
|
aria-label={field.name}
|
108
|
-
onChange={(
|
109
|
-
|
110
|
-
// timepicker: onChange (time: string, hour?: number, minute?: number, seconds?: number, isValid?: boolean ) => void
|
111
|
-
ComponentType === 'date' ? onChange(b, a) : onChange(a);
|
98
|
+
onChange={(e, value) => {
|
99
|
+
onChange(value);
|
112
100
|
}}
|
113
101
|
onBlur={onBlur}
|
114
102
|
{...rest}
|
115
103
|
validated={valid}
|
116
104
|
isDisabled={form.isSubmitting}
|
117
105
|
/>
|
106
|
+
{valid === 'error' && (
|
107
|
+
<FormHelperText>
|
108
|
+
<HelperText>
|
109
|
+
<HelperTextItem variant="icon" icon={<ExclamationCircleIcon />}>
|
110
|
+
{form.errors[field.name]}
|
111
|
+
</HelperTextItem>
|
112
|
+
</HelperText>
|
113
|
+
</FormHelperText>
|
114
|
+
)}
|
118
115
|
</FormGroup>
|
119
116
|
);
|
120
117
|
};
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_ansible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 16.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Lobato Garcia
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-27 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: acts_as_list
|
@@ -16,14 +15,14 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
18
|
+
version: '1.2'
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
25
|
+
version: '1.2'
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: deface
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -47,7 +46,7 @@ dependencies:
|
|
47
46
|
version: '14.0'
|
48
47
|
- - "<"
|
49
48
|
- !ruby/object:Gem::Version
|
50
|
-
version: '
|
49
|
+
version: '17'
|
51
50
|
type: :runtime
|
52
51
|
prerelease: false
|
53
52
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,7 +56,7 @@ dependencies:
|
|
57
56
|
version: '14.0'
|
58
57
|
- - "<"
|
59
58
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
59
|
+
version: '17'
|
61
60
|
- !ruby/object:Gem::Dependency
|
62
61
|
name: foreman-tasks
|
63
62
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +66,7 @@ dependencies:
|
|
67
66
|
version: '10.0'
|
68
67
|
- - "<"
|
69
68
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
69
|
+
version: '12'
|
71
70
|
type: :runtime
|
72
71
|
prerelease: false
|
73
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -77,7 +76,7 @@ dependencies:
|
|
77
76
|
version: '10.0'
|
78
77
|
- - "<"
|
79
78
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
79
|
+
version: '12'
|
81
80
|
- !ruby/object:Gem::Dependency
|
82
81
|
name: theforeman-rubocop
|
83
82
|
requirement: !ruby/object:Gem::Requirement
|
@@ -105,8 +104,6 @@ files:
|
|
105
104
|
- app/assets/javascripts/foreman_ansible/locale/ca/foreman_ansible.js
|
106
105
|
- app/assets/javascripts/foreman_ansible/locale/cs_CZ/foreman_ansible.js
|
107
106
|
- app/assets/javascripts/foreman_ansible/locale/de/foreman_ansible.js
|
108
|
-
- app/assets/javascripts/foreman_ansible/locale/en/foreman_ansible.js
|
109
|
-
- app/assets/javascripts/foreman_ansible/locale/en_GB/foreman_ansible.js
|
110
107
|
- app/assets/javascripts/foreman_ansible/locale/es/foreman_ansible.js
|
111
108
|
- app/assets/javascripts/foreman_ansible/locale/fr/foreman_ansible.js
|
112
109
|
- app/assets/javascripts/foreman_ansible/locale/gl/foreman_ansible.js
|
@@ -269,6 +266,7 @@ files:
|
|
269
266
|
- db/migrate/20221003153000_add_ansible_callback_enabled_to_templates.rb
|
270
267
|
- db/migrate/20221031114720_rename_capsule_upgrade_playbook.rb
|
271
268
|
- db/migrate/20230416170000_enable_ansible_callback_for_rex_feature.rb
|
269
|
+
- db/migrate/20241022000000_add_ansible_check_mode_to_templates.rb
|
272
270
|
- db/seeds.d/100_common_parameters.rb
|
273
271
|
- db/seeds.d/62_ansible_proxy_feature.rb
|
274
272
|
- db/seeds.d/75_job_templates.rb
|
@@ -285,8 +283,8 @@ files:
|
|
285
283
|
- locale/cs_CZ/foreman_ansible.po
|
286
284
|
- locale/de/LC_MESSAGES/foreman_ansible.mo
|
287
285
|
- locale/de/foreman_ansible.po
|
288
|
-
- locale/en/foreman_ansible.
|
289
|
-
- locale/en_GB/foreman_ansible.
|
286
|
+
- locale/en/LC_MESSAGES/foreman_ansible.mo
|
287
|
+
- locale/en_GB/LC_MESSAGES/foreman_ansible.mo
|
290
288
|
- locale/es/LC_MESSAGES/foreman_ansible.mo
|
291
289
|
- locale/es/foreman_ansible.po
|
292
290
|
- locale/foreman_ansible.pot
|
@@ -493,7 +491,6 @@ homepage: https://github.com/theforeman/foreman_ansible
|
|
493
491
|
licenses:
|
494
492
|
- GPL-3.0
|
495
493
|
metadata: {}
|
496
|
-
post_install_message:
|
497
494
|
rdoc_options: []
|
498
495
|
require_paths:
|
499
496
|
- lib
|
@@ -508,8 +505,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
508
505
|
- !ruby/object:Gem::Version
|
509
506
|
version: '0'
|
510
507
|
requirements: []
|
511
|
-
rubygems_version: 3.
|
512
|
-
signing_key:
|
508
|
+
rubygems_version: 3.6.2
|
513
509
|
specification_version: 4
|
514
510
|
summary: Ansible integration with Foreman (theforeman.org)
|
515
511
|
test_files:
|