summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/core/services
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/core/services')
-rw-r--r--usecaseui-portal/src/app/core/services/homes.service.ts7
-rw-r--r--usecaseui-portal/src/app/core/services/intentBase.service.ts16
-rw-r--r--usecaseui-portal/src/app/core/services/managemencs.service.ts7
-rw-r--r--usecaseui-portal/src/app/core/services/networkHttpservice.service.ts6
-rw-r--r--usecaseui-portal/src/app/core/services/onboard.service.ts7
-rw-r--r--usecaseui-portal/src/app/core/services/serviceList.service.ts11
6 files changed, 26 insertions, 28 deletions
diff --git a/usecaseui-portal/src/app/core/services/homes.service.ts b/usecaseui-portal/src/app/core/services/homes.service.ts
index 98d60b52..322bbd0a 100644
--- a/usecaseui-portal/src/app/core/services/homes.service.ts
+++ b/usecaseui-portal/src/app/core/services/homes.service.ts
@@ -14,15 +14,14 @@
limitations under the License.
*/
import { Injectable } from '@angular/core';
-import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
-import { Observable } from 'rxjs/Observable';
-import { baseUrl } from '../models/dataInterface';
+import { HttpClient, HttpParams } from '@angular/common/http';
+import { environment } from '@src/environments/environment';
@Injectable()
export class HomesService {
constructor(private http: HttpClient) { }
- baseUrl = baseUrl.baseUrl;
+ baseUrl = environment.backendUrl;
url = {
home_serviceData: this.baseUrl + "/uui-lcm/serviceNumByCustomer",
home_alarmData: this.baseUrl + "/alarm/statusCount",
diff --git a/usecaseui-portal/src/app/core/services/intentBase.service.ts b/usecaseui-portal/src/app/core/services/intentBase.service.ts
index a9c4187b..f5702544 100644
--- a/usecaseui-portal/src/app/core/services/intentBase.service.ts
+++ b/usecaseui-portal/src/app/core/services/intentBase.service.ts
@@ -15,13 +15,13 @@
*/
import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
-import { baseUrl } from '../models/dataInterface';
+import { environment } from '@src/environments/environment';
@Injectable()
export class intentBaseService {
constructor(private http: HttpClient) { }
- baseUrl = baseUrl.baseUrl;
+ baseUrl = environment.backendUrl;
url = {
getInstanceId: this.baseUrl + "/intent/getInstanceId",
createIntentInstance: this.baseUrl + "/intent/createIntentInstance",
@@ -47,7 +47,7 @@ export class intentBaseService {
getInstanceId() {
return this.http.get<any>(this.url["getInstanceId"]);
}
-
+
createIntentInstance(requestBody) {
return this.http.post<any>(this.url["createIntentInstance"], requestBody);
}
@@ -55,7 +55,7 @@ export class intentBaseService {
getInstanceList(requestBody) {
return this.http.post<any>(this.url["getInstanceList"], requestBody);
}
-
+
getInstanceStatus(requestBody) {
return this.http.post<any>(this.url["getInstanceStatus"], requestBody);
}
@@ -63,16 +63,16 @@ export class intentBaseService {
queryInstancePerformanceData(requestBody) {
return this.http.post<any>(this.url["queryInstancePerformanceData"], requestBody);
}
-
+
getFinishedInstanceInfo() {
return this.http.get<any>(this.url["getFinishedInstanceInfo"]);
}
-
+
deleteIntentInstance(instanceId) {
let params = new HttpParams({ fromObject: { "instanceId": instanceId } });
return this.http.delete<any>(this.url.deleteIntentInstance, { params });
}
-
+
activeIntentInstance(requestBody) {
return this.http.post<any>(this.url["activeIntentInstance"], requestBody);
}
@@ -84,7 +84,7 @@ export class intentBaseService {
updateIntentInstance(requestBody) {
return this.http.post<any>(this.url["updateIntentInstance"], requestBody);
}
-
+
queryAccessNodeInfo() {
return this.http.get<any>(this.url["queryAccessNodeInfo"]);
}
diff --git a/usecaseui-portal/src/app/core/services/managemencs.service.ts b/usecaseui-portal/src/app/core/services/managemencs.service.ts
index c8eed218..7dd9d94d 100644
--- a/usecaseui-portal/src/app/core/services/managemencs.service.ts
+++ b/usecaseui-portal/src/app/core/services/managemencs.service.ts
@@ -1,14 +1,13 @@
import { Injectable } from '@angular/core';
-import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
-import { Observable } from 'rxjs/Observable';
-import { baseUrl } from '../models/dataInterface';
+import { HttpClient, HttpParams } from '@angular/common/http';
+import { environment } from '@src/environments/environment';
@Injectable()
export class ManagemencsService {
constructor(private http: HttpClient) { }
- baseUrl = baseUrl.baseUrl;
+ baseUrl = environment.backendUrl;
/* line up */
url = {
diff --git a/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts b/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts
index d558d489..73d6211c 100644
--- a/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts
+++ b/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts
@@ -15,8 +15,8 @@
limitations under the License.
*/
import { Injectable } from '@angular/core';
-import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
-import { baseUrl } from '../models/dataInterface';
+import { HttpClient, HttpParams } from '@angular/common/http';
+import { environment } from '@src/environments/environment';
@Injectable()
@@ -24,7 +24,7 @@ export class networkHttpservice {
constructor(private http: HttpClient) { }
- baseUrl = baseUrl.baseUrl;//Online environment
+ baseUrl = environment.backendUrl;
url = {
"getNetworkD3Data": this.baseUrl+"/uui-sotn/getNetWorkResources",
"getLogicalLinksData": this.baseUrl+"/uui-sotn/getLogicalLinks",
diff --git a/usecaseui-portal/src/app/core/services/onboard.service.ts b/usecaseui-portal/src/app/core/services/onboard.service.ts
index 20d9c244..472fcf63 100644
--- a/usecaseui-portal/src/app/core/services/onboard.service.ts
+++ b/usecaseui-portal/src/app/core/services/onboard.service.ts
@@ -14,15 +14,14 @@
limitations under the License.
*/
import { Injectable } from '@angular/core';
-import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
-import { Observable } from 'rxjs/Observable';
-import { baseUrl } from '../models/dataInterface';
+import { HttpClient, HttpParams } from '@angular/common/http';
+import { environment } from '@src/environments/environment';
@Injectable()
export class onboardService {
constructor(private http: HttpClient) { }
- baseUrl = baseUrl.baseUrl;
+ baseUrl =environment.backendUrl;
url = {
onboardTableData: this.baseUrl + "/uui-lcm/ns-packages",
onboardDataVNF: this.baseUrl + "/uui-lcm/vnf-packages",
diff --git a/usecaseui-portal/src/app/core/services/serviceList.service.ts b/usecaseui-portal/src/app/core/services/serviceList.service.ts
index 945d60c2..1492d0db 100644
--- a/usecaseui-portal/src/app/core/services/serviceList.service.ts
+++ b/usecaseui-portal/src/app/core/services/serviceList.service.ts
@@ -16,15 +16,16 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
-import { servicesTableData,baseUrl } from '../models/dataInterface';
-import { retry, catchError } from 'rxjs/operators';
+import { servicesTableData } from '../models/dataInterface';
+import { catchError } from 'rxjs/operators';
+import { environment } from '@src/environments/environment';
@Injectable()
export class ServiceListService {
constructor(private http: HttpClient) { }
- baseUrl = baseUrl.baseUrl;
-
+ baseUrl = environment.backendUrl;
+
url = {
customers: this.baseUrl + "/uui-lcm/customers",
serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions",
@@ -219,7 +220,7 @@ export class ServiceListService {
return this.http.get<any>(url);
}
-
+
handleError(error) {
let errorMessage = '';
if (error.error instanceof ErrorEvent) {