diff options
author | 2017-12-20 14:30:43 +0200 | |
---|---|---|
committer | 2017-12-21 11:12:33 +0000 | |
commit | 8e9c0653dd6c6862123c9609ae34e1206d86456e (patch) | |
tree | 5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor | |
parent | 785ebcc95de3e064e843bec04ba7a209d854fc7c (diff) |
Add collaboration feature
Issue-ID: SDC-767
Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795
Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor')
3 files changed, 24 insertions, 17 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/ComputeFlavorEditor.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/ComputeFlavorEditor.js index caec0702fd..a3ba5fbc4a 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/ComputeFlavorEditor.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/ComputeFlavorEditor.js @@ -16,15 +16,21 @@ import {connect} from 'react-redux'; import ComputeFlavorEditorView from './ComputeFlavorEditorView.jsx'; import {COMPUTE_FLAVOR_FORM} from './ComputeFlavorConstants.js'; -import VersionControllerUtils from 'nfvo-components/panel/versionController/VersionControllerUtils.js'; import ComputeFlavorActionHelper from 'sdc-app/onboarding/softwareProduct/components/compute/ComputeFlavorActionHelper.js'; import ValidationHelper from 'sdc-app/common/helpers/ValidationHelper.js'; import {COMPONENTS_COMPUTE_QUESTIONNAIRE} from 'sdc-app/onboarding/softwareProduct/components/SoftwareProductComponentsConstants.js'; import {onboardingMethod} from 'sdc-app/onboarding/softwareProduct/SoftwareProductConstants.js'; -export const mapStateToProps = ({softwareProduct: {softwareProductEditor, softwareProductComponents: {computeFlavor: {computeEditor = {}}}}}) => { +export const mapStateToProps = ({ + softwareProduct: { + softwareProductEditor, + softwareProductComponents: {computeFlavor: {computeEditor = {}}} + }, + currentScreen: { + props: {isReadOnlyMode} + } +}) => { const {data: currentSoftwareProduct = {}} = softwareProductEditor; - const isReadOnlyMode = VersionControllerUtils.isReadOnly(currentSoftwareProduct); let {data , qdata, qgenericFieldInfo, dataMap, genericFieldInfo, formReady} = computeEditor; let isFormValid = ValidationHelper.checkFormValid(genericFieldInfo); diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/ComputeFlavorEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/ComputeFlavorEditorView.jsx index 8f8a504629..e542ce1fd1 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/ComputeFlavorEditorView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/ComputeFlavorEditorView.jsx @@ -14,6 +14,7 @@ * permissions and limitations under the License. */ import React from 'react'; +import PropTypes from 'prop-types'; import Form from 'nfvo-components/input/validation/Form.jsx'; import Input from 'nfvo-components/input/validation/Input.jsx'; import GridSection from 'nfvo-components/grid/GridSection.jsx'; @@ -24,15 +25,15 @@ import i18n from 'nfvo-utils/i18n/i18n.js'; class ComputeEditorView extends React.Component { static propTypes = { - data: React.PropTypes.object, - qdata: React.PropTypes.object, - qschema: React.PropTypes.object, - isReadOnlyMode: React.PropTypes.bool, - isManual: React.PropTypes.bool, - onDataChanged: React.PropTypes.func.isRequired, - onQDataChanged: React.PropTypes.func.isRequired, - onSubmit: React.PropTypes.func.isRequired, - onCancel: React.PropTypes.func.isRequired + data: PropTypes.object, + qdata: PropTypes.object, + qschema: PropTypes.object, + isReadOnlyMode: PropTypes.bool, + isManual: PropTypes.bool, + onDataChanged: PropTypes.func.isRequired, + onQDataChanged: PropTypes.func.isRequired, + onSubmit: PropTypes.func.isRequired, + onCancel: PropTypes.func.isRequired }; render() { @@ -57,8 +58,8 @@ class ComputeEditorView extends React.Component { onValidateForm={() => onValidateForm() } className='component-questionnaire-validation-form' submitButtonText={edittingComputeMode ? i18n('Save') : i18n('Create')}> - <GridSection> - <GridItem colSpan={edittingComputeMode ? 2 : 4}> + <GridSection hasLostColSet> + <GridItem colSpan={edittingComputeMode ? 2 : 4} lastColInRow={!edittingComputeMode}> <Input disabled={!isManual} data-test-id='name' @@ -70,7 +71,7 @@ class ComputeEditorView extends React.Component { errorText={genericFieldInfo['name'].errorText} isRequired/> </GridItem> - <GridItem colSpan={edittingComputeMode ? 2 : 4}> + <GridItem colSpan={edittingComputeMode ? 2 : 4} lastColInRow> <Input data-test-id='description' type='textarea' diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/VmSizing.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/VmSizing.jsx index 8b30468362..54f22e0760 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/VmSizing.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/VmSizing.jsx @@ -20,7 +20,7 @@ import GridSection from 'nfvo-components/grid/GridSection.jsx'; import GridItem from 'nfvo-components/grid/GridItem.jsx'; const VmSizing = ({qgenericFieldInfo, dataMap, onQDataChanged}) => { return( - <GridSection title={i18n('VM Sizing')}> + <GridSection title={i18n('VM Sizing')} hasLastColSet> <GridItem> <Input data-test-id='numOfCPUs' @@ -51,7 +51,7 @@ const VmSizing = ({qgenericFieldInfo, dataMap, onQDataChanged}) => { errorText={qgenericFieldInfo['vmSizing/persistentStorageVolumeSize'].errorText} value={dataMap['vmSizing/persistentStorageVolumeSize']} /> </GridItem> - <GridItem> + <GridItem lastColInRow> <Input data-test-id='ioOperationsPerSec' type='number' |