summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/services
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2019-05-14 18:41:02 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2019-05-14 18:41:09 +0800
commitcd934c497a6bf26992bcb42e27a179479001658b (patch)
treeee5446472dc01cf1cca77ed1ab363a50bdbfba99 /usecaseui-portal/src/app/services
parente044dfe80bcefb9004c8b6d3156d15ac56426dad (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')
-rw-r--r--usecaseui-portal/src/app/services/services-list/services-list.component.html1
-rw-r--r--usecaseui-portal/src/app/services/services-list/services-list.component.ts40
2 files changed, 35 insertions, 6 deletions
diff --git a/usecaseui-portal/src/app/services/services-list/services-list.component.html b/usecaseui-portal/src/app/services/services-list/services-list.component.html
index b68210ae..55551402 100644
--- a/usecaseui-portal/src/app/services/services-list/services-list.component.html
+++ b/usecaseui-portal/src/app/services/services-list/services-list.component.html
@@ -86,6 +86,7 @@
<label class="label" style="font-size: 20px; color: rgb(60,79,140,0.5)">Sol005</label>
</div>
</div>
+ <div class="select-list" style="color: red;margin-left: 66px;" *ngIf="temParametersTips"> {{"i18nTextDefine_Templateparsingfailed" | translate}}</div>
</nz-modal>
</div>
<nz-layout style=" padding: 20px 32px; ">
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;