diff options
author | Chuyi Guo <guochuyi@chinamobile.com> | 2019-08-23 11:45:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-23 11:45:35 +0000 |
commit | 53dc95156c32bb4e2a97a0b852a0c491f297889d (patch) | |
tree | d0aafb4d5376efe2a0e1164032f1e7a489b80ac6 /usecaseui-portal/src/app | |
parent | 5c9f4896c435936f41c54107626de7f700e3a012 (diff) | |
parent | d5f18c422a770ff04b44e87deefec50516b0fef3 (diff) |
Merge "feat:customer page api sort out add notes"
Diffstat (limited to 'usecaseui-portal/src/app')
-rw-r--r-- | usecaseui-portal/src/app/core/services/managemencs.service.ts | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/usecaseui-portal/src/app/core/services/managemencs.service.ts b/usecaseui-portal/src/app/core/services/managemencs.service.ts index a28885d8..da43b8f5 100644 --- a/usecaseui-portal/src/app/core/services/managemencs.service.ts +++ b/usecaseui-portal/src/app/core/services/managemencs.service.ts @@ -10,32 +10,46 @@ export class ManagemencsService { constructor(private http: HttpClient) { } baseUrl = baseUrl.baseUrl; - - - /* line up */ url = { + // The following APIs are optimizable customers: this.baseUrl + "/uui-lcm/customers", /* get */ - serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions", /* get */ CustomersPir: this.baseUrl + "/uui-lcm/serviceNumByCustomer", /* get */ + deleteCustomer: this.baseUrl + "/uui-lcm/customers?customerId=*_*&resourceVersion=*+*", /* delete */ + // The following APIs are not optimizable + serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions", /* get */ CustomersColumn: this.baseUrl + "/uui-lcm/serviceNumByServiceType/" + "*_*", /* get */ createCustomer: this.baseUrl + "/uui-lcm/customers/", /* put */ createServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", /* put */ getCustomerresourceVersion: this.baseUrl + "/uui-lcm/customers/*_*", /* put */ - deleteCustomer: this.baseUrl + "/uui-lcm/customers?customerId=*_*&resourceVersion=*+*", getServiceTypeResourceVersion: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", deleteServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*?resourceVersion=*@* ", }; + //The following APIs are optimizable ---------------------------------- // Get all customers getAllCustomers() { return this.http.get<any>(this.url.customers); } + // create New Customer + createCustomer(customer, createParams) { + let url = this.url.createCustomer + customer; + return this.http.put(url, createParams); + } + // delete SelectCustomer + deleteSelectCustomer(params) { + let customerId = params.customerId, + version = params.version; + let url = this.url.deleteCustomer.replace("*_*", customerId).replace("*+*", version); + return this.http.delete(url); + } + + //The following APIs are not optimizable --------------------------------- + // get all servicetype getServiceTypes(customer) { let url = this.url.serviceType.replace("*_*", customer.id); - console.log(url) return this.http.get<any>(url); } // get Customer Pir @@ -47,40 +61,26 @@ export class ManagemencsService { let url = this.url.CustomersColumn.replace("*_*", customer.id); return this.http.get<any>(url); } - // create New Customer - createCustomer(customer, createParams) { - let url = this.url.createCustomer + customer; - // return this.http.get(url, createParams);//location - return this.http.put(url, createParams);//online - } - + // create ServiceType createServiceType(createParams) { let customerId = createParams.customer.id, ServiceType = createParams.ServiceType; let url = this.url.createServiceType.replace("*_*", customerId).replace("*+*", ServiceType); - // return this.http.get(url,createParams);//location return this.http.put(url, createParams);//online } - + // Get delete Customer Version getdeleteCustomerVersion(thisdeleteCustomer) { let url = this.url.getCustomerresourceVersion.replace("*_*", thisdeleteCustomer.id); return this.http.get(url); } - - deleteSelectCustomer(params) { - let customerId = params.customerId, - version = params.version; - let url = this.url.deleteCustomer.replace("*_*", customerId).replace("*+*", version); - return this.http.delete(url); - } - + // Get delete ServiceType Version getdeleteServiceTypeVersion(params) { let customerId = params.customerId.id, ServiceType = params.ServiceType; let url = this.url.getServiceTypeResourceVersion.replace("*_*", customerId).replace("*+*", ServiceType); return this.http.get(url); } - + // delete Select ServiceType deleteSelectServiceType(params) { let customerId = params.customerId.id, ServiceType = params.ServiceType, |