2 * Copyright © 2018 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 import { connect } from 'react-redux';
18 import { getSavedObjParams } from 'features/version/versionController/versionControllerSelectors';
19 import VersionControllerView from 'features/version/versionController/VersionControllerView';
23 } from 'features/workflow/overview/overviewSelectors';
27 } from 'features/workflow/workflowSelectors';
31 } from 'features/version/versionController/versionControllerConstants';
32 import { workflowVersionFetchRequestedAction } from '../versionConstants';
33 import { getIsCertified } from 'features/version/general/generalSelectors';
34 import { getIOErrors } from 'features/version/inputOutput/inputOutputSelectors';
36 function mapStateToProps(state) {
38 workflowName: getWorkflowName(state),
39 workflowId: getWorkflowId(state),
40 versionsList: getSortedVersions(state),
41 savedParams: getSavedObjParams(state),
42 getIOErrors: getIOErrors(state),
43 isCertifyDisable: getIsCertified(state),
44 currentWorkflowVersion: state.currentVersion.general
48 function mapDispatchToProps(dispatch) {
50 getVersions: () => dispatch(getVersions),
51 saveParamsToServer: params => dispatch(saveParamsAction(params)),
52 certifyVersion: payload => dispatch(certifyVersionAction(payload)),
53 changeVersion: payload =>
54 dispatch(workflowVersionFetchRequestedAction(payload))
58 export default connect(mapStateToProps, mapDispatchToProps)(