diff options
author | sheetalm <sheetal.mudholkar@amdocs.com> | 2018-06-12 17:32:56 +0530 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2018-06-13 08:16:41 +0000 |
commit | 67e400cc929314f1d66accb2f2f47d489f6b0c4f (patch) | |
tree | 1f92e95dd1165944ec57de9e7318850a587cb1c4 /openecomp-ui | |
parent | d932a21e9f99ef5e706975a73c4f17a145445fe1 (diff) |
Fix for nfcparameters in component questionnaire
issue - nfc naming code and nfc function fields' values are wiped out
with a VSP update
Moved the above fields from composition to questionnaire
Add BDD test. Add license to java files
Change-Id: I2b746fedc17c19b716df35bf0dad2c212f15df30
Issue-ID: SDC-1419
Signed-off-by: sheetalm <sheetal.mudholkar@amdocs.com>
Diffstat (limited to 'openecomp-ui')
2 files changed, 34 insertions, 27 deletions
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 73a971ccbb..1ec4baaa03 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentsActionHelper.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentsActionHelper.js @@ -1,17 +1,17 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * Copyright © 2016-2018 European Support Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing - * permissions and limitations under the License. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ import RestAPIUtil from 'nfvo-utils/RestAPIUtil.js'; import Configuration from 'sdc-app/config/Configuration.js'; @@ -79,8 +79,6 @@ function putSoftwareProductComponent( { name: vspComponent.name, displayName: vspComponent.displayName, - vfcCode: vspComponent.vfcCode, - nfcFunction: vspComponent.nfcFunction, description: vspComponent.description } ); diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/general/SoftwareProductComponentsGeneralView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/general/SoftwareProductComponentsGeneralView.jsx index ad1fcaacff..bc95cee359 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/general/SoftwareProductComponentsGeneralView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/general/SoftwareProductComponentsGeneralView.jsx @@ -1,17 +1,17 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * Copyright © 2016-2018 European Support Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing - * permissions and limitations under the License. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ import React from 'react'; import i18n from 'nfvo-utils/i18n/i18n.js'; @@ -24,12 +24,13 @@ import GridItem from 'nfvo-components/grid/GridItem.jsx'; const GeneralSection = ({ onDataChanged, displayName, - vfcCode, - nfcFunction, description, isReadOnlyMode, genericFieldInfo, - isManual + isManual, + dataMap, + onQDataChanged, + qgenericFieldInfo }) => ( <GridSection title={i18n('General')}> {/* disabled until backend will be ready to implement it @@ -53,23 +54,29 @@ const GeneralSection = ({ <Input data-test-id="vfcCode" label={i18n('Naming Code')} - value={vfcCode} - isValid={genericFieldInfo.vfcCode.isValid} - errorText={genericFieldInfo.vfcCode.errorText} - onChange={vfcCode => onDataChanged({ vfcCode })} disabled={isReadOnlyMode} type="text" + onChange={nfcFunction => + onQDataChanged({ 'general/nfcNamingCode': nfcFunction }) + } + isValid={qgenericFieldInfo['general/nfcNamingCode'].isValid} + errorText={ + qgenericFieldInfo['general/nfcNamingCode'].errorText + } + value={dataMap['general/nfcNamingCode']} /> )} <Input data-test-id="nfcFunction" label={i18n('Function')} - value={nfcFunction} - isValid={genericFieldInfo.nfcFunction.isValid} - errorText={genericFieldInfo.nfcFunction.errorText} - onChange={nfcFunction => onDataChanged({ nfcFunction })} disabled={isReadOnlyMode} type="text" + onChange={nfcFunction => + onQDataChanged({ 'general/nfcFunction': nfcFunction }) + } + isValid={qgenericFieldInfo['general/nfcFunction'].isValid} + errorText={qgenericFieldInfo['general/nfcFunction'].errorText} + value={dataMap['general/nfcFunction']} /> </GridItem> <GridItem colSpan={2}> @@ -350,7 +357,7 @@ class SoftwareProductComponentsGeneralView extends React.Component { genericFieldInfo, dataMap, qGenericFieldInfo, - componentData: { displayName, vfcCode, nfcFunction, description }, + componentData: { displayName, vfcCode, description }, isReadOnlyMode } = this.props; return ( @@ -370,11 +377,13 @@ class SoftwareProductComponentsGeneralView extends React.Component { onDataChanged={onDataChanged} displayName={displayName} vfcCode={vfcCode} - nfcFunction={nfcFunction} description={description} isManual={isManual} isReadOnlyMode={isReadOnlyMode} genericFieldInfo={genericFieldInfo} + dataMap={dataMap} + onQDataChanged={onQDataChanged} + qgenericFieldInfo={qGenericFieldInfo} /> <HypervisorSection onQDataChanged={onQDataChanged} |