From c6a41de2f5a2e3217c8364dcd27f297069fc005f Mon Sep 17 00:00:00 2001
From: ilanap <ilanap@amdocs.com>
Date: Tue, 7 Nov 2017 11:54:10 +0200
Subject: Update VLM Overview tab behavior

Issue-ID: SDC-637

Change-Id: I30211422b9af72a8e2dc4fd58713145878881555
Signed-off-by: ilanap <ilanap@amdocs.com>
---
 .../licenseModel/overview/LicenseModelOverviewView.jsx       | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewView.jsx')

diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewView.jsx
index 15f6c2d1bb..77289a3e08 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewView.jsx
@@ -51,6 +51,7 @@ class LicenseModelOverviewView extends React.Component {
 		isReadOnlyMode: React.PropTypes.bool,
 		licenseModelId: React.PropTypes.string,
 		licensingDataList: React.PropTypes.array,
+		orphanDataList: React.PropTypes.array,
 		modalHeader: React.PropTypes.string,
 		selectedTab: React.PropTypes.string,
 		onTabSelect: React.PropTypes.func,
@@ -59,17 +60,20 @@ class LicenseModelOverviewView extends React.Component {
 	};
 
 	render() {
-		let {isDisplayModal, modalHeader, licensingDataList, selectedTab, onTabSelect} = this.props;
+		let {isDisplayModal, modalHeader, licensingDataList, selectedTab, onTabSelect, orphanDataList} = this.props;
 		let selectedInUse = selectedTab !== selectedButton.NOT_IN_USE;
-
+		let dataList = selectedInUse ? licensingDataList : orphanDataList;
 		return(
 			<div className='license-model-overview'>
 				<SummaryView/>
 				<div className={classNames('overview-list-section ', !selectedInUse ? 'overview-list-orphans' : '' )}>
 					<div className='vlm-list-tab-panel'>
-						<ListButtons onTabSelect={onTabSelect} selectedTab={selectedTab}/>
+						<ListButtons onTabSelect={onTabSelect}
+							 selectedTab={selectedTab}
+							 hasOrphans={orphanDataList.length > 0}
+							 hasLicensing={licensingDataList.length > 0}/>
 					</div>
-					<VLMListView licensingDataList={licensingDataList} showInUse={selectedInUse}/>
+					<VLMListView licensingDataList={dataList} showInUse={selectedInUse}/>
 				</div>
 				{
 					isDisplayModal &&
-- 
cgit 1.2.3-korg

