aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups
diff options
context:
space:
mode:
authorAvi Ziv <AVIZI@amdocs.com>2017-07-26 17:37:57 +0300
committerAvi Ziv <avi.ziv@amdocs.com>2017-07-26 18:27:22 +0300
commit61070c9c6b665fdea79b3ccdfeafc3a6b50d262e (patch)
treedfe9c169cfac91d6c72ac9ff23375f2aafac6405 /openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups
parentb824a997e19f6ee9627cb1b1e124c756bd8183fc (diff)
[SDC] Full OnBoard health-check and NFoD support
Change-Id: I606f8a52c7e6d2bd5558f824957d890e552c5423 Signed-off-by: Avi Ziv <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditor.js2
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditorView.jsx36
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditorView.jsx14
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js2
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsEditorReducer.js8
5 files changed, 48 insertions, 14 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditor.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditor.js
index c6249c98ca..6edb1e1f0c 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditor.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditor.js
@@ -34,7 +34,7 @@ export const mapStateToProps = ({licenseModel: {featureGroup, entitlementPool, l
}
for (let i = 0; i < list.length; i++) {
- FGNames[list[i].name] = list[i].id;
+ FGNames[list[i].name.toLowerCase()] = list[i].id;
}
for (let field in genericFieldInfo) {
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 d69548442c..6a5ee4617c 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditorView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditorView.jsx
@@ -15,7 +15,7 @@
*/
import React from 'react';
import Tabs from 'nfvo-components/input/validation/Tabs.jsx';
-import Tab from 'react-bootstrap/lib/Tab.js';
+import Tab from 'sdc-ui/lib/react/Tab.js';
import GridSection from 'nfvo-components/grid/GridSection.jsx';
import GridItem from 'nfvo-components/grid/GridItem.jsx';
import {TabsForm as Form} from 'nfvo-components/input/validation/Form.jsx';
@@ -31,12 +31,13 @@ const FeatureGroupsPropType = React.PropTypes.shape({
name: React.PropTypes.string,
description: React.PropTypes.string,
partNumber: React.PropTypes.string,
+ manufacturerReferenceNumber: React.PropTypes.string,
entitlementPoolsIds: React.PropTypes.arrayOf(React.PropTypes.string),
licenseKeyGroupsIds: React.PropTypes.arrayOf(React.PropTypes.string)
});
const GeneralTab = ({data = {}, onDataChanged, genericFieldInfo, validateName}) => {
- let {name, description, partNumber} = data;
+ let {name, description, partNumber, manufacturerReferenceNumber} = data;
return (
<GridSection>
<GridItem colSpan={2}>
@@ -51,6 +52,8 @@ const GeneralTab = ({data = {}, onDataChanged, genericFieldInfo, validateName})
isRequired={true}
isValid={genericFieldInfo.name.isValid}
errorText={genericFieldInfo.name.errorText} />
+ </GridItem>
+ <GridItem colSpan={2}>
<Input
groupClassName='field-section'
className='description-field'
@@ -60,9 +63,10 @@ const GeneralTab = ({data = {}, onDataChanged, genericFieldInfo, validateName})
value={description}
name='feature-group-description'
type='textarea'
- isRequired={true}
isValid={genericFieldInfo.description.isValid}
errorText={genericFieldInfo.description.errorText} />
+ </GridItem>
+ <GridItem colSpan={2}>
<Input
groupClassName='field-section'
onChange={partNumber => onDataChanged({partNumber}, FG_EDITOR_FORM)}
@@ -74,6 +78,18 @@ const GeneralTab = ({data = {}, onDataChanged, genericFieldInfo, validateName})
isValid={genericFieldInfo.partNumber.isValid}
errorText={genericFieldInfo.partNumber.errorText} />
</GridItem>
+ <GridItem colSpan={2}>
+ <Input
+ groupClassName='field-section'
+ onChange={manufacturerReferenceNumber => onDataChanged({manufacturerReferenceNumber}, FG_EDITOR_FORM)}
+ label={i18n('Manufacturer Reference Number')}
+ data-test-id='create-fg-reference-number'
+ value={manufacturerReferenceNumber}
+ isRequired={true}
+ type='text'
+ isValid={genericFieldInfo.manufacturerReferenceNumber.isValid}
+ errorText={genericFieldInfo.manufacturerReferenceNumber.errorText} />
+ </GridItem>
</GridSection>
);
};
@@ -94,7 +110,7 @@ const EntitlementPoolsTab = ({entitlementPoolsList, data, onDataChanged, isReadO
);
} else {
return (
- <p>{i18n('There is no available entitlement pools')}</p>
+ <p>{i18n('There are no available entitlement pools')}</p>
);
}
};
@@ -115,7 +131,7 @@ const LKGTab = ({licenseKeyGroupsList, data, onDataChanged, isReadOnlyMode}) =>
);
} else {
return (
- <p>{i18n('There is no available licsense key groups')}</p>
+ <p>{i18n('There are no available license key groups')}</p>
);
}
};
@@ -166,22 +182,22 @@ class FeatureGroupEditorView extends React.Component {
labledButtons={true}
isReadOnlyMode={isReadOnlyMode}
name='feature-group-validation-form'
- className='feature-group-form'>
- <Tabs activeKey={onTabSelect ? selectedTab : undefined} onSelect={onTabSelect} invalidTabs={invalidTabs} id='vlmFGValTabs' >
- <Tab eventKey={FeatureGroupStateConstants.SELECTED_FEATURE_GROUP_TAB.GENERAL} title={i18n('General')} >
+ className='license-model-form feature-group-form'>
+ <Tabs activeTab={onTabSelect ? selectedTab : undefined} onTabClick={onTabSelect} invalidTabs={invalidTabs} id='vlmFGValTabs' >
+ <Tab tabId={FeatureGroupStateConstants.SELECTED_FEATURE_GROUP_TAB.GENERAL} title={i18n('General')} >
<fieldset disabled={isReadOnlyMode}>
<GeneralTab data={data} onDataChanged={onDataChanged} genericFieldInfo={genericFieldInfo} validateName={(value)=> this.validateName(value)}/>
</fieldset>
</Tab>
<Tab
- eventKey={FeatureGroupStateConstants.SELECTED_FEATURE_GROUP_TAB.ENTITLEMENT_POOLS}
+ tabId={FeatureGroupStateConstants.SELECTED_FEATURE_GROUP_TAB.ENTITLEMENT_POOLS}
title={i18n('Entitlement Pools')} >
<fieldset disabled={isReadOnlyMode}>
<EntitlementPoolsTab isReadOnlyMode={isReadOnlyMode} data={data} onDataChanged={onDataChanged} entitlementPoolsList={entitlementPoolsList} />
</fieldset>
</Tab>
<Tab
- eventKey={FeatureGroupStateConstants.SELECTED_FEATURE_GROUP_TAB.LICENSE_KEY_GROUPS}
+ tabId={FeatureGroupStateConstants.SELECTED_FEATURE_GROUP_TAB.LICENSE_KEY_GROUPS}
title={i18n('License Key Groups')} >
<fieldset disabled={isReadOnlyMode}>
<LKGTab isReadOnlyMode={isReadOnlyMode} data={data} onDataChanged={onDataChanged} licenseKeyGroupsList={licenseKeyGroupsList} />
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditorView.jsx
index f883bd7a14..9844290a25 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditorView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditorView.jsx
@@ -65,7 +65,7 @@ class FeatureGroupListEditorView extends React.Component {
{this.filterList().map(listItem => this.renderFeatureGroupListItem(listItem, isReadOnlyMode, version))}
</ListEditorView>
{featureGroupsModal.show && <Modal show={featureGroupsModal.show} bsSize='large' animation={true}
- className='onborading-modal feature-group-modal'>
+ className='onborading-modal license-model-modal feature-group-modal'>
<Modal.Header>
<Modal.Title>{`${featureGroupsModal.editMode ? i18n('Edit Feature Group') : i18n('Create New Feature Group')}`}</Modal.Title>
</Modal.Header>
@@ -84,7 +84,7 @@ class FeatureGroupListEditorView extends React.Component {
renderFeatureGroupListItem(listItem, isReadOnlyMode, version) {
- let {name, description, entitlementPoolsIds = [], licenseKeyGroupsIds = []} = listItem;
+ let {name, description, manufacturerReferenceNumber, entitlementPoolsIds = [], licenseKeyGroupsIds = []} = listItem;
return (
<ListEditorItemView
key={listItem.id}
@@ -111,9 +111,19 @@ class FeatureGroupListEditorView extends React.Component {
</div>
<div className='list-editor-item-view-field'>
+ <div className='feature-groups-count-field'>
+ <div className='title'>{i18n('Manufacturer Reference')}</div>
+ <div className='title'>{i18n('Number')}</div>
+ <div className='feature-groups-count-ep'>{manufacturerReferenceNumber}</div>
+ </div>
+ </div>
+
+ <div className='list-editor-item-view-field'>
<div className='title'>{i18n('Description')}</div>
<div className='text description'>{description}</div>
</div>
+
+
</ListEditorItemView>
);
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js
index a2015787a6..b8c03750fb 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js
@@ -39,6 +39,7 @@ function addFeatureGroup(licenseModelId, featureGroup, version) {
name: featureGroup.name,
description: featureGroup.description,
partNumber: featureGroup.partNumber,
+ manufacturerReferenceNumber: featureGroup.manufacturerReferenceNumber,
addedLicenseKeyGroupsIds: featureGroup.licenseKeyGroupsIds,
addedEntitlementPoolsIds: featureGroup.entitlementPoolsIds
});
@@ -54,6 +55,7 @@ function updateFeatureGroup(licenseModelId, previousFeatureGroup, featureGroup,
name: featureGroup.name,
description: featureGroup.description,
partNumber: featureGroup.partNumber,
+ manufacturerReferenceNumber: featureGroup.manufacturerReferenceNumber,
addedLicenseKeyGroupsIds: licenseKeyGroupsIds.filter(licenseKeyGroupId => prevLicenseKeyGroupsIds.indexOf(licenseKeyGroupId) === -1),
removedLicenseKeyGroupsIds: prevLicenseKeyGroupsIds.filter(prevLicenseKeyGroupId => licenseKeyGroupsIds.indexOf(prevLicenseKeyGroupId) === -1),
addedEntitlementPoolsIds: entitlementPoolsIds.filter(entitlementPoolId => prevEntitlementPoolsIds.indexOf(entitlementPoolId) === -1),
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsEditorReducer.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsEditorReducer.js
index 001bd20d44..5688fc0f16 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsEditorReducer.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsEditorReducer.js
@@ -30,7 +30,7 @@ export default (state = {}, action) => {
'description': {
isValid: true,
errorText: '',
- validations: [{type: 'required', data: true}, {type: 'maxLength', data: 1000}],
+ validations: [{type: 'maxLength', data: 1000}],
tabId: FeatureGroupStateConstants.SELECTED_FEATURE_GROUP_TAB.GENERAL
},
'partNumber': {
@@ -39,6 +39,12 @@ export default (state = {}, action) => {
validations: [{type: 'required', data: true}],
tabId: FeatureGroupStateConstants.SELECTED_FEATURE_GROUP_TAB.GENERAL
},
+ 'manufacturerReferenceNumber': {
+ isValid: true,
+ errorText: '',
+ validations: [{type: 'required', data: true}, {type: 'maxLength', data: 100}],
+ tabId: FeatureGroupStateConstants.SELECTED_FEATURE_GROUP_TAB.GENERAL
+ },
'name': {
isValid: true,
errorText: '',