summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/core/services/slicingTaskServices.ts
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/core/services/slicingTaskServices.ts')
-rw-r--r--usecaseui-portal/src/app/core/services/slicingTaskServices.ts54
1 files changed, 54 insertions, 0 deletions
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);
+ }
+}
+
+