aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui
diff options
context:
space:
mode:
authorArielk <Ariel.Kenan@amdocs.com>2018-05-30 14:52:00 +0300
committerArielk <Ariel.Kenan@amdocs.com>2018-05-30 14:52:21 +0300
commitbce898678176acd991d88bd5b6e1f5ebd2083184 (patch)
tree5d69968c33a630425c5d860df69fa6224584de01 /openecomp-ui
parent3b2267ad7c5cbbebfe1137ce27afd05bf82bb6ff (diff)
removed fields from LA EP and LKG
Change-Id: I20b9d81721125ac19c2910a36e11290c3fda27bd Issue-ID: SDC-1381 Signed-off-by: Arielk <Ariel.Kenan@amdocs.com>
Diffstat (limited to 'openecomp-ui')
-rw-r--r--openecomp-ui/src/nfvo-utils/i18n/en.json5
-rw-r--r--openecomp-ui/src/sdc-app/common/merge/MergeEditorActionHelper.js2
-rw-r--r--openecomp-ui/src/sdc-app/common/merge/MergeEditorConstants.js8
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js2
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsConstants.js11
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorReducer.js5
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx76
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js3
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorReducer.js8
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorView.jsx20
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js2
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsConstants.js34
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorReducer.js5
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx145
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsListEditorView.jsx45
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/listItems/LicenseKeyGroup.jsx18
-rw-r--r--openecomp-ui/test-utils/factories/licenseModel/EntitlementPoolFactories.js5
-rw-r--r--openecomp-ui/test-utils/factories/licenseModel/LicenseAgreementFactories.js5
-rw-r--r--openecomp-ui/test-utils/factories/licenseModel/LicenseKeyGroupFactories.js5
19 files changed, 76 insertions, 328 deletions
diff --git a/openecomp-ui/src/nfvo-utils/i18n/en.json b/openecomp-ui/src/nfvo-utils/i18n/en.json
index d02904d90a..131c3572fe 100644
--- a/openecomp-ui/src/nfvo-utils/i18n/en.json
+++ b/openecomp-ui/src/nfvo-utils/i18n/en.json
@@ -87,7 +87,6 @@
"License model name must be unique": "License model name must be unique",
"please select…": "please select…",
"Warning": "Warning",
- "Operational Scope": "Operational Scope",
"Threshold Units": "Threshold Units",
"Threshold Value": "Threshold Value",
"Entitlement Metric": "Entitlement Metric",
@@ -120,7 +119,6 @@
"This feature group is associated with one ore more license agreements": "This feature group is associated with one ore more license agreements",
"Available Feature Groups": "Available Feature Groups",
"Selected Feature Groups": "Selected Feature Groups",
- "Requirements and Constraints": "Requirements and Constraints",
"License Term": "License Term",
"There is no available feature groups": "There is no available feature groups",
"License Agreement by the name \\": "License Agreement by the name \\",
@@ -386,7 +384,6 @@
"EntitlementPool/name" : "Name",
"EntitlementPool/description" : "Description",
"EntitlementPool/referencingFeatureGroups" : "Referencing Feature Groups",
- "EntitlementPool/operationalScope" : "Operational Scope",
"EntitlementPool/thresholdValue" : "Threshold Value",
"EntitlementPool/thresholdUnits" : "Threshold Units",
"EntitlementPool/increments" : "Increments",
@@ -495,14 +492,12 @@
"LicenseAgreement/featureGroupsIds" : "Related Feature Groups",
"LicenseAgreement/licenseTerm" : "Term",
"LicenseAgreement/name" : "Name",
- "LicenseAgreement/requirementsAndConstrains" : "Requirements and Constraints",
"LicenseKeyGroup" : "License Key Group",
"LicenseKeyGroup/description" : "Description",
"LicenseKeyGroup/expiryDate" : "Expiry Date",
"LicenseKeyGroup/increments" : "Increments",
"LicenseKeyGroup/name" : "Name",
- "LicenseKeyGroup/operationalScope" : "Operational Scope",
"LicenseKeyGroup/referencingFeatureGroups" : "Referencing Feature Group(s)",
"LicenseKeyGroup/startDate" : "Start Date",
"LicenseKeyGroup/thresholdUnits" : "Threshold Units",
diff --git a/openecomp-ui/src/sdc-app/common/merge/MergeEditorActionHelper.js b/openecomp-ui/src/sdc-app/common/merge/MergeEditorActionHelper.js
index c54b9feb93..50d2a5ba93 100644
--- a/openecomp-ui/src/sdc-app/common/merge/MergeEditorActionHelper.js
+++ b/openecomp-ui/src/sdc-app/common/merge/MergeEditorActionHelper.js
@@ -26,7 +26,6 @@ import ItemsHelper from '../../common/helpers/ItemsHelper.js';
import { modalContentMapper } from 'sdc-app/common/modal/ModalContentMapper.js';
import { actionTypes as modalActionTypes } from 'nfvo-components/modal/GlobalModalConstants.js';
import i18n from 'nfvo-utils/i18n/i18n.js';
-import { optionsInputValues as epOptionsValues } from 'sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsConstants.js';
import { optionsInputValues as laOptionsValues } from 'sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementConstants.js';
import { optionsInputValues as processOptionValues } from 'sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesConstants.js';
import { selectValues as limitSelectValues } from 'sdc-app/onboarding/licenseModel/limits/LimitEditorConstants.js';
@@ -442,7 +441,6 @@ const MergeEditorActionHelper = {
getEnumList({ fieldName }) {
const enumLists = {
licenseTerm: laOptionsValues.LICENSE_MODEL_TYPE,
- operationalScope: epOptionsValues.OPERATIONAL_SCOPE,
processType: processOptionValues.PROCESS_TYPE,
limitType: [
{ title: 'Service Provider', enum: 'ServiceProvider' },
diff --git a/openecomp-ui/src/sdc-app/common/merge/MergeEditorConstants.js b/openecomp-ui/src/sdc-app/common/merge/MergeEditorConstants.js
index b82d08683f..bb25a1af06 100644
--- a/openecomp-ui/src/sdc-app/common/merge/MergeEditorConstants.js
+++ b/openecomp-ui/src/sdc-app/common/merge/MergeEditorConstants.js
@@ -119,10 +119,6 @@ export const dataRules = {
referencingFeatureGroups: {
rule: rules.SKIP,
functionName: 'getFeatureGroups'
- },
- operationalScope: {
- rule: rules.FUNCTION,
- functionName: 'processChoices'
}
},
[fileTypes.FG]: {
@@ -150,10 +146,6 @@ export const dataRules = {
}
},
[fileTypes.LKG]: {
- operationalScope: {
- rule: rules.FUNCTION,
- functionName: 'processChoices'
- },
referencingFeatureGroups: {
rule: rules.SKIP,
functionName: 'getFeatureGroups'
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js
index 181fc11c9d..51f353f7d9 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js
@@ -37,7 +37,6 @@ function postEntitlementPool(licenseModelId, entitlementPool, version) {
thresholdValue: entitlementPool.thresholdValue,
thresholdUnits: getValue(entitlementPool.thresholdUnits),
increments: entitlementPool.increments,
- operationalScope: getValue(entitlementPool.operationalScope),
time: entitlementPool.time,
startDate: entitlementPool.startDate,
expiryDate: entitlementPool.expiryDate
@@ -58,7 +57,6 @@ function putEntitlementPool(
thresholdValue: entitlementPool.thresholdValue,
thresholdUnits: getValue(entitlementPool.thresholdUnits),
increments: entitlementPool.increments,
- operationalScope: getValue(entitlementPool.operationalScope),
time: entitlementPool.time,
startDate: entitlementPool.startDate,
expiryDate: entitlementPool.expiryDate
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsConstants.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsConstants.js
index e69ff688ab..dbb6b447a9 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsConstants.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsConstants.js
@@ -49,7 +49,6 @@ export const defaultState = {
ENTITLEMENT_POOLS_EDITOR_DATA: {
entitlementMetric: { choice: '', other: '' },
aggregationFunction: { choice: '', other: '' },
- operationalScope: { choices: [], other: '' },
time: { choice: '', other: '' }
}
};
@@ -60,16 +59,6 @@ export const thresholdUnitType = {
};
export const optionsInputValues = {
- OPERATIONAL_SCOPE: [
- { enum: '', title: i18n('please select…') },
- { enum: 'Network_Wide', title: 'Network Wide' },
- { enum: 'Availability_Zone', title: 'Availability Zone' },
- { enum: 'Data_Center', title: 'Data Center' },
- { enum: 'Tenant', title: 'Tenant' },
- { enum: 'VM', title: 'VM' },
- { enum: 'CPU', title: 'CPU' },
- { enum: 'Core', title: 'Core' }
- ],
TIME: [
{ enum: '', title: i18n('please select…') },
{ enum: 'Hour', title: 'Hour' },
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorReducer.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorReducer.js
index 4556b87129..f773fa1c37 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorReducer.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorReducer.js
@@ -61,11 +61,6 @@ export default (state = {}, action) => {
errorText: '',
validations: [{ type: 'maxLength', data: 120 }]
},
- operationalScope: {
- isValid: true,
- errorText: '',
- validations: []
- },
thresholdUnits: {
isValid: true,
errorText: '',
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx
index 350dc0b9f8..c74354c5a4 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx
@@ -20,13 +20,11 @@ import i18n from 'nfvo-utils/i18n/i18n.js';
import Validator from 'nfvo-utils/Validator.js';
import Input from 'nfvo-components/input/validation/Input.jsx';
-import InputOptions from 'nfvo-components/input/validation/InputOptions.jsx';
import Form from 'nfvo-components/input/validation/Form.jsx';
import Button from 'sdc-ui/lib/react/Button.js';
import GridSection from 'nfvo-components/grid/GridSection.jsx';
import GridItem from 'nfvo-components/grid/GridItem.jsx';
import {
- optionsInputValues as EntitlementPoolsOptionsInputValues,
SP_ENTITLEMENT_POOL_FORM,
tabIds
} from './EntitlementPoolsConstants.js';
@@ -36,7 +34,6 @@ import {
thresholdValueValidation
} from '../LicenseModelValidations.js';
import { DATE_FORMAT } from 'sdc-app/onboarding/OnboardingConstants.js';
-import { other as optionInputOther } from 'nfvo-components/input/validation/InputOptions.jsx';
import Tabs from 'sdc-ui/lib/react/Tabs.js';
import Tab from 'sdc-ui/lib/react/Tab.js';
import EntitlementPoolsLimits from './EntitlementPoolsLimits.js';
@@ -49,10 +46,6 @@ const EntitlementPoolPropType = PropTypes.shape({
id: PropTypes.string,
name: PropTypes.string,
description: PropTypes.string,
- operationalScope: PropTypes.shape({
- choices: PropTypes.array,
- other: PropTypes.string
- }),
thresholdUnits: PropTypes.string,
thresholdValue: PropTypes.string,
increments: PropTypes.string,
@@ -71,7 +64,6 @@ const EntitlementPoolsFormContent = ({
let {
name,
description,
- operationalScope,
thresholdUnits,
thresholdValue,
increments,
@@ -97,59 +89,6 @@ const EntitlementPoolsFormContent = ({
/>
</GridItem>
<GridItem colSpan={2} lastColInRow>
- <InputOptions
- onInputChange={() => {}}
- isMultiSelect={true}
- onEnumChange={operationalScope =>
- onDataChanged(
- {
- operationalScope: {
- choices: operationalScope,
- other: ''
- }
- },
- SP_ENTITLEMENT_POOL_FORM
- )
- }
- onOtherChange={operationalScope =>
- onDataChanged(
- {
- operationalScope: {
- choices: [optionInputOther.OTHER],
- other: operationalScope
- }
- },
- SP_ENTITLEMENT_POOL_FORM
- )
- }
- label={i18n('Operational Scope')}
- data-test-id="create-ep-operational-scope"
- type="select"
- multiSelectedEnum={
- operationalScope && operationalScope.choices
- }
- otherValue={operationalScope && operationalScope.other}
- values={
- EntitlementPoolsOptionsInputValues.OPERATIONAL_SCOPE
- }
- isValid={genericFieldInfo.operationalScope.isValid}
- errorText={genericFieldInfo.operationalScope.errorText}
- />
- </GridItem>
- <GridItem colSpan={2} stretch>
- <Input
- onChange={description =>
- onDataChanged({ description }, SP_ENTITLEMENT_POOL_FORM)
- }
- isValid={genericFieldInfo.description.isValid}
- errorText={genericFieldInfo.description.errorText}
- label={i18n('Description')}
- value={description}
- data-test-id="create-ep-description"
- type="textarea"
- />
- </GridItem>
- <GridItem colSpan={2} lastColInRow>
<div className="threshold-section">
<Input
onChange={e => {
@@ -205,6 +144,21 @@ const EntitlementPoolsFormContent = ({
type="text"
/>
</div>
+ </GridItem>
+ <GridItem colSpan={2} stretch>
+ <Input
+ onChange={description =>
+ onDataChanged({ description }, SP_ENTITLEMENT_POOL_FORM)
+ }
+ isValid={genericFieldInfo.description.isValid}
+ errorText={genericFieldInfo.description.errorText}
+ label={i18n('Description')}
+ value={description}
+ data-test-id="create-ep-description"
+ type="textarea"
+ />
+ </GridItem>
+ <GridItem colSpan={2} lastColInRow>
<Input
onChange={increments =>
onDataChanged({ increments }, SP_ENTITLEMENT_POOL_FORM)
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
index 5d425a8aa4..feceba5726 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
@@ -40,7 +40,6 @@ function postLicenseAgreement(licenseModelId, licenseAgreement, version) {
name: licenseAgreement.name,
description: licenseAgreement.description,
licenseTerm: licenseAgreement.licenseTerm,
- requirementsAndConstrains: licenseAgreement.requirementsAndConstrains,
addedFeatureGroupsIds: licenseAgreement.featureGroupsIds
});
}
@@ -61,8 +60,6 @@ function putLicenseAgreement(
name: licenseAgreement.name,
description: licenseAgreement.description,
licenseTerm: licenseAgreement.licenseTerm,
- requirementsAndConstrains:
- licenseAgreement.requirementsAndConstrains,
addedFeatureGroupsIds: featureGroupsIds.filter(
featureGroupId =>
prevFeatureGroupsIds.indexOf(featureGroupId) === -1
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorReducer.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorReducer.js
index 0d3fb2a3b6..03157cb108 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorReducer.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorReducer.js
@@ -37,14 +37,6 @@ export default (state = {}, action) => {
LicenseAgreementEnums.SELECTED_LICENSE_AGREEMENT_TAB
.GENERAL
},
- requirementsAndConstrains: {
- isValid: true,
- errorText: '',
- validations: [{ type: 'maxLength', data: 1000 }],
- tabId:
- LicenseAgreementEnums.SELECTED_LICENSE_AGREEMENT_TAB
- .GENERAL
- },
licenseTerm: {
isValid: true,
errorText: '',
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 cc16dd996d..b2ebc1e436 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorView.jsx
@@ -42,7 +42,6 @@ const LicenseAgreementPropType = PropTypes.shape({
id: PropTypes.string,
name: PropTypes.string,
description: PropTypes.string,
- requirementsAndConstrains: PropTypes.string,
licenseTerm: PropTypes.object,
featureGroupsIds: PropTypes.arrayOf(PropTypes.string),
version: PropTypes.object
@@ -54,7 +53,7 @@ const GeneralTabContent = ({
onDataChanged,
validateName
}) => {
- let { name, description, requirementsAndConstrains, licenseTerm } = data;
+ let { name, description, licenseTerm } = data;
return (
<GridSection hasLastColSet>
<GridItem colSpan={2}>
@@ -73,23 +72,6 @@ const GeneralTabContent = ({
isRequired={true}
type="text"
/>
- <Input
- isValid={genericFieldInfo.requirementsAndConstrains.isValid}
- errorText={
- genericFieldInfo.requirementsAndConstrains.errorText
- }
- onChange={requirementsAndConstrains =>
- onDataChanged(
- { requirementsAndConstrains },
- LA_EDITOR_FORM
- )
- }
- label={i18n('Requirements and Constraints')}
- value={requirementsAndConstrains}
- data-test-id="create-la-requirements-constants"
- name="license-agreement-requirements-and-constraints"
- type="textarea"
- />
<InputOptions
onInputChange={() => {}}
isMultiSelect={false}
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js
index ebbe84abd3..39af2054c2 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js
@@ -40,7 +40,6 @@ function postLicenseKeyGroup(licenseModelId, licenseKeyGroup, version) {
return RestAPIUtil.post(baseUrl(licenseModelId, version), {
name: licenseKeyGroup.name,
description: licenseKeyGroup.description,
- operationalScope: getValue(licenseKeyGroup.operationalScope),
type: licenseKeyGroup.type,
increments: licenseKeyGroup.increments,
thresholdValue: licenseKeyGroup.thresholdValue,
@@ -56,7 +55,6 @@ function putLicenseKeyGroup(licenseModelId, licenseKeyGroup, version) {
{
name: licenseKeyGroup.name,
description: licenseKeyGroup.description,
- operationalScope: getValue(licenseKeyGroup.operationalScope),
type: licenseKeyGroup.type,
increments: licenseKeyGroup.increments,
thresholdValue: licenseKeyGroup.thresholdValue,
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsConstants.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsConstants.js
index aad0a0b1fb..d20188667d 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsConstants.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsConstants.js
@@ -35,24 +35,13 @@ export const actionTypes = keyMirror({
export const defaultState = {
licenseKeyGroupsEditor: {
- type: '',
- operationalScope: { choices: [], other: '' }
+ type: ''
}
};
export const LKG_FORM_NAME = 'LKGFORM';
export const optionsInputValues = {
- OPERATIONAL_SCOPE: [
- { enum: '', title: i18n('please select…') },
- { enum: 'Network_Wide', title: 'Network Wide' },
- { enum: 'Availability_Zone', title: 'Availability Zone' },
- { enum: 'Data_Center', title: 'Data Center' },
- { enum: 'Tenant', title: 'Tenant' },
- { enum: 'VM', title: 'VM' },
- { enum: 'CPU', title: 'CPU' },
- { enum: 'Core', title: 'Core' }
- ],
TYPE: [
{ enum: '', title: i18n('please select…') },
{ enum: 'Universal', title: 'Universal' },
@@ -73,27 +62,6 @@ export const extractValue = item => {
: '';
};
-export const getOperationalScopes = operationalScope => {
- if (
- operationalScope.choices.toString() === i18n(optionInputOther.OTHER) &&
- operationalScope.other !== ''
- ) {
- return operationalScope.other;
- } else {
- let allOpScopes = '';
- for (let opScope of operationalScope.choices) {
- allOpScopes +=
- allOpScopes === ''
- ? InputOptions.getTitleByName(optionsInputValues, opScope)
- : `, ${InputOptions.getTitleByName(
- optionsInputValues,
- opScope
- )}`;
- }
- return allOpScopes;
- }
-};
-
export const tabIds = {
GENERAL: 'GENERAL',
SP_LIMITS: 'SP_LIMITS',
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorReducer.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorReducer.js
index e948e9cef8..948398a56c 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorReducer.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorReducer.js
@@ -64,11 +64,6 @@ export default (state = {}, action) => {
errorText: '',
validations: [{ type: 'required', data: true }]
},
- operationalScope: {
- isValid: true,
- errorText: '',
- validations: []
- },
thresholdUnits: {
isValid: true,
errorText: '',
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx
index b53ce8f0a9..0d5c6bc25d 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx
@@ -36,8 +36,6 @@ import {
validateStartDate,
thresholdValueValidation
} from '../LicenseModelValidations.js';
-import { other as optionInputOther } from 'nfvo-components/input/validation/InputOptions.jsx';
-import InputOptions from 'nfvo-components/input/validation/InputOptions.jsx';
import { DATE_FORMAT } from 'sdc-app/onboarding/OnboardingConstants.js';
@@ -52,10 +50,6 @@ const LicenseKeyGroupPropType = PropTypes.shape({
name: PropTypes.string,
description: PropTypes.string,
increments: PropTypes.string,
- operationalScope: PropTypes.shape({
- choices: PropTypes.array,
- other: PropTypes.string
- }),
type: PropTypes.string,
thresholdUnits: PropTypes.string,
thresholdValue: PropTypes.number,
@@ -75,7 +69,6 @@ const LicenseKeyGroupFormContent = ({
name,
description,
increments,
- operationalScope,
type,
thresholdUnits,
thresholdValue,
@@ -100,82 +93,6 @@ const LicenseKeyGroupFormContent = ({
type="text"
/>
</GridItem>
- <GridItem colSpan={2} lastColInRow>
- <InputOptions
- onInputChange={() => {}}
- isMultiSelect={true}
- onEnumChange={operationalScope =>
- onDataChanged(
- {
- operationalScope: {
- choices: operationalScope,
- other: ''
- }
- },
- LKG_FORM_NAME
- )
- }
- onOtherChange={operationalScope =>
- onDataChanged(
- {
- operationalScope: {
- choices: [optionInputOther.OTHER],
- other: operationalScope
- }
- },
- LKG_FORM_NAME
- )
- }
- label={i18n('Operational Scope')}
- data-test-id="create-lkg-operational-scope"
- type="select"
- multiSelectedEnum={
- operationalScope && operationalScope.choices
- }
- otherValue={operationalScope && operationalScope.other}
- values={licenseKeyGroupOptionsInputValues.OPERATIONAL_SCOPE}
- isValid={genericFieldInfo.operationalScope.isValid}
- errorText={genericFieldInfo.operationalScope.errorText}
- />
- </GridItem>
- <GridItem colSpan={2}>
- <Input
- onChange={description =>
- onDataChanged({ description }, LKG_FORM_NAME)
- }
- label={i18n('Description')}
- data-test-id="create-lkg-description"
- value={description}
- isValid={genericFieldInfo.description.isValid}
- errorText={genericFieldInfo.description.errorText}
- type="textarea"
- overlayPos="bottom"
- />
- </GridItem>
- <GridItem colSpan={2} lastColInRow>
- <Input
- isRequired={true}
- onChange={e => {
- const selectedIndex = e.target.selectedIndex;
- const val = e.target.options[selectedIndex].value;
- onDataChanged({ type: val }, LKG_FORM_NAME);
- }}
- value={type}
- label={i18n('Type')}
- data-test-id="create-lkg-type"
- isValid={genericFieldInfo.type.isValid}
- errorText={genericFieldInfo.type.errorText}
- groupClassName="bootstrap-input-options"
- className="input-options-select"
- overlayPos="bottom"
- type="select">
- {licenseKeyGroupOptionsInputValues.TYPE.map(type => (
- <option key={type.enum} value={type.enum}>
- {type.title}
- </option>
- ))}
- </Input>
- </GridItem>
<GridItem>
<Input
onChange={e => {
@@ -209,7 +126,7 @@ const LicenseKeyGroupFormContent = ({
)}
</Input>
</GridItem>
- <GridItem>
+ <GridItem lastColInRow>
<Input
className="entitlement-pools-form-row-threshold-value"
onChange={thresholdValue =>
@@ -225,6 +142,55 @@ const LicenseKeyGroupFormContent = ({
type="text"
/>
</GridItem>
+ <GridItem colSpan={2}>
+ <Input
+ onChange={description =>
+ onDataChanged({ description }, LKG_FORM_NAME)
+ }
+ label={i18n('Description')}
+ data-test-id="create-lkg-description"
+ value={description}
+ isValid={genericFieldInfo.description.isValid}
+ errorText={genericFieldInfo.description.errorText}
+ type="textarea"
+ overlayPos="bottom"
+ />
+ </GridItem>
+ <GridItem colSpan={2} lastColInRow>
+ <Input
+ onChange={increments =>
+ onDataChanged({ increments }, LKG_FORM_NAME)
+ }
+ label={i18n('Increments')}
+ value={increments}
+ data-test-id="create-ep-increments"
+ type="text"
+ />
+ </GridItem>
+ <GridItem colSpan={2}>
+ <Input
+ isRequired={true}
+ onChange={e => {
+ const selectedIndex = e.target.selectedIndex;
+ const val = e.target.options[selectedIndex].value;
+ onDataChanged({ type: val }, LKG_FORM_NAME);
+ }}
+ value={type}
+ label={i18n('Type')}
+ data-test-id="create-lkg-type"
+ isValid={genericFieldInfo.type.isValid}
+ errorText={genericFieldInfo.type.errorText}
+ groupClassName="bootstrap-input-options"
+ className="input-options-select"
+ overlayPos="bottom"
+ type="select">
+ {licenseKeyGroupOptionsInputValues.TYPE.map(type => (
+ <option key={type.enum} value={type.enum}>
+ {type.title}
+ </option>
+ ))}
+ </Input>
+ </GridItem>
<GridItem>
<Input
type="date"
@@ -275,17 +241,6 @@ const LicenseKeyGroupFormContent = ({
selectsEnd
/>
</GridItem>
- <GridItem colSpan={2}>
- <Input
- onChange={increments =>
- onDataChanged({ increments }, LKG_FORM_NAME)
- }
- label={i18n('Increments')}
- value={increments}
- data-test-id="create-ep-increments"
- type="text"
- />
- </GridItem>
</GridSection>
);
};
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsListEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsListEditorView.jsx
index 4c8c8cee6f..9d961b41f5 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsListEditorView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsListEditorView.jsx
@@ -106,18 +106,10 @@ class LicenseKeyGroupsListEditorView extends React.Component {
if (localFilter.trim()) {
const filter = new RegExp(escape(localFilter), 'i');
return licenseKeyGroupsList.filter(
- ({
- name = '',
- description = '',
- operationalScope = '',
- type = ''
- }) => {
+ ({ name = '', description = '', type = '' }) => {
return (
escape(name).match(filter) ||
escape(description).match(filter) ||
- escape(this.extractValue(operationalScope)).match(
- filter
- ) ||
escape(type).match(filter)
);
}
@@ -128,7 +120,7 @@ class LicenseKeyGroupsListEditorView extends React.Component {
}
renderLicenseKeyGroupListItem(licenseKeyGroup, isReadOnlyMode) {
- let { id, name, description, operationalScope, type } = licenseKeyGroup;
+ let { id, name, description, type } = licenseKeyGroup;
let {
onEditLicenseKeyGroupClick,
onDeleteLicenseKeyGroupClick
@@ -146,17 +138,12 @@ class LicenseKeyGroupsListEditorView extends React.Component {
</div>
<div className="list-editor-item-view-field">
- <div className="title">{i18n('Operational Scope')}</div>
- <div className="text operational-scope">
- {operationalScope &&
- this.getOperationalScopes(operationalScope)}
- </div>
-
<div className="title">{i18n('Type')}</div>
<div className="text type">
{InputOptions.getTitleByName(optionsInputValues, type)}
</div>
</div>
+
<div className="list-editor-item-view-field">
<div className="title">{i18n('Description')}</div>
<div className="text description">{description}</div>
@@ -165,32 +152,6 @@ class LicenseKeyGroupsListEditorView extends React.Component {
);
}
- getOperationalScopes(operationalScope) {
- if (
- operationalScope.choices &&
- operationalScope.choices.toString() === i18n(optionInputOther.OTHER)
- ) {
- return operationalScope.other;
- } else if (operationalScope.choices) {
- let allOpScopes = '';
- for (let opScope of operationalScope.choices) {
- allOpScopes +=
- allOpScopes === ''
- ? InputOptions.getTitleByName(
- optionsInputValues,
- opScope
- )
- : `, ${InputOptions.getTitleByName(
- optionsInputValues,
- opScope
- )}`;
- }
- return allOpScopes;
- } else {
- return '';
- }
- }
-
extractValue(item) {
if (item === undefined) {
return '';
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/listItems/LicenseKeyGroup.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/listItems/LicenseKeyGroup.jsx
index 555acf8dbe..79f0eb28d2 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/listItems/LicenseKeyGroup.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/listItems/LicenseKeyGroup.jsx
@@ -15,10 +15,7 @@
*/
import React, { Component } from 'react';
import i18n from 'nfvo-utils/i18n/i18n.js';
-import {
- extractValue,
- getOperationalScopes
-} from '../../licenseKeyGroups/LicenseKeyGroupsConstants.js';
+import { extractValue } from '../../licenseKeyGroups/LicenseKeyGroupsConstants.js';
import ArrowCol from './listItemsComponents/ArrowCol.jsx';
import ItemInfo from './listItemsComponents/ItemInfo.jsx';
import IconCol from './listItemsComponents/IconCol.jsx';
@@ -29,10 +26,7 @@ import {
class LicenseKeyGroup extends Component {
render() {
- let {
- lkgData: { name, description, operationalScope, type },
- isOrphan
- } = this.props;
+ let { lkgData: { name, description, type }, isOrphan } = this.props;
return (
<div
className={`vlm-list-item vlm-list-item-lkg ${
@@ -43,14 +37,6 @@ class LicenseKeyGroup extends Component {
<IconCol className="lkg-icon" text="LKG" />
<ItemInfo name={name} description={description} />
<AdditionalDataCol>
- {operationalScope &&
- operationalScope.choices && (
- <AdditionalDataElement
- className="vlm-list-item-operational-scope"
- name={i18n('Operational Scope')}
- value={getOperationalScopes(operationalScope)}
- />
- )}
<AdditionalDataElement
className="vlm-list-item-group-type"
name={i18n('Type')}
diff --git a/openecomp-ui/test-utils/factories/licenseModel/EntitlementPoolFactories.js b/openecomp-ui/test-utils/factories/licenseModel/EntitlementPoolFactories.js
index a28245e8bc..f997a64f75 100644
--- a/openecomp-ui/test-utils/factories/licenseModel/EntitlementPoolFactories.js
+++ b/openecomp-ui/test-utils/factories/licenseModel/EntitlementPoolFactories.js
@@ -25,10 +25,9 @@ Factory.define('EntitlementPoolBaseFactory')
Factory.define('EntitlementPoolExtendedBaseFactory')
.extend('EntitlementPoolBaseFactory')
.attrs({
- thresholdValue: 75,
+ thresholdValue: 76,
thresholdUnits: '%',
- increments: 'string',
- operationalScope: {'choices': ['Other'], 'other': 'blabla'},
+ increments: 'string',
startDate: (new Date()).getTime(),
expiryDate: (new Date()).getTime()
});
diff --git a/openecomp-ui/test-utils/factories/licenseModel/LicenseAgreementFactories.js b/openecomp-ui/test-utils/factories/licenseModel/LicenseAgreementFactories.js
index 0c91456123..ffd8a7570f 100644
--- a/openecomp-ui/test-utils/factories/licenseModel/LicenseAgreementFactories.js
+++ b/openecomp-ui/test-utils/factories/licenseModel/LicenseAgreementFactories.js
@@ -27,10 +27,7 @@ Factory.define('LicenseAgreementBaseFactory')
});
Factory.define('LicenseAgreementExtendedBaseFactory')
- .extend('LicenseAgreementBaseFactory')
- .attrs({
- requirementsAndConstrains: 'req_and_constraints_ADDED_LA'
- });
+ .extend('LicenseAgreementBaseFactory');
export const LicenseAgreementListItemFactory = new Factory()
.extend('LicenseAgreementExtendedBaseFactory')
diff --git a/openecomp-ui/test-utils/factories/licenseModel/LicenseKeyGroupFactories.js b/openecomp-ui/test-utils/factories/licenseModel/LicenseKeyGroupFactories.js
index 50890dd7ec..dc71237e9a 100644
--- a/openecomp-ui/test-utils/factories/licenseModel/LicenseKeyGroupFactories.js
+++ b/openecomp-ui/test-utils/factories/licenseModel/LicenseKeyGroupFactories.js
@@ -20,10 +20,7 @@ Factory.define('LicenseKeyGroupBaseFactory')
.attrs({
name: 'License Key Group',
description: 'wewe',
- type: 'Unique',
- operationalScope: {
- choices: ['Data_Center']
- }
+ type: 'Unique'
});
export const LicenseKeyGroupListItemFactory = new Factory()