removed fields from LA EP and LKG 79/49479/1
authorArielk <Ariel.Kenan@amdocs.com>
Wed, 30 May 2018 11:52:00 +0000 (14:52 +0300)
committerArielk <Ariel.Kenan@amdocs.com>
Wed, 30 May 2018 11:52:21 +0000 (14:52 +0300)
Change-Id: I20b9d81721125ac19c2910a36e11290c3fda27bd
Issue-ID: SDC-1381
Signed-off-by: Arielk <Ariel.Kenan@amdocs.com>
20 files changed:
catalog-ui/src/app/modules/directive-module.ts
openecomp-ui/src/nfvo-utils/i18n/en.json
openecomp-ui/src/sdc-app/common/merge/MergeEditorActionHelper.js
openecomp-ui/src/sdc-app/common/merge/MergeEditorConstants.js
openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js
openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsConstants.js
openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorReducer.js
openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx
openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorReducer.js
openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditorView.jsx
openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js
openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsConstants.js
openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorReducer.js
openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx
openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsListEditorView.jsx
openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/listItems/LicenseKeyGroup.jsx
openecomp-ui/test-utils/factories/licenseModel/EntitlementPoolFactories.js
openecomp-ui/test-utils/factories/licenseModel/LicenseAgreementFactories.js
openecomp-ui/test-utils/factories/licenseModel/LicenseKeyGroupFactories.js

index d409da0..3b3a716 100644 (file)
@@ -245,7 +245,7 @@ directiveModule.directive('ng2ServicePathSelector', downgradeComponent({
 
 directiveModule.directive('ng2InterfaceOperation', downgradeComponent({
     component: InterfaceOperationComponent,
-    inputs: ['component', 'readonly', 'state'],
+    inputs: ['component', 'readonly'],
     outputs: []
 }) as angular.IDirectiveFactory);
 
index d02904d..131c357 100644 (file)
@@ -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",
   "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 \\",
   "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",
   "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",
index c54b9fe..50d2a5b 100644 (file)
@@ -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' },
index b82d086..bb25a1a 100644 (file)
@@ -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'
index 181fc11..51f353f 100644 (file)
@@ -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
index e69ff68..dbb6b44 100644 (file)
@@ -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' },
index 4556b87..f773fa1 100644 (file)
@@ -61,11 +61,6 @@ export default (state = {}, action) => {
                         errorText: '',
                         validations: [{ type: 'maxLength', data: 120 }]
                     },
-                    operationalScope: {
-                        isValid: true,
-                        errorText: '',
-                        validations: []
-                    },
                     thresholdUnits: {
                         isValid: true,
                         errorText: '',
index 350dc0b..c74354c 100644 (file)
@@ -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,
@@ -96,59 +88,6 @@ const EntitlementPoolsFormContent = ({
                     type="text"
                 />
             </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
@@ -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)
index 5d425a8..feceba5 100644 (file)
@@ -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
index 0d3fb2a..03157cb 100644 (file)
@@ -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: '',
index cc16dd9..b2ebc1e 100644 (file)
@@ -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}
index ebbe84a..39af205 100644 (file)
@@ -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,
index aad0a0b..d201886 100644 (file)
@@ -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',
index e948e9c..948398a 100644 (file)
@@ -64,11 +64,6 @@ export default (state = {}, action) => {
                         errorText: '',
                         validations: [{ type: 'required', data: true }]
                     },
-                    operationalScope: {
-                        isValid: true,
-                        errorText: '',
-                        validations: []
-                    },
                     thresholdUnits: {
                         isValid: true,
                         errorText: '',
index b53ce8f..0d5c6bc 100644 (file)
@@ -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>
     );
 };
index 4c8c8ce..9d961b4 100644 (file)
@@ -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 '';
index 555acf8..79f0eb2 100644 (file)
  */
 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')}
index a28245e..f997a64 100644 (file)
@@ -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()
        });
index 0c91456..ffd8a75 100644 (file)
@@ -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')
index 50890dd..dc71237 100644 (file)
@@ -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()