diff options
Diffstat (limited to 'usecaseui-portal/src/app/core/services')
6 files changed, 31 insertions, 71 deletions
diff --git a/usecaseui-portal/src/app/core/services/appEvent.ts b/usecaseui-portal/src/app/core/services/appEvent.ts deleted file mode 100644 index 775eced9..00000000 --- a/usecaseui-portal/src/app/core/services/appEvent.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - Copyright (C) 2021 Huawei Canada, 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 {AppEventType} from "@src/app/core/services/appEventType"; - -export class AppEvent<T> { - constructor( - public type: AppEventType, - public payload: T, - ) {} -}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/core/services/appEventType.ts b/usecaseui-portal/src/app/core/services/appEventType.ts deleted file mode 100644 index e5369a8c..00000000 --- a/usecaseui-portal/src/app/core/services/appEventType.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum AppEventType { - GenericEvent = 'GENERIC_EVENT', - UserNodeDrag = 'USER_NODE_DRAG' -}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/core/services/eventQueue.service.ts b/usecaseui-portal/src/app/core/services/eventQueue.service.ts deleted file mode 100644 index e4c32c38..00000000 --- a/usecaseui-portal/src/app/core/services/eventQueue.service.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2021 Huawei Canada, 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 {Observable, Subject} from "rxjs/Rx"; -import {AppEvent} from "@src/app/core/services/appEvent"; -import {AppEventType} from "@src/app/core/services/appEventType"; -import {filter} from "rxjs/operators"; - -@Injectable() -export class EventQueueService { - - private eventBroker = new Subject<AppEvent<any>>(); - - on(eventType: AppEventType): Observable<AppEvent<any>> { - return this.eventBroker.pipe(filter(event => event.type === eventType)); - } - - dispatch<T>(event: AppEvent<T>): void { - this.eventBroker.next(event); - } - -}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/core/services/intentBase.service.ts b/usecaseui-portal/src/app/core/services/intentBase.service.ts index 7fb8104f..5ee8424a 100644 --- a/usecaseui-portal/src/app/core/services/intentBase.service.ts +++ b/usecaseui-portal/src/app/core/services/intentBase.service.ts @@ -34,7 +34,10 @@ export class intentBaseService { invalidIntentInstance: this.baseUrl + "/intent/invalidIntentInstance", queryAccessNodeInfo: this.baseUrl + "/intent/queryAccessNodeInfo", intentInstancePredict: this.baseUrl + "/intent/predict", - intentBasedUnifyPredict: this.baseUrl + "/intent/unifyPredict" + intentBasedUnifyPredict: this.baseUrl + "/intent/unifyPredict", + getIntentInstanceList: this.baseUrl + "/intent/getIntentList", + delIntentInstance: this.baseUrl + "/intent/deleteIntent", + verifyIntentInstance: this.baseUrl + "/intent/verifyIntentInstance" }; //The following APIs function are optimizable------------------------ @@ -88,4 +91,17 @@ export class intentBaseService { intentBasedUnifyPredict(requestBody) { return this.http.post<any>(this.url["intentBasedUnifyPredict"], requestBody); } + + getIntentInstanceList(paramsObj) { + return this.http.post<any>(this.url["getIntentInstanceList"], paramsObj); + } + + delIntentInstance(id) { + let params = new HttpParams({ fromObject: { "id": id } }); + return this.http.delete<any>(this.url['delIntentInstance'], { params }); + } + + verifyIntentInstance(paramsObj) { + return this.http.post<any>(this.url['verifyIntentInstance'], paramsObj); + } } diff --git a/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts b/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts index 0959f564..0e16966a 100644 --- a/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts +++ b/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts @@ -1,5 +1,6 @@ /* Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. + Copyright (C) 2022 Huawei Canada Limited. 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. @@ -40,7 +41,9 @@ export class networkHttpservice { "createCloudLink": this.baseUrl+"/uui-sotn/createLink/", "createCloudUrl": this.baseUrl+"/uui-sotn/createHostUrl/", "deleteLink": this.baseUrl+"/uui-sotn/deleteLink/", - "getConnectivities": this.baseUrl+"/uui-sotn/getConnectivityInfo", + "getConnectivities": this.baseUrl+"/uui-sotn/getConnectivities", + "getNetworkRoutes": this.baseUrl + "/uui-sotn/getNetworkRoutes", + }; @@ -86,6 +89,9 @@ export class networkHttpservice { getConnectivities(){ return this.http.get<any>(this.url["getConnectivities"]); } + getNetworkRoutes(){ + return this.http.get<any>(this.url["getNetworkRoutes"]); + } //Create an external cloud newwork interface createNetwrok(paramsObj) { diff --git a/usecaseui-portal/src/app/core/services/slicingTaskServices.ts b/usecaseui-portal/src/app/core/services/slicingTaskServices.ts index 362e9f6a..292d9bdd 100644 --- a/usecaseui-portal/src/app/core/services/slicingTaskServices.ts +++ b/usecaseui-portal/src/app/core/services/slicingTaskServices.ts @@ -13,13 +13,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { Injectable } from "@angular/core";
import {
- HttpClient,
- HttpHeaders,
- HttpParams,
- HttpResponse,
+ HttpClient
} from "@angular/common/http";
+import { Injectable } from "@angular/core";
import { Http } from "../../shared/utils/http";
@Injectable()
export class SlicingTaskServices {
@@ -85,6 +82,7 @@ export class SlicingTaskServices { csmfGetProgress:
"/api/usecaseui/csmf/5gSlicing/service/{serviceId}/progress",
csmfPurchase: "/api/usecaseui-server/v1/uui-slicing/csmf/5gSlicing",
+ csmfPurchaseWithContent: '/api/usecaseui-server/v1/intent/csmf/5gSlicing',
//monitor 5G
fetchTraffic:
this.baseUrl +
@@ -294,7 +292,10 @@ export class SlicingTaskServices { let url = this.url.csmfPurchase;
return this.Http.httpAxios("post", url, paramsObj, failedCallback);
}
-
+ csmfSlicingPurchaseWithContent(paramsObj: any, failedCallback?: any) {
+ let url = this.url.csmfPurchaseWithContent;
+ return this.Http.httpAxios("post", url, paramsObj, failedCallback);
+ }
//monitor 5G
getFetchTraffic(service_list, time, failedCallback?: any) {
let url = this.url.fetchTraffic.replace("{queryTimestamp}", time);
|