From b3d4898d9e8452ea0b8d848c048e712d43b8d9a3 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 11 Jun 2017 14:22:02 +0300 Subject: [SDC-29] rebase continue work to align source Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4 Signed-off-by: Michael Lando --- .../sdc-app/onboarding/OnboardingActionHelper.js | 8 +++++--- .../featureGroups/FeatureGroupEditorView.jsx | 14 +++++++++---- .../LicenseAgreementEditorView.jsx | 24 +++++++++++++--------- .../attachments/SoftwareProductAttachments.js | 4 ++-- .../attachments/SoftwareProductAttachmentsView.jsx | 2 +- .../SoftwareProductComponentEditorReducer.js | 1 + .../SoftwareProductComponentsActionHelper.js | 10 ++++----- .../dependencies/SoftwareProductDependencies.js | 2 +- 8 files changed, 39 insertions(+), 26 deletions(-) (limited to 'openecomp-ui/src/sdc-app/onboarding') diff --git a/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js index 4945d33b23..74bde4058b 100644 --- a/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js +++ b/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js @@ -155,10 +155,12 @@ export default { licenseModelId = response[0].vendorId; } + const newVersion = response[0].version ? response[0].version : version; + SoftwareProductActionHelper.loadSoftwareProductDetailsData(dispatch, {licenseModelId, licensingVersion}); - SoftwareProductComponentsActionHelper.fetchSoftwareProductComponents(dispatch, {softwareProductId, version}); - SoftwareProductActionHelper.loadSoftwareProductHeatCandidate(dispatch, {softwareProductId, version}); - setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_LANDING_PAGE, {softwareProductId, licenseModelId, version}); + SoftwareProductComponentsActionHelper.fetchSoftwareProductComponents(dispatch, {softwareProductId, version: newVersion}); + SoftwareProductActionHelper.loadSoftwareProductHeatCandidate(dispatch, {softwareProductId, version: newVersion}); + setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_LANDING_PAGE, {softwareProductId, licenseModelId, version: newVersion}); }); }, diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditorView.jsx index 5ae22cba95..d69548442c 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditorView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditorView.jsx @@ -18,7 +18,7 @@ import Tabs from 'nfvo-components/input/validation/Tabs.jsx'; import Tab from 'react-bootstrap/lib/Tab.js'; import GridSection from 'nfvo-components/grid/GridSection.jsx'; import GridItem from 'nfvo-components/grid/GridItem.jsx'; -import Form from 'nfvo-components/input/validation/Form.jsx'; +import {TabsForm as Form} from 'nfvo-components/input/validation/Form.jsx'; import DualListboxView from 'nfvo-components/input/dualListbox/DualListboxView.jsx'; import Input from 'nfvo-components/input/validation/Input.jsx'; import i18n from 'nfvo-utils/i18n/i18n.js'; @@ -169,17 +169,23 @@ class FeatureGroupEditorView extends React.Component { className='feature-group-form'> - this.validateName(value)}/> +
+ this.validateName(value)}/> +
- +
+ +
- +
+ +
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorView.jsx index 67a3333a3a..42a33fd509 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorView.jsx @@ -17,7 +17,7 @@ import React from 'react'; import GridSection from 'nfvo-components/grid/GridSection.jsx'; import GridItem from 'nfvo-components/grid/GridItem.jsx'; -import Form from 'nfvo-components/input/validation/Form.jsx'; +import {TabsForm as Form} from 'nfvo-components/input/validation/Form.jsx'; import Tabs from 'nfvo-components/input/validation/Tabs.jsx'; import Tab from 'react-bootstrap/lib/Tab.js'; import Input from 'nfvo-components/input/validation/Input.jsx'; @@ -151,21 +151,25 @@ class LicenseAgreementEditorView extends React.Component { eventKey={LicenseAgreementEnums.SELECTED_LICENSE_AGREEMENT_TAB.GENERAL} data-test-id='general-tab' title={i18n('General')}> - this.validateLTChoice(value)} - validateName={(value)=>this.validateName(value)}/> +
+ this.validateLTChoice(value)} + validateName={(value)=>this.validateName(value)}/> +
+
{featureGroupsList.length > 0 ? - onDataChanged( { featureGroupsIds: selectedValuesList }, LA_EDITOR_FORM )}/> : -

