From 1f4acde5c38f72327fb02121db57d2ddb9609e99 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Thu, 28 Nov 2019 14:46:25 +0800 Subject: Added ability to filter data based on processing status Change-Id: I39a9cc83651745dda7844ae119429d47aa8a46b4 Issue-ID: USECASEUI-352 Signed-off-by: cyuamber --- .../src/app/core/services/serviceList.service.ts | 8 +--- .../src/app/core/services/slicingTaskServices.ts | 54 ++++++++++++++++++++++ 2 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 usecaseui-portal/src/app/core/services/slicingTaskServices.ts (limited to 'usecaseui-portal/src/app/core/services') 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(url); } - // Get slicing order task list - getSlicingTaskList (pageNo, pageSize) { - const url = this.url.slicingTaskList.replace("{pageNo}", pageNo).replace("{pageSize}", pageSize) - return this.http.get(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(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(url); + } + // Get + getAuditInfo (taskId: string){ + const url = this.url.auditInfo.replace('{taskId}', taskId); + return this.http.get(url); + } +} + + -- cgit 1.2.3-korg