diff options
author | 2025-02-09 13:18:28 +0100 | |
---|---|---|
committer | 2025-02-10 09:04:41 +0100 | |
commit | c1667e6060e078b31d7b64ce509d58e853df3a3b (patch) | |
tree | 1ff01c3a0c27cbb7e4b1171e5c824c0433e7c2e9 /usecaseui-portal/src/app/views/services/sotn-management/manage-service/manage-service.component.ts | |
parent | 9410a0b6eb80fda6dd652424e8c80ffa46d43077 (diff) |
Backend url is environment specific in some locations
- use `window.location.origin` to make the backend url working for both
local (localhost) and remote (uui.example.com) deployments
Issue-ID: USECASEUI-865
Change-Id: Idf5b6fe8a04ce744fc4cb9986c10977e60548820
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/sotn-management/manage-service/manage-service.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/views/services/sotn-management/manage-service/manage-service.component.ts | 16 |
1 files changed, 8 insertions, 8 deletions
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 16aee4e7..fa11985c 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 @@ -1,6 +1,6 @@ -import { Component, OnInit, SimpleChanges } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; -import { baseUrl } from '../../../../datainterface'; +import { Component, OnInit } from '@angular/core'; +import { HttpClient, HttpHeaders } from '@angular/common/http'; +import { environment } from '@src/environments/environment'; @Component({ selector: 'app-manage-service', templateUrl: './manage-service.component.html', @@ -25,7 +25,7 @@ export class ManageServiceComponent implements OnInit { uniInfo = []; mapped: any; myKeys = [] as Array<any>; - baseUrl = baseUrl.baseUrl + baseUrl = environment.backendUrl; constructor(private http: HttpClient) { } ngOnInit() { @@ -58,10 +58,10 @@ export class ManageServiceComponent implements OnInit { this.selectedServiceInstance=""; let url = this.baseUrl + "/uui-lcm/Sotnservices/ServiceInstances/"+subscriptionType; this.http.get<any>(url,httpOptions).subscribe((data) => { - this.serviceInstanceList = data.serviceInstanceList; + this.serviceInstanceList = data.serviceInstanceList; }, (err) => { console.log(err); - }); + }); } deleteSelectedService() { @@ -81,8 +81,8 @@ export class ManageServiceComponent implements OnInit { } - - getSubscribedSites() { + + getSubscribedSites() { console.log("on change"); let httpOptions = { headers: new HttpHeaders({ |