{i18n('There is no available feature groups')}

} + onDataChanged( { featureGroupsIds: selectedValuesList }, LA_EDITOR_FORM )}/> : +

{i18n('There is no available feature groups')}

} +
} diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachments.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachments.js index 8f2506abdd..945de4fc36 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachments.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachments.js @@ -77,8 +77,8 @@ export const mapActionsToProps = (dispatch, {softwareProductId}) => { } }), onSave: (heatCandidate, version) => SoftwareProductActionHelper.updateSoftwareProductHeatCandidate(dispatch, {softwareProductId, heatCandidate, version}), - onGoToOverview: () => { - OnboardingActionHelper.navigateToSoftwareProductLandingPage(dispatch, {softwareProductId}); + onGoToOverview: ({version}) => { + OnboardingActionHelper.navigateToSoftwareProductLandingPage(dispatch, {softwareProductId, version}); }, onProcessAndValidate: ({heatData, heatDataCache, isReadOnlyMode, version}) => { return HeatSetupActionHelper.processAndValidateHeat(dispatch, diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx index 66fb2f8356..ef4aecf568 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx @@ -50,7 +50,7 @@ class HeatScreenView extends Component { iconClassName={this.props.goToOverview ? '' : 'disabled'} className={`go-to-overview-icon ${this.props.goToOverview ? '' : 'disabled'}`} labelClassName='go-to-overview-label' - onClick={this.props.goToOverview ? onGoToOverview : undefined} + onClick={this.props.goToOverview ? () => onGoToOverview({version}) : undefined} image='go-to-overview' label={i18n('Go to Overview')} data-test-id='go-to-overview'/>} diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentEditorReducer.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentEditorReducer.js index 2ae9ad0bae..41e7556749 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentEditorReducer.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentEditorReducer.js @@ -20,6 +20,7 @@ export default (state = {}, action) => { case actionTypes.COMPONENT_LOAD: return { ...state, + data: action.component, formReady: null, formName: forms.ALL_SPC_FORMS, genericFieldInfo: { diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentsActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentsActionHelper.js index 9b3c9eaa73..4e526d3b56 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentsActionHelper.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentsActionHelper.js @@ -16,7 +16,7 @@ import RestAPIUtil from 'nfvo-utils/RestAPIUtil.js'; import Configuration from 'sdc-app/config/Configuration.js'; -import {actionTypes, COMPONENTS_QUESTIONNAIRE, forms} from './SoftwareProductComponentsConstants.js'; +import {actionTypes, COMPONENTS_QUESTIONNAIRE} from './SoftwareProductComponentsConstants.js'; import ValidationHelper from 'sdc-app/common/helpers/ValidationHelper.js'; function baseUrl(softwareProductId, version) { @@ -89,12 +89,12 @@ const SoftwareProductComponentsActionHelper = { }, fetchSoftwareProductComponent(dispatch, {softwareProductId, version, vspComponentId}) { - dispatch({ - type: actionTypes.COMPONENT_LOAD - }); return Promise.all([ fetchSoftwareProductComponent(softwareProductId, version, vspComponentId).then(response => { - ValidationHelper.dataChanged(dispatch,{deltaData: response.data, formName: forms.ALL_SPC_FORMS}); + dispatch({ + type: actionTypes.COMPONENT_LOAD, + component: response.data + }); return response; }), fetchSoftwareProductComponentQuestionnaire(softwareProductId, version, vspComponentId).then(response => { diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/dependencies/SoftwareProductDependencies.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/dependencies/SoftwareProductDependencies.js index 9540d3f869..05a1fc7797 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/dependencies/SoftwareProductDependencies.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/dependencies/SoftwareProductDependencies.js @@ -25,7 +25,7 @@ export const mapStateToProps = ({softwareProduct}) => { return { isReadOnlyMode, softwareProductDependencies: softwareProductDependencies.length ? softwareProductDependencies : [{sourceId: '', targetId: '', relationType: 'dependsOn', id: 'fake'}], - componentsOptions: componentsList.map(component => ({value: component.id, label: component.name})) + componentsOptions: componentsList.map(component => ({value: component.id, label: component.displayName})) }; }; -- cgit 1.2.3-korg