foreman_remote_execution 8.2.1 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby_ci.yml +3 -1
- data/app/controllers/api/v2/job_invocations_controller.rb +0 -1
- data/app/controllers/ui_job_wizard_controller.rb +1 -6
- data/app/views/api/v2/job_invocations/base.json.rabl +1 -1
- data/app/views/job_invocations/show.html.erb +1 -1
- data/app/views/job_invocations/welcome.html.erb +1 -1
- data/db/migrate/20210816100932_rex_setting_category_to_dsl.rb +1 -1
- data/lib/foreman_remote_execution/engine.rb +1 -1
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/locale/action_names.rb +2 -2
- data/locale/de/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/de/foreman_remote_execution.po +154 -266
- data/locale/en/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/en/foreman_remote_execution.po +24 -132
- data/locale/en_GB/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/en_GB/foreman_remote_execution.po +41 -149
- data/locale/es/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/es/foreman_remote_execution.po +210 -320
- data/locale/foreman_remote_execution.pot +211 -394
- data/locale/fr/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/fr/foreman_remote_execution.po +241 -353
- data/locale/ja/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ja/foreman_remote_execution.po +261 -368
- data/locale/ko/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ko/foreman_remote_execution.po +53 -161
- data/locale/pt_BR/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/pt_BR/foreman_remote_execution.po +225 -335
- data/locale/ru/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ru/foreman_remote_execution.po +53 -161
- data/locale/zh_CN/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/zh_CN/foreman_remote_execution.po +359 -465
- data/locale/zh_TW/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/zh_TW/foreman_remote_execution.po +54 -162
- data/webpack/JobWizard/JobWizard.js +10 -52
- data/webpack/JobWizard/JobWizard.scss +1 -5
- data/webpack/JobWizard/__tests__/__snapshots__/integration.test.js.snap +0 -8
- data/webpack/JobWizard/__tests__/fixtures.js +0 -5
- data/webpack/JobWizard/__tests__/integration.test.js +0 -15
- data/webpack/JobWizard/__tests__/validation.test.js +0 -27
- data/webpack/JobWizard/autofill.js +0 -1
- data/webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js +0 -19
- data/webpack/JobWizard/steps/AdvancedFields/__tests__/__snapshots__/AdvancedFields.test.js.snap +1 -9
- data/webpack/JobWizard/steps/HostsAndInputs/HostPreviewModal.js +0 -3
- data/webpack/JobWizard/steps/HostsAndInputs/HostSearch.js +4 -28
- data/webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js +1 -31
- data/webpack/JobWizard/steps/HostsAndInputs/buildHostQuery.js +10 -16
- data/webpack/JobWizard/steps/HostsAndInputs/index.js +3 -55
- data/webpack/JobWizard/steps/Schedule/__tests__/Schedule.test.js +1 -21
- data/webpack/JobWizard/steps/form/Formatter.js +8 -30
- data/webpack/JobWizard/submit.js +2 -13
- metadata +3 -3
@@ -1,16 +1,12 @@
|
|
1
|
-
import React
|
2
|
-
import { useSelector, useDispatch } from 'react-redux';
|
1
|
+
import React from 'react';
|
3
2
|
import { FormGroup, TextArea } from '@patternfly/react-core';
|
4
3
|
import PropTypes from 'prop-types';
|
5
4
|
import SearchBar from 'foremanReact/components/SearchBar';
|
6
5
|
import { getControllerSearchProps } from 'foremanReact/constants';
|
7
|
-
import { TRIGGERS } from 'foremanReact/components/AutoComplete/AutoCompleteConstants';
|
8
|
-
import { getResults } from 'foremanReact/components/AutoComplete/AutoCompleteActions';
|
9
6
|
import { helpLabel, ResetDefault } from './FormHelpers';
|
10
7
|
import { SelectField } from './SelectField';
|
11
8
|
import { ResourceSelect } from './ResourceSelect';
|
12
9
|
import { DateTimePicker } from '../form/DateTimePicker';
|
13
|
-
import { noop } from '../../../helpers';
|
14
10
|
|
15
11
|
const TemplateSearchField = ({
|
16
12
|
name,
|
@@ -22,51 +18,33 @@ const TemplateSearchField = ({
|
|
22
18
|
setValue,
|
23
19
|
values,
|
24
20
|
}) => {
|
25
|
-
const searchQuery = useSelector(
|
26
|
-
state => state.autocomplete?.[name]?.searchQuery
|
27
|
-
);
|
28
|
-
const dispatch = useDispatch();
|
29
|
-
useEffect(() => {
|
30
|
-
setValue({ ...values, [name]: searchQuery });
|
31
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
32
|
-
}, [searchQuery]);
|
33
21
|
const id = name.replace(/ /g, '-');
|
34
22
|
const props = getControllerSearchProps(controller.replace('/', '_'), name);
|
35
|
-
|
36
|
-
const setSearch = newSearchQuery => {
|
37
|
-
dispatch(
|
38
|
-
getResults({
|
39
|
-
url,
|
40
|
-
searchQuery: newSearchQuery,
|
41
|
-
controller,
|
42
|
-
trigger: TRIGGERS.INPUT_CHANGE,
|
43
|
-
id: name,
|
44
|
-
})
|
45
|
-
);
|
46
|
-
};
|
47
23
|
return (
|
48
24
|
<FormGroup
|
49
25
|
label={name}
|
50
26
|
labelIcon={helpLabel(labelText, name)}
|
51
27
|
labelInfo={
|
52
|
-
<ResetDefault
|
28
|
+
<ResetDefault
|
29
|
+
defaultValue={defaultValue}
|
30
|
+
setValue={search => setValue({ ...values, [name]: search })}
|
31
|
+
/>
|
53
32
|
}
|
54
33
|
fieldId={id}
|
55
34
|
isRequired={required}
|
56
35
|
className="foreman-search-field"
|
57
36
|
>
|
58
37
|
<SearchBar
|
59
|
-
initialQuery={values[name]}
|
60
38
|
data={{
|
61
39
|
...props,
|
62
40
|
autocomplete: {
|
63
41
|
id: name,
|
64
42
|
url,
|
65
|
-
|
43
|
+
searchQuery: values[name],
|
66
44
|
},
|
67
45
|
}}
|
68
|
-
onSearch={
|
69
|
-
|
46
|
+
onSearch={null}
|
47
|
+
onSearchChange={search => setValue({ ...values, [name]: search })}
|
70
48
|
/>
|
71
49
|
</FormGroup>
|
72
50
|
);
|
data/webpack/JobWizard/submit.js
CHANGED
@@ -12,8 +12,6 @@ export const submit = ({
|
|
12
12
|
location,
|
13
13
|
organization,
|
14
14
|
feature,
|
15
|
-
provider,
|
16
|
-
advancedInputs,
|
17
15
|
dispatch,
|
18
16
|
}) => {
|
19
17
|
const {
|
@@ -39,13 +37,6 @@ export const submit = ({
|
|
39
37
|
keyPassphrase,
|
40
38
|
timeToPickup,
|
41
39
|
} = advancedValues;
|
42
|
-
const providerInputs = advancedInputs.filter(v => v.provider_input);
|
43
|
-
const providerValues = {};
|
44
|
-
providerInputs.forEach(({ name }) => {
|
45
|
-
providerValues[name] = advancedTemplateValues[name];
|
46
|
-
delete advancedTemplateValues[name];
|
47
|
-
});
|
48
|
-
|
49
40
|
const getCronLine = () => {
|
50
41
|
const [hour, minute] = repeatData.at
|
51
42
|
? repeatData.at.split(':')
|
@@ -113,16 +104,14 @@ export const submit = ({
|
|
113
104
|
concurrency_level: concurrencyLevel,
|
114
105
|
},
|
115
106
|
bookmark_id: null,
|
116
|
-
search_query:
|
107
|
+
search_query:
|
108
|
+
buildHostQuery(selectedTargets, hostsSearchQuery) || 'name ~ *',
|
117
109
|
description_format: description,
|
118
110
|
execution_timeout_interval: timeoutToKill,
|
119
111
|
feature,
|
120
112
|
time_to_pickup: timeToPickup,
|
121
113
|
},
|
122
114
|
};
|
123
|
-
if (Object.keys(providerValues).length) {
|
124
|
-
api.job_invocation[provider] = providerValues;
|
125
|
-
}
|
126
115
|
|
127
116
|
dispatch(
|
128
117
|
post({
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_remote_execution
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 9.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Remote Execution team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
@@ -558,7 +558,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
558
558
|
- !ruby/object:Gem::Version
|
559
559
|
version: '0'
|
560
560
|
requirements: []
|
561
|
-
rubygems_version: 3.
|
561
|
+
rubygems_version: 3.1.6
|
562
562
|
signing_key:
|
563
563
|
specification_version: 4
|
564
564
|
summary: A plugin bringing remote execution to the Foreman, completing the config
|