aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2018-11-10 22:58:58 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2018-11-10 22:59:25 +0800
commit94cd0c22e87255883931ad77741839cf325aba63 (patch)
tree51f65e3ff3aa46edd69976a77937392ba7bb9852
parent1ce0635c6d61b318c33b4b6d9f356eb6db114478 (diff)
fix e2e service instantiation bugs
Change-Id: If2e4c3e883f0b8dbd0d54f94af3d1c00cc67463e Issue-ID: USECASEUI-179 Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
-rw-r--r--usecaseui-portal/src/app/myhttp.service.ts2
-rw-r--r--usecaseui-portal/src/app/services/services-list/services-list.component.ts8
2 files changed, 9 insertions, 1 deletions
diff --git a/usecaseui-portal/src/app/myhttp.service.ts b/usecaseui-portal/src/app/myhttp.service.ts
index 0496eed9..7c77e973 100644
--- a/usecaseui-portal/src/app/myhttp.service.ts
+++ b/usecaseui-portal/src/app/myhttp.service.ts
@@ -174,7 +174,7 @@ export class MyhttpService {
// Create interface
createInstance(requestBody, createParams) {
// return this.http.get<any>(this.url.createService + createParams); //Local simulation
- return this.http.post<any>(this.url.createService, requestBody);
+ return this.http.post<any>(this.url.createService + createParams, requestBody);
}
nsCreateInstance(requestBody) {
// return this.http.get<any>(this.url.ns_createService); //Local simulation
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 cc69e51a..0509e70a 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
@@ -44,6 +44,10 @@ export class ServicesListComponent implements OnInit {
this.myhttp.getAllCustomers()
.subscribe((data)=>{
this.customerList = data.map((item)=>{return {name:item["subscriber-name"],id:item["global-customer-id"]}});
+ if(this.customerList.length==0){
+ console.log("customerList.length == 0",this.customerList);
+ return false;
+ }
this.customerSelected = this.customerList[0];
this.choseCustomer(this.customerSelected);
// console.log(this.customers)
@@ -55,6 +59,10 @@ export class ServicesListComponent implements OnInit {
this.myhttp.getServiceTypes(this.customerSelected)
.subscribe((data)=>{
this.serviceTypeList = data.map((item)=>{return {name:item["service-type"]}});
+ if(this.serviceTypeList.length==0){
+ console.log("serviceTypeList.length == 0",this.serviceTypeList);
+ return false;
+ }
this.serviceTypeSelected = this.serviceTypeList[0];
this.choseServiceType(this.serviceTypeSelected);
// console.log(this.listServiceTypes);