summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/core
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-11-28 14:46:25 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-11-28 14:46:35 +0800
commit1f4acde5c38f72327fb02121db57d2ddb9609e99 (patch)
treea7342ce750c49a2b9769c21823bae78e5c3eb637 /usecaseui-portal/src/app/core
parenta7589978ffc6f942d74b7c45df61c6f090bfa991 (diff)
Added ability to filter data based on processing status
Change-Id: I39a9cc83651745dda7844ae119429d47aa8a46b4 Issue-ID: USECASEUI-352 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/core')
-rw-r--r--usecaseui-portal/src/app/core/services/serviceList.service.ts8
-rw-r--r--usecaseui-portal/src/app/core/services/slicingTaskServices.ts54
2 files changed, 55 insertions, 7 deletions
diff --git a/usecaseui-portal/src/app/core/services/serviceList.service.ts b/usecaseui-portal/src/app/core/services/serviceList.service.ts
index 2280aa9e..475e1868 100644
--- a/usecaseui-portal/src/app/core/services/serviceList.service.ts
+++ b/usecaseui-portal/src/app/core/services/serviceList.service.ts
@@ -23,7 +23,7 @@ export class ServiceListService {
constructor(private http: HttpClient) { }
baseUrl = baseUrl.baseUrl;
- nsmfBaseUrl = '/api/uui-slicing/nsmf'
+
url = {
customers: this.baseUrl + "/uui-lcm/customers",
serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions",
@@ -52,7 +52,6 @@ export class ServiceListService {
pnfDetail: this.baseUrl + "/uui-sotn/getPnfInfo/",
connectivity: this.baseUrl + "/uui-sotn/getConnectivityInfo/",
vpnBinding: this.baseUrl + "/uui-sotn/getPinterfaceByVpnId/",
- slicingTaskList: this.nsmfBaseUrl + "/task/business/pageNo/{pageNo}/pageSize/{pageSize}"
};
@@ -210,10 +209,5 @@ export class ServiceListService {
return this.http.get<any>(url);
}
- // Get slicing order task list
- getSlicingTaskList (pageNo, pageSize) {
- const url = this.url.slicingTaskList.replace("{pageNo}", pageNo).replace("{pageSize}", pageSize)
- return this.http.get<any>(url);
- }
}
diff --git a/usecaseui-portal/src/app/core/services/slicingTaskServices.ts b/usecaseui-portal/src/app/core/services/slicingTaskServices.ts
new file mode 100644
index 00000000..fa0a42fd
--- /dev/null
+++ b/usecaseui-portal/src/app/core/services/slicingTaskServices.ts
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2019 CMCC, Inc. and others. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+import { Injectable } from '@angular/core';
+import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
+import { Observable } from 'rxjs/Observable';
+
+@Injectable()
+export class SlicingTaskServices {
+ constructor(private http: HttpClient) { }
+ baseUrl: string = '/api/uui-slicing/nsmf';
+ url = {
+ slicingTaskList: this.baseUrl + "/task/business/pageNo/{pageNo}/pageSize/{pageSize}",
+ taskProcessingStatus: this.baseUrl + '/task/{processingStatus}/business/pageNo/{pageNo}/pageSize/{pageSize}',
+ auditInfo: this.baseUrl + '/task/{taskId}/auditInfo'
+ }
+
+
+
+ // Get slicing order task list
+ getSlicingTaskList (pageNo: string, pageSize: string) {
+ const url = this.url.slicingTaskList
+ .replace("{pageNo}", pageNo)
+ .replace("{pageSize}", pageSize);
+ return this.http.get<any>(url);
+ }
+ // Get list based on task processing status
+ getTaskProcessingStatus (processingStatus: string, pageNo: string, pageSize: string) {
+ const url = this.url.taskProcessingStatus
+ .replace('{processingStatus}', processingStatus)
+ .replace("{pageNo}", pageNo)
+ .replace("{pageSize}", pageSize);
+ return this.http.get<any>(url);
+ }
+ // Get
+ getAuditInfo (taskId: string){
+ const url = this.url.auditInfo.replace('{taskId}', taskId);
+ return this.http.get<any>(url);
+ }
+}
+
+