diff options
author | 2019-08-22 16:55:57 +0800 | |
---|---|---|
committer | 2019-08-22 16:56:09 +0800 | |
commit | d0f5347dc16b5aa9fc95eb520fbc9a1c7b672b09 (patch) | |
tree | b3891d8de290d755d7f0f00d35bb77d3b89ad747 /usecaseui-portal/src/app/managemencs.service.ts | |
parent | 56923755c761897cc86ca2457667fcc3e6a0e43f (diff) |
feat: change the project structure and add mock data function
Change-Id: I381845bff5eb37d1fab3eba8cf1ae7838df523b7
Issue-ID: USECASEUI-307
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/managemencs.service.ts')
-rw-r--r-- | usecaseui-portal/src/app/managemencs.service.ts | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/usecaseui-portal/src/app/managemencs.service.ts b/usecaseui-portal/src/app/managemencs.service.ts deleted file mode 100644 index 03ddb2e2..00000000 --- a/usecaseui-portal/src/app/managemencs.service.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs/Observable'; -import {baseUrl} from './dataInterface'; - - -@Injectable() -export class ManagemencsService { - - constructor(private http: HttpClient) { } - baseUrl = baseUrl.baseUrl; - - - - - /* line up */ - url = { - customers:this.baseUrl + "/uui-lcm/customers", /* get */ - serviceType:this.baseUrl + "/uui-lcm/customers/"+"*_*"+"/service-subscriptions", /* get */ - CustomersPir:this.baseUrl + "/uui-lcm/serviceNumByCustomer", /* 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=*@* ", - }; - - - // Get all customers - getAllCustomers() { - return this.http.get<any>(this.url.customers); - } - // 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 - getCustomersPie(){ - return this.http.get<any>(this.url.CustomersPir); - } - // get Customer ber - getCustomersColumn(customer){ - 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 - } - - 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 - } - - 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); - } - - getdeleteServiceTypeVersion(params) { - let customerId = params.customerId.id, - ServiceType = params.ServiceType; - let url = this.url.getServiceTypeResourceVersion.replace("*_*", customerId).replace("*+*", ServiceType); - return this.http.get(url); - } - - deleteSelectServiceType(params) { - let customerId = params.customerId.id, - ServiceType = params.ServiceType, - version = params.version; - let url = this.url.deleteServiceType.replace("*_*", customerId).replace("*+*", ServiceType).replace("*@*", version); - return this.http.delete(url); - } -} |