From 67e400cc929314f1d66accb2f2f47d489f6b0c4f Mon Sep 17 00:00:00 2001 From: sheetalm Date: Tue, 12 Jun 2018 17:32:56 +0530 Subject: 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 --- .../SoftwareProductComponentsActionHelper.js | 14 +++---- .../SoftwareProductComponentsGeneralView.jsx | 47 +++++++++++++--------- 2 files changed, 34 insertions(+), 27 deletions(-) (limited to 'openecomp-ui') 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 }) => ( {/* disabled until backend will be ready to implement it @@ -53,23 +54,29 @@ const GeneralSection = ({ 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']} /> )} 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']} /> @@ -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} />