summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-02-10 17:17:05 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-02-10 17:17:15 +0800
commit9ea47f6d7cb13d8114ab83ae602206ad7e64e892 (patch)
tree074cf10f5010ceab5b101a2ab51c62a26a0e6d7d /usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
parent2d44bd74a9f3f621532542775ba42c3149e54101 (diff)
feat:Adjust page style and order of cmsf slice business management
Change-Id: I20f10dcaf6724279e8f486fdbca281a568c4093d Issue-ID: USECASEUI-369 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts36
1 files changed, 21 insertions, 15 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
index e1b37054..fac4e0cf 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
@@ -33,34 +33,40 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
total: number = 0;
loading = false;
statusOptions: any[] = BUSINESS_STATUS;
+ isSelect: boolean = false;
progressingTimer: any[] = [];
terminateStart: boolean = false;
getCSMFBusinessList() {
this.loading = true;
+ this.isSelect = false;
this.listOfData = [];
let paramsObj = {
status: this.selectedValue,
pageNo: this.pageIndex,
pageSize: this.pageSize
};
- this.myhttp.getCSMFSlicingBusinessList(paramsObj).subscribe(res => {
- const {result_header: {result_code}, result_body: {slicing_service_list, record_number}} = res;
+ if (this.selectedValue !== BUSINESS_STATUS[0]) {
+ paramsObj["businessStatus"] = this.selectedValue;
+ this.isSelect = true;
+ }
+ this.myhttp.getSlicingBusinessList(paramsObj, this.isSelect).subscribe(res => {
+ const {result_header: {result_code}, result_body: {slicing_business_list, record_number}} = res;
this.loading = false;
if (+result_code === 200) {
this.total = record_number;
- if (slicing_service_list !== null && slicing_service_list.length > 0) {
- this.listOfData = slicing_service_list.map((item, index) => {
- if (item.last_operation_process && item.last_operation_type && Number(item.last_operation_process) < 100) {
+ if (slicing_business_list !== null && slicing_business_list.length > 0) {
+ this.listOfData = slicing_business_list.map((item, index) => {
+ if (item.last_operation_progress && item.last_operation_type && Number(item.last_operation_progress) < 100) {
let updata = (prodata: { operation_progress: string }) => {
- item.last_operation_process = prodata.operation_progress || item.last_operation_process;
+ item.last_operation_progress = prodata.operation_progress || item.last_operation_progress;
};
let obj = {
serviceId: item.service_instance_id
};
if (item.last_operation_type === 'DELETE') this.terminateStart = true;
this.queryProgress(obj, index, updata).then((res) => {
- item.last_operation_process = '100';
+ item.last_operation_progress = '100';
this.getCSMFBusinessList();
})
}
@@ -93,12 +99,12 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
console.log(slicing, i, "slicing");
this.modalService.confirm({
nzTitle: '<i>Are you sure you want to perform this task?</i>',
- nzContent: '<b>Name:' + slicing.service_name + '</b>',
+ nzContent: '<b>Name:' + slicing.service_instance_name + '</b>',
nzOnOk: () => {
let paramsObj = {
- serviceId: slicing.service_id
+ serviceId: slicing.service_instance_id
};
- if (slicing.service_status === 'activated') {
+ if (slicing.orchestration_status === 'activated') {
this.changeActivate(paramsObj, false, slicing, "deactivate", "deactivated", i)
} else {
this.changeActivate(paramsObj, true, slicing, "activate", "activated", i);
@@ -114,7 +120,7 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
}
changeActivate(paramsObj, isActivate, slicing, activateValue, finished, index) {
this.loading = true;
- this.myhttp.csmfChangeActivate(paramsObj, isActivate).subscribe(res => {
+ this.myhttp.changeActivateSlicingService(paramsObj, isActivate).subscribe(res => {
const { result_header: { result_code, result_message }, result_body: { operation_id } } = res;
this.loading = false;
if (+result_code === 200) {
@@ -139,12 +145,12 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
console.log(slicing, "slicing");
this.modalService.confirm({
nzTitle: 'Are you sure you want to terminate this task?',
- nzContent: '<b>Name:&nbsp;</b>' + slicing.service_name,
+ nzContent: '<b>Name:&nbsp;</b>' + slicing.service_instance_name,
nzOnOk: () => {
- let paramsObj = { serviceId: slicing.service_id };
+ let paramsObj = { serviceId: slicing.service_instance_id };
this.terminateStart = true;
this.loading = true;
- this.myhttp.csmfTerminate(paramsObj).subscribe(res => {
+ this.myhttp.terminateSlicingService(paramsObj).subscribe(res => {
const { result_header: { result_code, result_message }, result_body: { operation_id } } = res;
this.loading = false;
if (+result_code === 200) {
@@ -166,7 +172,7 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
queryProgress(obj, index, callback) {
return new Promise(res => {
let requery = () => {
- this.myhttp.csmfSlicingProgress(obj)
+ this.myhttp.getSlicingBusinessProgress(obj)
.subscribe((data) => {
const { result_header: { result_code, result_message }, result_body: { operation_id } } = data;
if (+result_code === 200) {