summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-02-13 20:44:33 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-02-13 20:44:39 +0800
commitc63489b9bb2071abc8180af4e53c2dcb143c127d (patch)
treebb7730cb155f693e3f5b719adeec72c708ac685d /usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management
parent3db71a09cb73e24eda6d36f39df2e35f123f290b (diff)
feat:Optimize code for slice ordering and business code of csmf slicing
Change-Id: I62a00ed407796434239c2089788ac47330e1c0d8 Issue-ID: USECASEUI-368 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts2
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts2
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html2
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts15
4 files changed, 11 insertions, 10 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts
index 203df8a6..6ac29417 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts
@@ -37,7 +37,7 @@ export class NsiTableComponent implements OnInit {
pageSize: this.pageSize
};
if(this.selectedValue !== BUSINESS_STATUS[0]){
- paramsObj["instanceStatus"] = this.selectedValue;
+ paramsObj["instanceStatus"] = this.selectedValue.toLocaleLowerCase();
this.isSelect = true;
}
this.myhttp.getSlicingNsiList(paramsObj,this.isSelect).subscribe (res => {
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts
index a6e00b43..5e90bcee 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts
@@ -37,7 +37,7 @@ export class NssiTableComponent implements OnInit {
pageSize: this.pageSize
};
if(this.selectedValue !== BUSINESS_STATUS[0]){
- paramsObj["instanceStatus"] = this.selectedValue;
+ paramsObj["instanceStatus"] = this.selectedValue.toLocaleLowerCase();
this.isSelect = true;
}
this.myhttp.getSlicingNssiList(paramsObj,this.isSelect).subscribe (res => {
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html
index 8bce1cdf..14c51f19 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html
@@ -53,7 +53,7 @@
<div class="action-icon">
<i [ngClass]="{'cannotclick': data.last_operation_type && data.last_operation_progress && data.last_operation_progress !== '100' && (data.last_operation_type !== 'DELETE' || data.orchestration_status==='activated')}"
nz-icon nzType="poweroff" nzTheme="outline" class="anticon anticon-poweroff"
- (click)="terminate(data)"></i>
+ (click)="terminate(data,i)"></i>
<nz-progress
*ngIf="data.last_operation_type && data.last_operation_progress && data.last_operation_progress !== '100' && terminateStart"
[nzPercent]="data.last_operation_progress" [nzShowInfo]="false" nzStatus="active">
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts
index 23b8360b..fc07efc9 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts
@@ -35,7 +35,7 @@ export class SlicingBusinessTableComponent implements OnInit {
isSelect: boolean = false;
statusOptions: any[] = BUSINESS_STATUS;
progressingTimer: any[] = [];
- terminateStart: boolean = false;
+ terminateStart: any[] = [];
@ViewChild('notification') notification1: any;
getBusinessList(): void {
@@ -47,7 +47,7 @@ export class SlicingBusinessTableComponent implements OnInit {
pageSize: this.pageSize
};
if (this.selectedValue !== BUSINESS_STATUS[0]) {
- paramsObj["businessStatus"] = this.selectedValue;
+ paramsObj["businessStatus"] = this.selectedValue.toLocaleLowerCase();
this.isSelect = true;
}
this.myhttp.getSlicingBusinessList(paramsObj, this.isSelect).subscribe(res => {
@@ -64,7 +64,8 @@ export class SlicingBusinessTableComponent implements OnInit {
let obj = {
serviceId: item.service_instance_id
};
- if (item.last_operation_type === 'DELETE') this.terminateStart = true;
+ if (item.last_operation_type === 'DELETE') this.terminateStart[index] = true
+ else this.terminateStart[index] = false;
this.queryProgress(obj, item.orchestration_status, index, updata).then((res) => {
item.last_operation_progress = '100';
this.getBusinessList();
@@ -140,14 +141,14 @@ export class SlicingBusinessTableComponent implements OnInit {
this.getBusinessList();
})
}
- terminate(slicing) {
+ terminate(slicing,index) {
this.modalService.confirm({
nzTitle: 'Do you Want to terminate slicing business?',
nzContent: '<b>Name:&nbsp;</b>' + slicing.service_instance_name,
nzOnOk: () => {
this.notification1.notificationStart('slicing business', 'terminate', slicing.service_instance_id);
let paramsObj = { serviceId: slicing.service_instance_id };
- this.terminateStart = true;
+ this.terminateStart[index] = true;
this.loading = true;
this.myhttp.terminateSlicingService(paramsObj).subscribe(res => {
const { result_header: { result_code, result_message }, result_body: { operation_id } } = res;
@@ -157,12 +158,12 @@ export class SlicingBusinessTableComponent implements OnInit {
this.getBusinessList();
} else {
this.notification1.notificationFailed('slicing business', 'terminate', slicing.service_instance_id);
- this.terminateStart = false;
+ this.terminateStart[index] = false;
}
}, () => {
this.loading = false;
this.notification1.notificationFailed('slicing business', 'terminate', slicing.service_instance_id);
- this.terminateStart = false;
+ this.terminateStart[index] = false;
})
},
nzCancelText: 'No',