summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx
diff options
context:
space:
mode:
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>
);
};