summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx
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/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx
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/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx145
1 files changed, 50 insertions, 95 deletions
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>
);
};