From 8e9c0653dd6c6862123c9609ae34e1206d86456e Mon Sep 17 00:00:00 2001
From: talig <talig@amdocs.com>
Date: Wed, 20 Dec 2017 14:30:43 +0200
Subject: Add collaboration feature

Issue-ID: SDC-767
Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795
Signed-off-by: talig <talig@amdocs.com>
---
 .../networks/SoftwareProductNetworksView.jsx          | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

(limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct/networks/SoftwareProductNetworksView.jsx')

diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/networks/SoftwareProductNetworksView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/networks/SoftwareProductNetworksView.jsx
index 024c5cc44c..e8c365f124 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/networks/SoftwareProductNetworksView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/networks/SoftwareProductNetworksView.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 ListEditorView from 'nfvo-components/listEditor/ListEditorView.jsx';
@@ -23,11 +24,12 @@ import ListEditorItemViewField from 'nfvo-components/listEditor/ListEditorItemVi
 class SoftwareProductNetworksView extends React.Component {
 
 	static propTypes = {
-		networksList: React.PropTypes.arrayOf(React.PropTypes.shape({
-			id: React.PropTypes.string.isRequired,
-			name: React.PropTypes.string.isRequired,
-			dhcp: React.PropTypes.bool.isRequired
-		})).isRequired
+		networksList: PropTypes.arrayOf(PropTypes.shape({
+			id: PropTypes.string.isRequired,
+			name: PropTypes.string.isRequired,
+			dhcp: PropTypes.bool.isRequired
+		})).isRequired,
+		isReadOnlyMode: PropTypes.bool.isRequired
 	};
 
 	state = {
@@ -36,6 +38,7 @@ class SoftwareProductNetworksView extends React.Component {
 
 	render() {
 		const {localFilter} = this.state;
+		const {isReadOnlyMode} = this.props;
 
 		return (
 			<div className='vsp-networks-page'>
@@ -45,19 +48,19 @@ class SoftwareProductNetworksView extends React.Component {
 					placeholder={i18n('Filter Networks')}
 					onFilter={value => this.setState({localFilter: value})}
 					twoColumns>
-					{this.filterList().map(network => this.renderNetworksListItem(network))}
+					{this.filterList().map(network => this.renderNetworksListItem({network, isReadOnlyMode}))}
 				</ListEditorView>
 			</div>
 		);
 	}
 
-	renderNetworksListItem(network) {
+	renderNetworksListItem({network, isReadOnlyMode}) {
 		let {id, name, dhcp} = network;
 		return (
 			<ListEditorItemView
 				key={id}
 				className='list-editor-item-view'
-				isReadOnlyMode={true}>
+				isReadOnlyMode={isReadOnlyMode}>
 
 				<ListEditorItemViewField>
 					<div className='name'>{name}</div>
-- 
cgit 1.2.3-korg

