From dba6524875ebb7c0835d4eace5bc27c03763d4a1 Mon Sep 17 00:00:00 2001 From: "phani.y" Date: Wed, 25 Mar 2020 15:42:53 +0530 Subject: Service Topology Changes Issue-ID: USECASEUI-419 Signed-off-by: phani.y Change-Id: I4f2d8a5a6309de92acd9384d499a285306036ebf --- .../manage-service/manage-service.component.ts | 30 ++++++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'usecaseui-portal/src/app/views/services/sotn-management/manage-service') diff --git a/usecaseui-portal/src/app/views/services/sotn-management/manage-service/manage-service.component.ts b/usecaseui-portal/src/app/views/services/sotn-management/manage-service/manage-service.component.ts index 098eedd2..16aee4e7 100644 --- a/usecaseui-portal/src/app/views/services/sotn-management/manage-service/manage-service.component.ts +++ b/usecaseui-portal/src/app/views/services/sotn-management/manage-service/manage-service.component.ts @@ -34,8 +34,13 @@ export class ManageServiceComponent implements OnInit { //Get SubscriptionType getSubscribeTypes() { + let httpOptions = { + headers: new HttpHeaders({ + 'Content-Type': 'application/json' + }) + }; let url = this.baseUrl + "/uui-lcm/customers/service-subscriptions"; - this.http.get(url, {}).subscribe((data) => { + this.http.get(url, httpOptions).subscribe((data) => { this.serviceSubscriptionList = data.subscriptions; }, (err) => { console.log(err); @@ -44,10 +49,15 @@ export class ManageServiceComponent implements OnInit { //Get subscription instanceID by calling With Subscription Type getServiceInstanceList(subscriptionType) { + let httpOptions = { + headers: new HttpHeaders({ + 'Content-Type': 'application/json' + }) + }; this.serviceInstanceList = []; this.selectedServiceInstance=""; let url = this.baseUrl + "/uui-lcm/Sotnservices/ServiceInstances/"+subscriptionType; - this.http.get(url,{}).subscribe((data) => { + this.http.get(url,httpOptions).subscribe((data) => { this.serviceInstanceList = data.serviceInstanceList; }, (err) => { console.log(err); @@ -56,8 +66,12 @@ export class ManageServiceComponent implements OnInit { deleteSelectedService() { let url = this.baseUrl + "/uui-lcm/Sotnservices/servicesubscription/"+this.selectedSubscriptionType+'/serviceinstance/'+this.selectedServiceInstance; - - this.http.delete(url,{}).subscribe((data) => { + let httpOptions = { + headers: new HttpHeaders({ + 'Content-Type': 'application/json' + }) + }; + this.http.delete(url,httpOptions).subscribe((data) => { this.serviceInstanceList = []; this.selectedServiceInstance = ""; this.getServiceInstanceList(this.selectedSubscriptionType); @@ -67,11 +81,17 @@ export class ManageServiceComponent implements OnInit { } + getSubscribedSites() { console.log("on change"); + let httpOptions = { + headers: new HttpHeaders({ + 'Content-Type': 'application/json' + }) + }; if (this.selectedServiceInstance) { let url = this.baseUrl + "/uui-lcm/Sotnservices/servicesubscription/"+this.selectedSubscriptionType+'/serviceinstance/'+this.selectedServiceInstance; - this.http.get(url, {}).subscribe((data) => { + this.http.get(url, httpOptions).subscribe((data) => { this.assignData(data, false); }, (err) => { console.log(err); -- cgit 1.2.3-korg