diff options
author | 2019-05-14 18:41:02 +0800 | |
---|---|---|
committer | 2019-05-14 18:41:09 +0800 | |
commit | cd934c497a6bf26992bcb42e27a179479001658b (patch) | |
tree | ee5446472dc01cf1cca77ed1ab363a50bdbfba99 /usecaseui-portal/src/app/services/services-list/services-list.component.ts | |
parent | e044dfe80bcefb9004c8b6d3156d15ac56426dad (diff) |
Fix instance instantiation for CCVPN
Change-Id: Ibf9be061fb6a461cd6c73ccf56a6afe72928157d
Issue-ID: USECASEUI-220
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/services/services-list/services-list.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/services/services-list/services-list.component.ts | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/usecaseui-portal/src/app/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/services/services-list/services-list.component.ts index 90e996a9..1cf8cb98 100644 --- a/usecaseui-portal/src/app/services/services-list/services-list.component.ts +++ b/usecaseui-portal/src/app/services/services-list/services-list.component.ts @@ -216,18 +216,13 @@ export class ServicesListComponent implements OnInit { createData:Object={}; handleOk(): void { // console.log('Button ok clicked!'); - this.isVisible = false; if(this.templateTypeSelected=="SOTN"||this.templateTypeSelected=="CCVPN"){ this.createData = {commonParams:{customer:this.customerSelected, serviceType:this.serviceTypeSelected2, templateType:this.templateTypeSelected},template:this.template1}; - this.createshow = true; - this.listDisplay = true; }else if(this.templateTypeSelected=="E2E Service"||this.templateTypeSelected=="Network Service"){ this.createData = {commonParams:{customer:this.customerSelected, serviceType:this.serviceTypeSelected2, templateType:this.templateTypeSelected},template:this.template1, orchestrator:this.orchestratorSelected, isSol005Interface:this.isSol005Interface}; - this.createshow2 = true; - this.listDisplay = true; } - + this.getTemParameters(); } handleCancel(): void { // console.log('Button cancel clicked!'); @@ -235,6 +230,39 @@ export class ServicesListComponent implements OnInit { } + temParametersTips=false; + ccvpn_temParametersContent :any; + e2e_ns_temParametersContent :any; + getTemParameters(){ + let chosedtemplates = this.createData["template"]; + let types = this.createData["commonParams"].templateType; + if(types == "E2E Service"){ + types = "e2e"; + }else if(types == "Network Service"){ + types = "ns"; + } + this.myhttp.getTemplateParameters(types, chosedtemplates) + .subscribe((data) => { + if (data.status == "FAILED") { + this.temParametersTips = true; + this.isVisible = true; + console.log("Template parsing failed"); + }else { + this.isVisible = false; + this.temParametersTips = false; + if (this.templateTypeSelected == "SOTN" || this.templateTypeSelected == "CCVPN") { + this.ccvpn_temParametersContent = data; + this.createshow = true; + this.listDisplay = true; + } else if (this.templateTypeSelected == "E2E Service" || this.templateTypeSelected == "Network Service") { + this.e2e_ns_temParametersContent = data; + this.createshow2 = true; + this.listDisplay = true; + } + } + }) + } + //tableData tableData = []; pageIndex = 1; |