\r
\r
// Get slicing order task list\r
- getSlicingTaskList(pageNo: string, pageSize: string) {\r
+ getSlicingTaskList(pageNo: string, pageSize: string, failedCallback?:any) {\r
const url = this.url.slicingTaskList\r
.replace("{pageNo}", pageNo)\r
.replace("{pageSize}", pageSize);\r
- return this.Http.httpAxios("get", url)\r
+ return this.Http.httpAxios("get", url, null, failedCallback)\r
}\r
// Get list based on task processing status\r
- getTaskProcessingStatus(processingStatus: string, pageNo: string, pageSize: string) {\r
+ getTaskProcessingStatus(processingStatus: string, pageNo: string, pageSize: string, failedCallback?:any) {\r
const url = this.url.taskProcessingStatus\r
.replace('{processingStatus}', processingStatus)\r
.replace("{pageNo}", pageNo)\r
.replace("{pageSize}", pageSize);\r
- return this.Http.httpAxios("get", url);\r
+ return this.Http.httpAxios("get", url, null, failedCallback)\r
}\r
// Get \r
- getAuditInfo(taskId: string) {\r
+ getAuditInfo(taskId: string, failedCallback?:any) {\r
const url = this.url.auditInfo.replace('{taskId}', taskId);\r
- return this.Http.httpAxios("get", url);\r
+ return this.Http.httpAxios("get", url, null, failedCallback);\r
}\r
- getSlicingInstance(pageNo: string, pageSize: string) {\r
+ getSlicingInstance(pageNo: string, pageSize: string, failedCallback?:any) {\r
const url = this.url.slicingInstance\r
.replace("{pageNo}", pageNo)\r
.replace("{pageSize}", pageSize);\r
- return this.Http.httpAxios("get", url);\r
+ return this.Http.httpAxios("get", url, null, failedCallback);\r
}\r
getSlicingSubnetInstance(nsiId: string, failedCallback?:any) {\r
const url = this.url.slicingSubnetInstance.replace('{nsiId}', nsiId);\r
if (!activate) {\r
url = this.url.csmfDeactivate.replace("{serviceId}", paramsObj.serviceId)\r
}\r
- // return this.http.put<any>(url, paramsObj);\r
return this.Http.httpAxios("put", url, paramsObj, failedCallback);\r
}\r
// terminate CSMF slicing business\r
- csmfTerminate(paramsObj) {\r
- const url = this.url.csmfTerminate.replace('{serviceId}', paramsObj.serviceId);\r
- return this.http.delete<any>(url);\r
- }\r
- // query CSMF slicing business progress\r
- csmfSlicingProgress(paramsObj) {\r
- let url = this.url.csmfGetProgress.replace("{serviceId}", paramsObj.serviceId);\r
- return this.http.get<any>(url);\r
- }\r
+ // csmfTerminate(paramsObj) {\r
+ // const url = this.url.csmfTerminate.replace('{serviceId}', paramsObj.serviceId);\r
+ // return this.http.delete<any>(url);\r
+ // }\r
+ // // query CSMF slicing business progress\r
+ // csmfSlicingProgress(paramsObj) {\r
+ // let url = this.url.csmfGetProgress.replace("{serviceId}", paramsObj.serviceId);\r
+ // return this.http.get<any>(url);\r
+ // }\r
csmfSlicingPurchase(paramsObj: any, failedCallback?:any){\r
let url = this.url.csmfPurchase;\r
return this.Http.httpAxios("post", url, paramsObj, failedCallback);\r
import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
-import { NzMessageService } from 'ng-zorro-antd';
import { SlicingTaskServices } from '@src/app/core/services/slicingTaskServices';
import { indexDebugNode } from '@angular/core/src/debug/debug_node';
@Output() cancel = new EventEmitter<object>();
@ViewChild('notification') notification1: any;
- constructor(private http: SlicingTaskServices, private message: NzMessageService) { }
+ constructor(private http: SlicingTaskServices) { }
// 配置审核详情
checkDetail: any[] = [{}];
}
getautidInfo(): void {
- this.http.getAuditInfo(this.taskId).then( res => {
+ let getAuditInfoFailedCallback = () => {
+ this.isSpinning = false;
+ }
+ this.http.getAuditInfo(this.taskId, getAuditInfoFailedCallback).then( res => {
this.isSpinning = false;
const {
business_demand_info,
'sliceProfile_CN_ipAddress',
'sliceProfile_CN_nextHopInfo'
])};
- }, ({ status, statusText }) => {
- this.message.error(status + ' (' + statusText + ')');
- this.isSpinning = false;
})
}
getSlicingInstances(pageNo: string, pageSize: string): void {
this.slicingInstances.isLoading = true;
- this.http.getSlicingInstance(pageNo, pageSize).then(res => {
+ let getSlicingInstanceFailedCallback = () => {
+ this.slicingInstances.isLoading = false;
+ this.slicingInstances.flag = false;
+ }
+ this.http.getSlicingInstance(pageNo, pageSize, getSlicingInstanceFailedCallback).then(res => {
const { result_body } = res;
setTimeout(() => {
const { nsi_service_instances, record_number } = result_body;
this.slicingInstances.isLoading = false;
this.slicingInstances.flag = false;
}, 2000)
- }, ({ status, statusText }) => {
- this.message.error(status + ' (' + statusText + ')');
- this.slicingInstances.isLoading = false;
- this.slicingInstances.flag = false;
})
}
let reqBody = { ...checkDetail[0], business_demand_info: businessRequirement[0], nst_info: NSTinfo[0], nsi_nssi_info };
delete reqBody.service_snssai;
let submitSlicingFailedCallback = () => {
+ this.loading = false;
this.notification1.notificationFailed('Task', 'Sumbit', this.taskId)
}
this.http.submitSlicing(reqBody,submitSlicingFailedCallback).then(res => {
this.notification1.notificationSuccess('Task', 'Sumbit', this.taskId)
this.loading = false;
this.handleCancel(true);
- }, ({ status, statusText }) => {
- this.message.error(status + ' (' + statusText + ')');
- this.loading = false;
})
}
}