From 8e9c0653dd6c6862123c9609ae34e1206d86456e Mon Sep 17 00:00:00 2001 From: talig Date: Wed, 20 Dec 2017 14:30:43 +0200 Subject: Add collaboration feature Issue-ID: SDC-767 Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795 Signed-off-by: talig --- .../onboarding/licenseModel/limits/LimitEditor.jsx | 51 +++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'openecomp-ui/src/sdc-app/onboarding/licenseModel/limits') diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx index 110e5137e1..54f057eaa4 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import i18n from 'nfvo-utils/i18n/i18n.js'; import Form from 'nfvo-components/input/validation/Form.jsx'; import Input from 'nfvo-components/input/validation/Input.jsx'; @@ -10,35 +11,35 @@ import Validator from 'nfvo-utils/Validator.js'; import {other as optionInputOther} from 'nfvo-components/input/validation/InputOptions.jsx'; import InputOptions from 'nfvo-components/input/validation/InputOptions.jsx'; -const LimitPropType = React.PropTypes.shape({ - id: React.PropTypes.string, - name: React.PropTypes.string, - description: React.PropTypes.string, - metric: React.PropTypes.shape({ - choice: React.PropTypes.string, - other: React.PropTypes.string +const LimitPropType = PropTypes.shape({ + id: PropTypes.string, + name: PropTypes.string, + description: PropTypes.string, + metric: PropTypes.shape({ + choice: PropTypes.string, + other: PropTypes.string }), - value: React.PropTypes.string, - aggregationFunction: React.PropTypes.string, - time: React.PropTypes.string, - unit: React.PropTypes.shape({ - choice: React.PropTypes.string, - other: React.PropTypes.string + value: PropTypes.string, + aggregationFunction: PropTypes.string, + time: PropTypes.string, + unit: PropTypes.shape({ + choice: PropTypes.string, + other: PropTypes.string }) }); class LimitEditor extends React.Component { static propTypes = { data: LimitPropType, - limitsNames: React.PropTypes.object, - isReadOnlyMode: React.PropTypes.bool, - isFormValid: React.PropTypes.bool, - formReady: React.PropTypes.bool, - genericFieldInfo: React.PropTypes.object.isRequired, - onDataChanged: React.PropTypes.func.isRequired, - onSubmit: React.PropTypes.func.isRequired, - onValidateForm: React.PropTypes.func.isRequired, - onCancel: React.PropTypes.func.isRequired + limitsNames: PropTypes.object, + isReadOnlyMode: PropTypes.bool, + isFormValid: PropTypes.bool, + formReady: PropTypes.bool, + genericFieldInfo: PropTypes.object.isRequired, + onDataChanged: PropTypes.func.isRequired, + onSubmit: PropTypes.func.isRequired, + onValidateForm: PropTypes.func.isRequired, + onCancel: PropTypes.func.isRequired }; componentDidUpdate(prevProps) { @@ -67,7 +68,7 @@ class LimitEditor extends React.Component { labledButtons={false} isReadOnlyMode={isReadOnlyMode} className='limit-editor-form'> - + onDataChanged({name}, LIMITS_FORM_NAME, {name: () => this.validateName(name)})} @@ -79,7 +80,7 @@ class LimitEditor extends React.Component { isRequired={true} type='text'/> - + onDataChanged({description}, LIMITS_FORM_NAME)} label={i18n('Description')} @@ -120,7 +121,7 @@ class LimitEditor extends React.Component { isRequired={true} type='text'/> - + {}} isMultiSelect={false} -- cgit 1.2.3-korg