diff options
author | talig <talig@amdocs.com> | 2017-12-20 14:30:43 +0200 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2017-12-21 11:12:33 +0000 |
commit | 8e9c0653dd6c6862123c9609ae34e1206d86456e (patch) | |
tree | 5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/nicEditorComponents/Network.jsx | |
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/network/nicEditorComponents/Network.jsx')
-rw-r--r-- | openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/nicEditorComponents/Network.jsx | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/nicEditorComponents/Network.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/nicEditorComponents/Network.jsx index 8d9b79e67f..7e6712cb5e 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/nicEditorComponents/Network.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/nicEditorComponents/Network.jsx @@ -14,6 +14,7 @@ * permissions and limitations under the License. */ import React from 'react'; +import PropTypes from 'prop-types'; import i18n from 'nfvo-utils/i18n/i18n.js'; import Input from 'nfvo-components/input/validation/Input.jsx'; import GridSection from 'nfvo-components/grid/GridSection.jsx'; @@ -23,51 +24,53 @@ import { networkTypes } from '../SoftwareProductComponentsNetworkConstants.js'; const Network = ({networkValues, networkType, networkDescription, onDataChanged, isReadOnlyMode}) => { const isExternal = networkType === networkTypes.EXTERNAL; return ( - <GridSection title={i18n('Network')}> - <GridItem> - <Input - label={i18n('Internal')} - disabled - checked={!isExternal} - data-test-id='nic-internal' - className='network-radio disabled' - type='radio'/> - </GridItem> - <GridItem> - <Input - label={i18n('External')} - disabled - checked={isExternal} - data-test-id='nic-external' - className='network-radio disabled' - type='radio'/> - </GridItem> - <GridItem colSpan={2}> - {isExternal ? + <GridSection title={i18n('Network')} hasLastColSet> + <GridItem> + <Input + label={i18n('Internal')} + disabled + checked={!isExternal} + data-test-id='nic-internal' + className='network-radio disabled' + type='radio' /> + </GridItem> + <GridItem> + <Input + label={i18n('External')} + disabled + checked={isExternal} + data-test-id='nic-external' + className='network-radio disabled' + type='radio' /> + </GridItem> + <GridItem colSpan={2} lastColInRow> + { + isExternal ? <Input label={i18n('Network Description')} value={networkDescription} data-test-id='nic-network-description' onChange={networkDescription => onDataChanged({networkDescription})} disabled={isReadOnlyMode} - type='text'/> - : + type='text' /> + : <Input label={i18n('Network')} data-test-id='nic-network' type='select' className='input-options-select' groupClassName='bootstrap-input-options' - disabled={true} > - {networkValues.map(val => <option key={val.enum} value={val.enum}>{val.title}</option>)} - </Input>} - </GridItem> + disabled={true}> + {networkValues.map(val => <option key={val.enum} value={val.enum}>{val.title}</option>)} + </Input> + } + </GridItem> </GridSection> ); }; Network.PropTypes = { - networkValues: React.PropTypes.array + networkValues: PropTypes.array }; export default Network; |