foreman_acd 0.6.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/app/controllers/foreman_acd/ansible_playbooks_controller.rb +90 -0
- data/app/controllers/foreman_acd/app_definitions_controller.rb +104 -7
- data/app/controllers/foreman_acd/app_instances_controller.rb +34 -32
- data/app/controllers/foreman_acd/concerns/ansible_playbook_parameters.rb +1 -1
- data/app/controllers/foreman_acd/concerns/app_instance_mixins.rb +36 -0
- data/app/controllers/foreman_acd/remote_execution_controller.rb +37 -21
- data/app/controllers/ui_acd_controller.rb +42 -3
- data/app/lib/actions/foreman_acd/deploy_all_hosts.rb +12 -7
- data/app/lib/actions/foreman_acd/run_configurator.rb +11 -7
- data/app/models/concerns/foreman_acd/host_managed_extensions.rb +41 -28
- data/app/models/foreman_acd/acd_provider.rb +7 -1
- data/app/models/foreman_acd/ansible_playbook.rb +2 -1
- data/app/models/foreman_acd/app_instance.rb +48 -3
- data/app/models/foreman_acd/foreman_host.rb +8 -0
- data/app/services/foreman_acd/acd_proxy_proxy_selector.rb +17 -0
- data/app/services/foreman_acd/app_configurator.rb +59 -15
- data/app/services/foreman_acd/app_deployer.rb +27 -4
- data/app/services/foreman_acd/inventory_creator.rb +25 -1
- data/app/views/foreman_acd/ansible_playbooks/_form.html.erb +41 -7
- data/app/views/foreman_acd/app_definitions/_form.html.erb +5 -1
- data/app/views/foreman_acd/app_definitions/import.html.erb +20 -1
- data/app/views/foreman_acd/app_definitions/index.html.erb +3 -6
- data/app/views/foreman_acd/app_instances/_form.html.erb +5 -1
- data/app/views/foreman_acd/app_instances/index.html.erb +18 -12
- data/app/views/foreman_acd/app_instances/report.html.erb +8 -3
- data/app/views/templates/job/run_acd_ansible_playbook.erb +1 -1
- data/app/views/ui_acd/host_report.json.rabl +4 -0
- data/app/views/ui_acd/report_data.json.rabl +10 -0
- data/app/views/ui_acd/validate_hostname.json.rabl +6 -0
- data/config/routes.rb +6 -0
- data/db/migrate/20210316151145_add_git_commit_to_ansible_playbooks.rb +8 -0
- data/db/migrate/20210503122809_add_git_url_to_ansible_playbooks.rb +8 -0
- data/db/migrate/20210818125913_add_is_existing_host_to_foreman_host.rb +8 -0
- data/db/migrate/20210902110645_add_initial_configure_task.rb +8 -0
- data/db/seeds.d/75-job_templates.rb +1 -1
- data/lib/foreman_acd/engine.rb +26 -4
- data/lib/foreman_acd/plugin.rb +9 -18
- data/lib/foreman_acd/version.rb +1 -1
- data/lib/foreman_acd.rb +30 -0
- data/lib/tasks/foreman_acd_tasks.rake +0 -12
- data/package.json +8 -22
- data/test/controllers/ansible_playbooks_controller_test.rb +1 -1
- data/test/controllers/app_instances_controller_test.rb +8 -3
- data/test/controllers/ui_acd_controller_test.rb +25 -6
- data/test/factories/foreman_acd_factories.rb +18 -4
- data/test/models/acd_provider_test.rb +37 -0
- data/test/models/ansible_playbook_test.rb +11 -0
- data/test/models/app_definition_test.rb +1 -1
- data/test/models/app_instance_test.rb +2 -0
- data/test/models/concerns/host_extensions_test.rb +26 -0
- data/test/models/foreman_host_test.rb +12 -0
- data/webpack/__mocks__/foremanReact/API.js +2 -0
- data/webpack/__mocks__/foremanReact/common/I18n.js +3 -0
- data/webpack/__mocks__/foremanReact/common/helpers.js +2 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +2 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal.js +7 -0
- data/webpack/__mocks__/foremanReact/components/common/forms/CommonForm.js +2 -0
- data/webpack/__mocks__/foremanReact/components/common/forms/TextInput.js +2 -0
- data/webpack/__mocks__/foremanReact/components/hosts/powerStatus.js +1 -0
- data/webpack/__snapshots__/helper.test.js.snap +14 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinition.js +35 -11
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionActions.js +12 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionConstants.js +1 -0
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionReducer.js +30 -9
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionSelectors.js +4 -0
- data/webpack/components/ApplicationDefinition/__fixtures__/applicationDefinitionConfData_1.fixtures.js +288 -0
- data/webpack/components/ApplicationDefinition/__fixtures__/applicationDefinitionReducer.fixtures.js +79 -0
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinition.test.js +26 -0
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionReducer.test.js +119 -0
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionSelectors.test.js +53 -0
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinition.test.js.snap +226 -0
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionReducer.test.js.snap +3033 -0
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionSelectors.test.js.snap +307 -0
- data/webpack/components/ApplicationDefinition/components/AnsiblePlaybookSelector.js +2 -1
- data/webpack/components/ApplicationDefinition/components/__tests__/AnsiblePlaybookSelector.test.js +41 -0
- data/webpack/components/ApplicationDefinition/components/__tests__/__snapshots__/AnsiblePlaybookSelector.test.js.snap +121 -0
- data/webpack/components/ApplicationDefinition/index.js +8 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImport.js +214 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImport.scss +1 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportActions.js +161 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportConstants.js +6 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportReducer.js +79 -0
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportSelectors.js +8 -0
- data/webpack/components/ApplicationDefinitionImport/__fixtures__/applicationDefinitionImportConfData_1.fixtures.js +129 -0
- data/webpack/components/ApplicationDefinitionImport/__fixtures__/applicationDefinitionImportReducer.fixtures.js +29 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImport.test.js +20 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImportReducer.test.js +43 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImportSelectors.test.js +29 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImport.test.js.snap +62 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImportReducer.test.js.snap +362 -0
- data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImportSelectors.test.js.snap +130 -0
- data/webpack/components/ApplicationDefinitionImport/index.js +32 -0
- data/webpack/components/ApplicationInstance/ApplicationInstance.js +105 -31
- data/webpack/components/ApplicationInstance/ApplicationInstanceActions.js +118 -6
- data/webpack/components/ApplicationInstance/ApplicationInstanceConstants.js +4 -0
- data/webpack/components/ApplicationInstance/ApplicationInstanceHelper.js +15 -0
- data/webpack/components/ApplicationInstance/ApplicationInstanceReducer.js +71 -30
- data/webpack/components/ApplicationInstance/ApplicationInstanceSelectors.js +4 -0
- data/webpack/components/ApplicationInstance/__fixtures__/applicationInstanceConfData_1.fixtures.js +263 -0
- data/webpack/components/ApplicationInstance/__fixtures__/applicationInstanceReducer.fixtures.js +80 -0
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstance.test.js +24 -0
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceReducer.test.js +131 -0
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceSelectors.test.js +56 -0
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstance.test.js.snap +300 -0
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceReducer.test.js.snap +2990 -0
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceSelectors.test.js.snap +284 -0
- data/webpack/components/ApplicationInstance/components/AppDefinitionSelector.js +1 -0
- data/webpack/components/ApplicationInstance/components/ServiceCounter.js +1 -1
- data/webpack/components/ApplicationInstance/helper.js +0 -0
- data/webpack/components/ApplicationInstance/index.js +8 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReport.js +81 -6
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportActions.js +35 -1
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportConstants.js +3 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportReducer.js +19 -0
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportSelectors.js +4 -0
- data/webpack/components/ApplicationInstanceReport/__fixtures__/applicationInstanceReportData_1.fixtures.js +349 -0
- data/webpack/components/ApplicationInstanceReport/__fixtures__/applicationInstanceReportReducer.fixtures.js +20 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReport.test.js +47 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReportReducer.test.js +41 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReportSelectors.test.js +26 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReport.test.js.snap +7 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReportReducer.test.js.snap +718 -0
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReportSelectors.test.js.snap +347 -0
- data/webpack/components/ApplicationInstanceReport/components/__tests__/ReportViewer.test.js +24 -0
- data/webpack/components/ApplicationInstanceReport/components/__tests__/__snapshots__/ReportViewer.test.js.snap +24 -0
- data/webpack/components/ApplicationInstanceReport/index.js +8 -1
- data/webpack/components/ExistingHostSelection/ExistingHostSelection.js +104 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelection.scss +15 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionActions.js +71 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionConstants.js +4 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionHelper.js +0 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionReducer.js +90 -0
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionSelectors.js +8 -0
- data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionConfData_1.fixtures.js +191 -0
- data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionReducer.fixtures.js +203 -0
- data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelection.test.js +19 -0
- data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelectionReducer.test.js +59 -0
- data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelectionSelectors.test.js +36 -0
- data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelection.test.js.snap +35 -0
- data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelectionReducer.test.js.snap +614 -0
- data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelectionSelectors.test.js.snap +27 -0
- data/webpack/components/ExistingHostSelection/components/ServiceSelector.js +48 -0
- data/webpack/components/ExistingHostSelection/components/__tests__/ServiceSelector.test.js +35 -0
- data/webpack/components/ExistingHostSelection/components/__tests__/__snapshots__/ServiceSelector.test.js.snap +77 -0
- data/webpack/components/ExistingHostSelection/index.js +26 -0
- data/webpack/components/ParameterSelection/ParameterSelection.js +103 -1
- data/webpack/components/ParameterSelection/ParameterSelection.scss +7 -0
- data/webpack/components/ParameterSelection/ParameterSelectionActions.js +46 -4
- data/webpack/components/ParameterSelection/ParameterSelectionConstants.js +2 -0
- data/webpack/components/ParameterSelection/ParameterSelectionHelper.js +5 -1
- data/webpack/components/ParameterSelection/ParameterSelectionReducer.js +51 -29
- data/webpack/components/ParameterSelection/ParameterSelectionSelectors.js +2 -0
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionData_1.fixtures.js +124 -84
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionReducer.fixtures.js +10 -4
- data/webpack/components/ParameterSelection/__tests__/ParameterSelection.test.js +36 -46
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionReducer.test.js +33 -25
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionSelectors.test.js +12 -6
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelection.test.js.snap +84 -112
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionReducer.test.js.snap +1589 -878
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionSelectors.test.js.snap +130 -79
- data/webpack/components/ParameterSelection/index.js +4 -1
- data/webpack/components/SyncGitRepo/SyncGitRepo.js +202 -0
- data/webpack/components/SyncGitRepo/SyncGitRepo.scss +1 -0
- data/webpack/components/SyncGitRepo/SyncGitRepoActions.js +123 -0
- data/webpack/components/SyncGitRepo/SyncGitRepoConstants.js +8 -0
- data/webpack/components/SyncGitRepo/SyncGitRepoReducer.js +80 -0
- data/webpack/components/SyncGitRepo/SyncGitRepoSelectors.js +6 -0
- data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoConfData_1.fixtures.js +7 -0
- data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoReducer.fixtures.js +44 -0
- data/webpack/components/SyncGitRepo/__tests__/SyncGitRepo.test.js +27 -0
- data/webpack/components/SyncGitRepo/__tests__/SyncGitRepoReducer.test.js +95 -0
- data/webpack/components/SyncGitRepo/__tests__/SyncGitRepoSelectors.test.js +32 -0
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepo.test.js.snap +31 -0
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepoReducer.test.js.snap +137 -0
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepoSelectors.test.js.snap +13 -0
- data/webpack/components/SyncGitRepo/components/FormTextInput.js +42 -0
- data/webpack/components/SyncGitRepo/components/ScmTypeSelector.js +47 -0
- data/webpack/components/SyncGitRepo/index.js +28 -0
- data/webpack/components/common/DeleteTableEntry.js +16 -2
- data/webpack/components/common/ExtTextInput.js +43 -0
- data/webpack/components/common/__tests__/EditTableEntry.test.js +53 -0
- data/webpack/components/common/__tests__/LockTableEntry.test.js +35 -0
- data/webpack/components/common/__tests__/__snapshots__/DeleteTableEntry.test.js.snap +40 -2
- data/webpack/components/common/__tests__/__snapshots__/EditTableEntry.test.js.snap +81 -0
- data/webpack/components/common/__tests__/__snapshots__/LockTableEntry.test.js.snap +60 -0
- data/webpack/helper.js +35 -1
- data/webpack/helper.test.js +56 -0
- data/webpack/index.js +7 -0
- data/webpack/js-yaml.js +3874 -0
- data/webpack/reducer.js +16 -1
- data/webpack/test_setup.js +0 -2
- metadata +136 -11
- data/webpack/components/common/EasyHeaderFormatter.js +0 -18
- data/webpack/components/common/__tests__/__snapshots__/AddParameter.test.js.snap +0 -35
- data/webpack/components/common/__tests__/__snapshots__/DeleteParameter.test.js.snap +0 -41
@@ -0,0 +1,35 @@
|
|
1
|
+
import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
|
2
|
+
|
3
|
+
import ServiceSelector from '../ServiceSelector';
|
4
|
+
|
5
|
+
const noop = () => {};
|
6
|
+
|
7
|
+
const data = [
|
8
|
+
{ name: 'report 1', status: 'done' },
|
9
|
+
{ name: 'report 2', status: 'pending' }
|
10
|
+
];
|
11
|
+
|
12
|
+
const fixtures = {
|
13
|
+
'should render the service selector': {
|
14
|
+
hidden: false,
|
15
|
+
label: 'Test Label',
|
16
|
+
viewText: 'view service',
|
17
|
+
selectValue: '1',
|
18
|
+
onChange: noop,
|
19
|
+
options: { first: 'first', second: 'second'},
|
20
|
+
additionalData: { moreData: 'moooore' },
|
21
|
+
},
|
22
|
+
'should render the hidden service selector': {
|
23
|
+
hidden: true,
|
24
|
+
label: 'Test Label',
|
25
|
+
viewText: 'view service',
|
26
|
+
selectValue: '1',
|
27
|
+
onChange: noop,
|
28
|
+
options: { first: 'first', second: 'second'},
|
29
|
+
additionalData: { },
|
30
|
+
},
|
31
|
+
};
|
32
|
+
|
33
|
+
describe('ServiceSelector', () =>
|
34
|
+
testComponentSnapshotsWithFixtures(ServiceSelector, fixtures));
|
35
|
+
|
@@ -0,0 +1,77 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`ServiceSelector should render the hidden service selector 1`] = `
|
4
|
+
<div
|
5
|
+
className="form-group"
|
6
|
+
>
|
7
|
+
<label
|
8
|
+
className="col-md-2 control-label"
|
9
|
+
>
|
10
|
+
Test Label
|
11
|
+
</label>
|
12
|
+
<div
|
13
|
+
className="col-md-4"
|
14
|
+
>
|
15
|
+
<ExtSelect
|
16
|
+
additionalData={Object {}}
|
17
|
+
editable={true}
|
18
|
+
hidden={true}
|
19
|
+
onChange={[Function]}
|
20
|
+
options={
|
21
|
+
Object {
|
22
|
+
"first": "first",
|
23
|
+
"second": "second",
|
24
|
+
}
|
25
|
+
}
|
26
|
+
selectValue="1"
|
27
|
+
viewText="view service"
|
28
|
+
/>
|
29
|
+
<RailsData
|
30
|
+
key="service_id"
|
31
|
+
parameter="service_id"
|
32
|
+
value="1"
|
33
|
+
view="existing_host_selection"
|
34
|
+
/>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
`;
|
38
|
+
|
39
|
+
exports[`ServiceSelector should render the service selector 1`] = `
|
40
|
+
<div
|
41
|
+
className="form-group"
|
42
|
+
>
|
43
|
+
<label
|
44
|
+
className="col-md-2 control-label"
|
45
|
+
>
|
46
|
+
Test Label
|
47
|
+
</label>
|
48
|
+
<div
|
49
|
+
className="col-md-4"
|
50
|
+
>
|
51
|
+
<ExtSelect
|
52
|
+
additionalData={
|
53
|
+
Object {
|
54
|
+
"moreData": "moooore",
|
55
|
+
}
|
56
|
+
}
|
57
|
+
editable={true}
|
58
|
+
hidden={false}
|
59
|
+
onChange={[Function]}
|
60
|
+
options={
|
61
|
+
Object {
|
62
|
+
"first": "first",
|
63
|
+
"second": "second",
|
64
|
+
}
|
65
|
+
}
|
66
|
+
selectValue="1"
|
67
|
+
viewText="view service"
|
68
|
+
/>
|
69
|
+
<RailsData
|
70
|
+
key="service_id"
|
71
|
+
parameter="service_id"
|
72
|
+
value="1"
|
73
|
+
view="existing_host_selection"
|
74
|
+
/>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
`;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { bindActionCreators } from 'redux';
|
2
|
+
import { connect } from 'react-redux';
|
3
|
+
|
4
|
+
import './ExistingHostSelection.scss';
|
5
|
+
import ExistingHostSelection from './ExistingHostSelection';
|
6
|
+
import * as ExistingHostSelectionActions from './ExistingHostSelectionActions';
|
7
|
+
|
8
|
+
import {
|
9
|
+
selectServiceId,
|
10
|
+
selectAvailableHosts,
|
11
|
+
selectAlreadyUsedHosts,
|
12
|
+
} from './ExistingHostSelectionSelectors';
|
13
|
+
|
14
|
+
const mapStateToProps = state => ({
|
15
|
+
serviceId: selectServiceId(state),
|
16
|
+
availableHosts: selectAvailableHosts(state),
|
17
|
+
alreadyUsedHosts: selectAlreadyUsedHosts(state),
|
18
|
+
});
|
19
|
+
|
20
|
+
const mapDispatchToProps = dispatch =>
|
21
|
+
bindActionCreators(ExistingHostSelectionActions, dispatch);
|
22
|
+
|
23
|
+
export default connect(
|
24
|
+
mapStateToProps,
|
25
|
+
mapDispatchToProps
|
26
|
+
)(ExistingHostSelection);
|
@@ -9,7 +9,8 @@ import AddTableEntry from '../common/AddTableEntry';
|
|
9
9
|
import EditTableEntry from '../common/EditTableEntry';
|
10
10
|
import DeleteTableEntry from '../common/DeleteTableEntry';
|
11
11
|
import LockTableEntry from '../common/LockTableEntry';
|
12
|
-
import
|
12
|
+
import ForemanModal from 'foremanReact/components/ForemanModal';
|
13
|
+
import * as YamlValidator from '../../js-yaml';
|
13
14
|
|
14
15
|
import {
|
15
16
|
transformForemanData,
|
@@ -32,6 +33,7 @@ import {
|
|
32
33
|
Button,
|
33
34
|
Table,
|
34
35
|
FormControl,
|
36
|
+
InputGroup,
|
35
37
|
defaultSortingOrder,
|
36
38
|
customHeaderFormattersDefinition,
|
37
39
|
inlineEditFormatterFactory,
|
@@ -47,12 +49,42 @@ class ParameterSelection extends React.Component {
|
|
47
49
|
|
48
50
|
constructor(props) {
|
49
51
|
super(props);
|
52
|
+
this.state = {textValue: ''};
|
50
53
|
}
|
51
54
|
|
55
|
+
handleChange = event => {
|
56
|
+
this.setState({textValue: event.target.value});
|
57
|
+
};
|
58
|
+
|
52
59
|
isEditing({rowData}) {
|
53
60
|
return (rowData.backup !== undefined);
|
54
61
|
}
|
55
62
|
|
63
|
+
yamlValidator() {
|
64
|
+
let result = true;
|
65
|
+
let msg = "";
|
66
|
+
try {
|
67
|
+
const doc = YamlValidator.load(this.state.textValue);
|
68
|
+
} catch (e) {
|
69
|
+
result = false;
|
70
|
+
msg = "Invalid Yaml: " + e.name + ": " + e.message;
|
71
|
+
}
|
72
|
+
return {
|
73
|
+
validateResult: result,
|
74
|
+
validateMsg: msg
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
yamlValue() {
|
79
|
+
if (this.props.editParamsRowIndex != undefined) {
|
80
|
+
let id = this.props.editParamsRowIndex;
|
81
|
+
if (this.props.parameters[id] != undefined) {
|
82
|
+
return this.props.parameters[id]['value'];
|
83
|
+
}
|
84
|
+
}
|
85
|
+
return '';
|
86
|
+
}
|
87
|
+
|
56
88
|
// enables our custom header formatters extensions to reactabular
|
57
89
|
customHeaderFormatters = customHeaderFormattersDefinition;
|
58
90
|
|
@@ -63,12 +95,15 @@ class ParameterSelection extends React.Component {
|
|
63
95
|
organization,
|
64
96
|
paramType,
|
65
97
|
paramDataUrl,
|
98
|
+
hiddenParameterTypes,
|
66
99
|
initParameterSelection,
|
67
100
|
sortParameter,
|
68
101
|
deleteParameter,
|
69
102
|
lockParameter,
|
70
103
|
activateEditParameter,
|
71
104
|
changeEditParameter,
|
105
|
+
openParameterSelectionDialogBox,
|
106
|
+
closeParameterSelectionDialogBox,
|
72
107
|
loadParamData,
|
73
108
|
} = this.props;
|
74
109
|
|
@@ -165,6 +200,22 @@ class ParameterSelection extends React.Component {
|
|
165
200
|
/>
|
166
201
|
</td>
|
167
202
|
),
|
203
|
+
renderEditComplexText: (value, additionalData, subtype='text') => (
|
204
|
+
<td className="editing">
|
205
|
+
<InputGroup>
|
206
|
+
<FormControl
|
207
|
+
type={subtype}
|
208
|
+
defaultValue={additionalData.rowData.isYaml == true ? '' : value}
|
209
|
+
onBlur={e => changeEditParameter(e.target.value, additionalData) }
|
210
|
+
readOnly={additionalData.rowData.isYaml}
|
211
|
+
placeholder={'Press YAML button for Yaml Data'}
|
212
|
+
/>
|
213
|
+
<InputGroup.Button>
|
214
|
+
<Button onClick= {e => openParameterSelectionDialogBox(e)}> YAML </Button>
|
215
|
+
</InputGroup.Button>
|
216
|
+
</InputGroup>
|
217
|
+
</td>
|
218
|
+
),
|
168
219
|
renderEditSelect: (value, additionalData, options) => (
|
169
220
|
<td className="editing">
|
170
221
|
<Select
|
@@ -209,6 +260,10 @@ class ParameterSelection extends React.Component {
|
|
209
260
|
case 'text':
|
210
261
|
prettyValue = value
|
211
262
|
break;
|
263
|
+
case 'complex':
|
264
|
+
prettyValue = additionalData.rowData.isYaml ? 'YAML value' : value;
|
265
|
+
break;
|
266
|
+
|
212
267
|
}
|
213
268
|
}
|
214
269
|
return inlineEditFormatterImpl.renderValue(prettyValue, additionalData)
|
@@ -235,6 +290,8 @@ class ParameterSelection extends React.Component {
|
|
235
290
|
case 'password':
|
236
291
|
return inlineEditFormatterImpl.renderEditText(value, additionalData, 'password');
|
237
292
|
case 'text':
|
293
|
+
case 'complex':
|
294
|
+
return inlineEditFormatterImpl.renderEditComplexText(value, additionalData);
|
238
295
|
default:
|
239
296
|
return inlineEditFormatterImpl.renderEditText(value, additionalData);
|
240
297
|
}
|
@@ -243,12 +300,14 @@ class ParameterSelection extends React.Component {
|
|
243
300
|
}
|
244
301
|
}
|
245
302
|
});
|
303
|
+
|
246
304
|
this.inlineEditFormatter = inlineEditFormatter;
|
247
305
|
|
248
306
|
initParameterSelection(
|
249
307
|
paramType,
|
250
308
|
paramDefinition,
|
251
309
|
parameters,
|
310
|
+
hiddenParameterTypes,
|
252
311
|
useDefaultValue,
|
253
312
|
allowNameAdjustment,
|
254
313
|
allowDescriptionAdjustment,
|
@@ -274,6 +333,7 @@ class ParameterSelection extends React.Component {
|
|
274
333
|
addParameter,
|
275
334
|
confirmEditParameter,
|
276
335
|
cancelEditParameter,
|
336
|
+
closeParameterSelectionDialogBox,
|
277
337
|
editModeCallback,
|
278
338
|
} = this.props;
|
279
339
|
|
@@ -282,6 +342,7 @@ class ParameterSelection extends React.Component {
|
|
282
342
|
|
283
343
|
if (newEntryIndex >= 0) {
|
284
344
|
const newEntry = parameters[newEntryIndex];
|
345
|
+
|
285
346
|
// sort all elements, besides the newEntry which will be
|
286
347
|
// added to the end of the Array
|
287
348
|
const tmpParameters = cloneDeep(parameters);
|
@@ -312,6 +373,8 @@ class ParameterSelection extends React.Component {
|
|
312
373
|
editModeCallback(this.props.editMode);
|
313
374
|
}
|
314
375
|
|
376
|
+
let { validateResult, validateMsg } = this.yamlValidator();
|
377
|
+
|
315
378
|
return(
|
316
379
|
<div>
|
317
380
|
<div className="clearfix">
|
@@ -358,6 +421,38 @@ class ParameterSelection extends React.Component {
|
|
358
421
|
/>
|
359
422
|
</div>
|
360
423
|
</div>
|
424
|
+
<div>
|
425
|
+
<ForemanModal
|
426
|
+
id="ParameterSelectionComplexDataModal"
|
427
|
+
dialogClassName="complex_data_modal"
|
428
|
+
title={__("YAML Data Input")}
|
429
|
+
|
430
|
+
>
|
431
|
+
<ForemanModal.Header closeButton={false}>
|
432
|
+
</ForemanModal.Header>
|
433
|
+
<textarea id='yamlData'
|
434
|
+
defaultValue= {this.yamlValue()}
|
435
|
+
onChange={this.handleChange}
|
436
|
+
style={{width: "550px", height: "350px", fontFamily: "Courier"}} />
|
437
|
+
<ForemanModal.Footer>
|
438
|
+
<div>
|
439
|
+
{validateResult == false ? (
|
440
|
+
<div className="form-group">
|
441
|
+
<div class="alert alert-danger alert-dismissable">
|
442
|
+
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
443
|
+
<span class="pficon pficon-close"></span>
|
444
|
+
</button>
|
445
|
+
<span class="pficon pficon-error-circle-o"></span>
|
446
|
+
{validateMsg}
|
447
|
+
</div>
|
448
|
+
</div>
|
449
|
+
) : (<div></div>)}
|
450
|
+
<Button bsStyle="primary" onClick ={() => closeParameterSelectionDialogBox({ mode: 'save' })}>{__("Save")}</Button>
|
451
|
+
<Button bsStyle="default" onClick={() => closeParameterSelectionDialogBox({ mode: 'cancel' })}>{__("Cancel")}</Button>
|
452
|
+
</div>
|
453
|
+
</ForemanModal.Footer>
|
454
|
+
</ForemanModal>
|
455
|
+
</div>
|
361
456
|
</div>
|
362
457
|
);
|
363
458
|
}
|
@@ -370,7 +465,9 @@ ParameterSelection.defaultProps = {
|
|
370
465
|
paramData: {},
|
371
466
|
parameters: [],
|
372
467
|
columns: [],
|
468
|
+
hiddenParameterTypes: [],
|
373
469
|
sortingColumns: {},
|
470
|
+
editParamsRowIndex: [],
|
374
471
|
editModeCallback: undefined,
|
375
472
|
};
|
376
473
|
|
@@ -387,6 +484,8 @@ ParameterSelection.propTypes = {
|
|
387
484
|
editMode: PropTypes.bool.isRequired,
|
388
485
|
loading: PropTypes.bool.isRequired,
|
389
486
|
paramData: PropTypes.object.isRequired,
|
487
|
+
hiddenParameterTypes: PropTypes.array.isRequired,
|
488
|
+
allowedParameterTypes: PropTypes.object,
|
390
489
|
parameterTypes: PropTypes.object,
|
391
490
|
parameters: PropTypes.array,
|
392
491
|
sortingColumns: PropTypes.object,
|
@@ -400,8 +499,11 @@ ParameterSelection.propTypes = {
|
|
400
499
|
confirmEditParameter: PropTypes.func,
|
401
500
|
cancelEditParameter: PropTypes.func,
|
402
501
|
changeEditParameter: PropTypes.func,
|
502
|
+
openParameterSelectionDialogBox: PropTypes.func,
|
503
|
+
closeParameterSelectionDialogBox: PropTypes.func,
|
403
504
|
loadParamData: PropTypes.func,
|
404
505
|
paramDefinition: PropTypes.object,
|
506
|
+
editParamsRowIndex: PropTypes.array,
|
405
507
|
};
|
406
508
|
|
407
509
|
export default ParameterSelection;
|
@@ -17,9 +17,14 @@ import {
|
|
17
17
|
} from 'foremanReact/common/helpers';
|
18
18
|
|
19
19
|
import {
|
20
|
-
|
20
|
+
filterParameterTypes,
|
21
21
|
} from './ParameterSelectionHelper';
|
22
22
|
|
23
|
+
import {
|
24
|
+
setModalOpen,
|
25
|
+
setModalClosed,
|
26
|
+
} from 'foremanReact/components/ForemanModal/ForemanModalActions';
|
27
|
+
|
23
28
|
import {
|
24
29
|
PARAMETER_SELECTION_INIT,
|
25
30
|
PARAMETER_SELECTION_TYPES,
|
@@ -36,12 +41,15 @@ import {
|
|
36
41
|
PARAMETER_SELECTION_LOAD_PARAM_DATA_REQUEST,
|
37
42
|
PARAMETER_SELECTION_LOAD_PARAM_DATA_SUCCESS,
|
38
43
|
PARAMETER_SELECTION_LOAD_PARAM_DATA_FAILURE,
|
44
|
+
PARAMETER_SELECTION_COMPLEX_DATA_MODAL_OPEN,
|
45
|
+
PARAMETER_SELECTION_COMPLEX_DATA_MODAL_CLOSE,
|
39
46
|
} from './ParameterSelectionConstants';
|
40
47
|
|
41
48
|
export const initParameterSelection = (
|
42
49
|
paramType,
|
43
50
|
paramDefinition,
|
44
51
|
parameters,
|
52
|
+
hiddenParameterTypes,
|
45
53
|
useDefaultValue,
|
46
54
|
allowNameAdjustment,
|
47
55
|
allowDescriptionAdjustment,
|
@@ -174,9 +182,18 @@ export const initParameterSelection = (
|
|
174
182
|
initialState.parameters = parameters;
|
175
183
|
|
176
184
|
if ((paramType == PARAMETER_SELECTION_PARAM_TYPE_FOREMAN) && (parameters)) {
|
177
|
-
|
185
|
+
let pTypes = PARAMETER_SELECTION_TYPES;
|
186
|
+
|
187
|
+
// filter hidden parameters
|
188
|
+
hiddenParameterTypes.forEach(item => delete pTypes[item]);
|
189
|
+
initialState.allowedParameterTypes = pTypes;
|
190
|
+
|
191
|
+
// filter already used parameter types
|
192
|
+
initialState.parameterTypes = filterParameterTypes(pTypes, parameters);
|
178
193
|
}
|
179
194
|
|
195
|
+
initialState.paramType = paramType;
|
196
|
+
|
180
197
|
dispatch({
|
181
198
|
type: PARAMETER_SELECTION_INIT,
|
182
199
|
payload: initialState,
|
@@ -198,7 +215,33 @@ export const lockParameter = (additionalData) => ({
|
|
198
215
|
},
|
199
216
|
});
|
200
217
|
|
201
|
-
export const
|
218
|
+
export const openParameterSelectionDialogBox = (additionalData) => dispatch => {
|
219
|
+
dispatch({
|
220
|
+
type: PARAMETER_SELECTION_COMPLEX_DATA_MODAL_OPEN,
|
221
|
+
payload: {
|
222
|
+
...additionalData,
|
223
|
+
}
|
224
|
+
});
|
225
|
+
dispatch(
|
226
|
+
setModalOpen({ id: 'ParameterSelectionComplexDataModal' })
|
227
|
+
);
|
228
|
+
};
|
229
|
+
|
230
|
+
export const closeParameterSelectionDialogBox = (additionalData) => dispatch => {
|
231
|
+
dispatch({
|
232
|
+
type: PARAMETER_SELECTION_COMPLEX_DATA_MODAL_CLOSE,
|
233
|
+
payload: {
|
234
|
+
...additionalData,
|
235
|
+
}
|
236
|
+
});
|
237
|
+
|
238
|
+
dispatch(
|
239
|
+
setModalClosed({ id: 'ParameterSelectionComplexDataModal' })
|
240
|
+
);
|
241
|
+
};
|
242
|
+
|
243
|
+
export const addParameter = (additionalData) => (
|
244
|
+
{
|
202
245
|
type: PARAMETER_SELECTION_ADD,
|
203
246
|
payload: {
|
204
247
|
...additionalData,
|
@@ -268,4 +311,3 @@ export const loadParamData = (attr) => dispatch => {
|
|
268
311
|
)
|
269
312
|
.catch(error => dispatch(errorHandler(PARAMETER_SELECTION_LOAD_PARAM_DATA_FAILURE, error)));
|
270
313
|
};
|
271
|
-
|
@@ -12,6 +12,8 @@ export const PARAMETER_SELECTION_LOAD_PARAM_DATA_SUCCESS = 'PARAMETER_SELECTION_
|
|
12
12
|
export const PARAMETER_SELECTION_LOAD_PARAM_DATA_FAILURE = 'PARAMETER_SELECTION_LOAD_PARAM_DATA_FAILURE';
|
13
13
|
export const PARAMETER_SELECTION_PARAM_TYPE_FOREMAN = 'PARAMETER_SELECTION_PARAM_TYPE_FOREMAN';
|
14
14
|
export const PARAMETER_SELECTION_PARAM_TYPE_ANSIBLE = 'PARAMETER_SELECTION_PARAM_TYPE_ANSIBLE';
|
15
|
+
export const PARAMETER_SELECTION_COMPLEX_DATA_MODAL_OPEN = 'PARAMETER_SELECTION_COMPLEX_DATA_MODAL_OPEN';
|
16
|
+
export const PARAMETER_SELECTION_COMPLEX_DATA_MODAL_CLOSE = 'PARAMETER_SELECTION_COMPLEX_DATA_MODAL_CLOSE';
|
15
17
|
|
16
18
|
// Make sure the object is sorted by value
|
17
19
|
// (Compute Profile -> Partition table -> Root password)
|
@@ -11,10 +11,14 @@ export const transformForemanData = (fdata) => {
|
|
11
11
|
return (result);
|
12
12
|
}
|
13
13
|
|
14
|
-
export const
|
14
|
+
export const filterParameterTypes = (options, parameters) => {
|
15
15
|
const newOptions = cloneDeep(options);
|
16
|
+
|
16
17
|
// hostparam can be used multiple times
|
17
18
|
const alreadyUsed = parameters.map(item => item["type"]).filter(item => item != 'hostparam');
|
19
|
+
|
20
|
+
// remove already used items
|
18
21
|
alreadyUsed.forEach(item => delete newOptions[item])
|
22
|
+
|
19
23
|
return newOptions;
|
20
24
|
}
|
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
} from 'lodash';
|
8
8
|
|
9
9
|
import {
|
10
|
-
|
10
|
+
filterParameterTypes,
|
11
11
|
} from './ParameterSelectionHelper';
|
12
12
|
|
13
13
|
import * as sort from 'sortabular';
|
@@ -23,17 +23,15 @@ import {
|
|
23
23
|
PARAMETER_SELECTION_EDIT_CHANGE,
|
24
24
|
PARAMETER_SELECTION_EDIT_CANCEL,
|
25
25
|
PARAMETER_SELECTION_SORT,
|
26
|
-
PARAMETER_SELECTION_PARAM_TYPE_FOREMAN,
|
27
|
-
PARAMETER_SELECTION_PARAM_TYPE_ANSIBLE,
|
28
26
|
PARAMETER_SELECTION_LOAD_PARAM_DATA_REQUEST,
|
29
27
|
PARAMETER_SELECTION_LOAD_PARAM_DATA_SUCCESS,
|
30
28
|
PARAMETER_SELECTION_LOAD_PARAM_DATA_FAILURE,
|
29
|
+
PARAMETER_SELECTION_PARAM_TYPE_FOREMAN,
|
30
|
+
PARAMETER_SELECTION_PARAM_TYPE_ANSIBLE,
|
31
|
+
PARAMETER_SELECTION_COMPLEX_DATA_MODAL_OPEN,
|
32
|
+
PARAMETER_SELECTION_COMPLEX_DATA_MODAL_CLOSE,
|
31
33
|
} from './ParameterSelectionConstants';
|
32
34
|
|
33
|
-
import {
|
34
|
-
APPLICATION_DEFINITION_PARAMETER_SELECTION_MODAL_CLOSE,
|
35
|
-
} from '../ApplicationDefinition/ApplicationDefinitionConstants';
|
36
|
-
|
37
35
|
export const initialState = Immutable({
|
38
36
|
editMode: false,
|
39
37
|
error: { errorMsg: '', status: '', statusText: '' },
|
@@ -55,13 +53,16 @@ const parameterSelectionParameters = (state = initialState, action) => {
|
|
55
53
|
index = Math.max(...parameters.map(e => e.id)) + 1;
|
56
54
|
}
|
57
55
|
|
58
|
-
const newRow = {id: index, locked: false, name: "", description: '', type: '', value: '', newEntry: true };
|
56
|
+
const newRow = {id: index, locked: false, name: "", description: '', type: '', value: '', isYaml: false, newEntry: true };
|
57
|
+
if (state.paramType == 'PARAMETER_SELECTION_PARAM_TYPE_ANSIBLE') {
|
58
|
+
newRow['type'] = 'complex';
|
59
|
+
}
|
59
60
|
newRow.backup = cloneDeep(newRow)
|
60
61
|
parameters.push(newRow);
|
61
|
-
|
62
62
|
return state.merge({
|
63
63
|
editMode: true,
|
64
|
-
parameters: parameters
|
64
|
+
parameters: parameters,
|
65
|
+
editParamsRowIndex: index,
|
65
66
|
});
|
66
67
|
}
|
67
68
|
case PARAMETER_SELECTION_LOCK: {
|
@@ -82,7 +83,7 @@ const parameterSelectionParameters = (state = initialState, action) => {
|
|
82
83
|
const parameters = state.parameters.filter(v => v.id !== payload.rowData.id);
|
83
84
|
return state.merge({
|
84
85
|
parameters: parameters,
|
85
|
-
parameterTypes:
|
86
|
+
parameterTypes: filterParameterTypes(state.allowedParameterTypes, parameters),
|
86
87
|
})
|
87
88
|
}
|
88
89
|
case PARAMETER_SELECTION_EDIT_ACTIVATE: {
|
@@ -90,10 +91,10 @@ const parameterSelectionParameters = (state = initialState, action) => {
|
|
90
91
|
const index = findIndex(parameters, { id: payload.rowData.id });
|
91
92
|
|
92
93
|
parameters[index].backup = cloneDeep(parameters[index]);
|
93
|
-
|
94
94
|
return state.merge({
|
95
95
|
editMode: true,
|
96
|
-
parameters: parameters
|
96
|
+
parameters: parameters,
|
97
|
+
editParamsRowIndex: index,
|
97
98
|
});
|
98
99
|
}
|
99
100
|
case PARAMETER_SELECTION_EDIT_CONFIRM: {
|
@@ -105,7 +106,7 @@ const parameterSelectionParameters = (state = initialState, action) => {
|
|
105
106
|
|
106
107
|
return state.merge({
|
107
108
|
editMode: false,
|
108
|
-
parameterTypes:
|
109
|
+
parameterTypes: filterParameterTypes(state.allowedParameterTypes, parameters),
|
109
110
|
parameters: parameters
|
110
111
|
});
|
111
112
|
}
|
@@ -113,9 +114,15 @@ const parameterSelectionParameters = (state = initialState, action) => {
|
|
113
114
|
const parameters = cloneDeep(state.parameters);
|
114
115
|
const index = findIndex(parameters, { id: payload.rowData.id });
|
115
116
|
|
116
|
-
parameters[index][payload.property
|
117
|
-
|
118
|
-
|
117
|
+
if (!parameters[index]['isYaml'] && payload.property == 'value') {
|
118
|
+
parameters[index]['value'] = payload.value;
|
119
|
+
} else if (payload.property != 'value') {
|
120
|
+
parameters[index][payload.property] = payload.value;
|
121
|
+
}
|
122
|
+
return state.merge({
|
123
|
+
parameters: parameters,
|
124
|
+
editParamsRowIndex: index
|
125
|
+
});
|
119
126
|
}
|
120
127
|
case PARAMETER_SELECTION_EDIT_CANCEL: {
|
121
128
|
const parameters = cloneDeep(state.parameters);
|
@@ -184,20 +191,35 @@ const parameterSelectionParameters = (state = initialState, action) => {
|
|
184
191
|
|
185
192
|
return state.merge(newState);
|
186
193
|
}
|
187
|
-
case
|
194
|
+
case PARAMETER_SELECTION_COMPLEX_DATA_MODAL_OPEN: {
|
195
|
+
return state;
|
196
|
+
}
|
197
|
+
case PARAMETER_SELECTION_COMPLEX_DATA_MODAL_CLOSE: {
|
198
|
+
let str;
|
199
|
+
let element = document.getElementById('yamlData');
|
200
|
+
if (element != null) {
|
201
|
+
str = element.value;
|
202
|
+
}
|
203
|
+
else {
|
204
|
+
str = '';
|
205
|
+
}
|
206
|
+
let newState = {};
|
207
|
+
let index = state.editParamsRowIndex;
|
188
208
|
const parameters = cloneDeep(state.parameters);
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
209
|
+
if (payload.mode == 'save') {
|
210
|
+
parameters[index]['value'] = str;
|
211
|
+
if (str == '') {
|
212
|
+
parameters[index]['isYaml'] = false;
|
213
|
+
} else {
|
214
|
+
parameters[index]['isYaml'] = true;
|
194
215
|
}
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
}
|
216
|
+
newState = {
|
217
|
+
parameters: parameters,
|
218
|
+
};
|
219
|
+
} else {
|
220
|
+
newState = {};
|
221
|
+
}
|
222
|
+
return state.merge(newState);
|
201
223
|
}
|
202
224
|
default:
|
203
225
|
return state;
|
@@ -3,9 +3,11 @@ const parameterState = state => state.foremanAcd.parameterSelectionParameters;
|
|
3
3
|
export const selectLoading = state => parameterState(state).loading;
|
4
4
|
export const selectEditMode = state => parameterState(state).editMode;
|
5
5
|
export const selectParamData = state => parameterState(state).paramData;
|
6
|
+
export const selectAllowedParameterTypes = state => parameterState(state).allowedParameterTypes;
|
6
7
|
export const selectParameterTypes = state => parameterState(state).parameterTypes;
|
7
8
|
export const selectParameters = state => parameterState(state).parameters;
|
8
9
|
export const selectSortingColumns = state => parameterState(state).sortingColumns;
|
9
10
|
export const selectColumns = state => parameterState(state).columns;
|
10
11
|
export const selectParamDefinition = state => parameterState(state).paramDefinition;
|
11
12
|
export const selectHostgroupId = state => parameterState(state).hostgroupId;
|
13
|
+
export const selectEditParamsRowIndex = state => parameterState(state).editParamsRowIndex;
|