From e1ec8dd3eb366b23f82d6ef3fb2c912da9da8fc9 Mon Sep 17 00:00:00 2001 From: guochuyicmri Date: Sun, 5 May 2019 15:49:05 +0800 Subject: Fix instance instantiation for CCVPN Change-Id: I20f31798b879791dc701945c2cf919bcfb9ec35d Issue-ID: USECASEUI-220 Signed-off-by: guochuyicmri --- .../app/ccvpn-creation/ccvpn-creation.component.ts | 58 +++------------------- 1 file changed, 7 insertions(+), 51 deletions(-) (limited to 'usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts') diff --git a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts index 063d609a..0200de85 100644 --- a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts +++ b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts @@ -38,7 +38,7 @@ export class CcvpnCreationComponent implements OnInit { //tabBarStyle tabBarStyle = { "height": "58px", - "width": "460px", + "width": "694px", "box-shadow": "none", "margin": "0", "border-radius": "4px 4px 0px 0px" @@ -591,58 +591,14 @@ export class CcvpnCreationComponent implements OnInit { locationConstraints: [ ], }, + resources:[], requestInputs: { - }, - resources:[] + sdwanvpnresource_list:[], + sdwansiteresource_list:[] + } }; - - let sotnbody = this.sotnVpnTableData.map((sotn) => { - let sotninputs = { - resourceIndex: 0, - resourceName:this.templateParameters["sotnvpn"]["info"]["resourceName"], - resourceInvariantUuid: this.templateParameters["sotnvpn"]["info"]["resourceInvariantUuid"], - resourceUuid: this.templateParameters["sotnvpn"]["info"]["resourceUuid"], - resourceCustomizationUuid:this.templateParameters["sotnvpn"]["info"]["resourceCustomizationUuid"], - parameters: { - locationConstraints: [ - ], - resources: [ - ], - requestInputs: {} - } - }; - sotninputs.parameters.requestInputs=Object.assign({}, sotn); - - return sotninputs; - }); - - let sitebody = this.sotnVpnTableData.map((site) => { - let siteinputs = { - resourceIndex: 0, - resourceName:this.templateParameters["site"]["info"]["resourceName"], - resourceInvariantUuid: this.templateParameters["site"]["info"]["resourceInvariantUuid"], - resourceUuid: this.templateParameters["site"]["info"]["resourceUuid"], - resourceCustomizationUuid:this.templateParameters["site"]["info"]["resourceCustomizationUuid"], - parameters: { - locationConstraints: [ - ], - resources: [ - ], - requestInputs: {} - } - }; - siteinputs.parameters.requestInputs=Object.assign({}, site); - - return siteinputs; - }); - - servicebody.resources = sotnbody.concat(sitebody); - servicebody.resources.map((item,index) => { - item.resourceIndex=index; - }); - - console.log(sotnbody); - console.log(sitebody); + servicebody.requestInputs.sdwanvpnresource_list=servicebody.requestInputs.sdwanvpnresource_list.concat(this.sotnVpnTableData); + servicebody.requestInputs.sdwansiteresource_list=servicebody.requestInputs.sdwansiteresource_list.concat(this.siteTableData); console.log(servicebody); this.closeCreate.emit(servicebody); -- cgit 1.2.3-korg