summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-12-23 13:10:15 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-12-23 13:10:26 +0800
commit5cf5f8401c9cbf848858a28806b4d322b7e308eb (patch)
tree861a8fa76420e23f4300b69eeaee60a6b87c96a8 /usecaseui-portal/src/app/views/services
parent892c3e66b34b9e7fd9d98b394a345ace8572ab64 (diff)
feat: Modified the progress display logic in the task management page
Change-Id: I06f9369a193672b42b77e071db1149d73d4eaba7 Issue-ID: USECASEUI-368 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.html15
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts8
2 files changed, 11 insertions, 12 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.html
index 38aab545..ecba2cdf 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.html
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.html
@@ -17,7 +17,7 @@
<p class="list-title">Task Detail:</p>
</ng-template>
<ng-template #defaultItem let-item>
- <nz-list-item nz-row nzType="flex" nzJustify="center" >
+ <nz-list-item nz-row nzType="flex" nzJustify="center">
<nz-steps
nzType="navigation"
[nzCurrent]="item.currentProgress"
@@ -30,18 +30,15 @@
<nz-step [nzTitle]="item.title"></nz-step>
<nz-step
[nzTitle]="item.currentProgress > 1 ? null : 'in progress'"
- [nzStatus]="item.status" nzIcon="anticon anticon-spin anticon-loading"
+ [nzStatus]="item.status" [nzIcon]="item.status === 'process'? 'anticon anticon-spin anticon-loading' : null"
>
</nz-step>
- <nz-step
- [nzTitle]="item.status === 'finish' ? 'success' : null"
- [nzStatus]="item.status === 'finish' ? 'finish' : 'wait'"
- nzIcon='loading'
- >
- </nz-step>
+ <nz-step [nzStatus]="item.status === 'finish' ? 'finish' : 'wait'" [nzIcon]="item.status === 'process'?'loading': null"> </nz-step>
</nz-steps>
-
+ <p *ngIf="!data[0].length" [ngStyle]="{marginBottom: 0}">No data</p>
</nz-list-item>
+
+
</ng-template>
</nz-list>
</nz-spin>
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts
index 181eaf7a..1babf278 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts
@@ -96,17 +96,19 @@ export class CheckProcessModelComponent implements OnInit {
let currentProgress = 1
let status = 'process';
if (+result_body[item] === 100) {
- currentProgress = 2;
+ currentProgress = 3;
status = 'finish'
}
const title = item === 'an_progress' ? 'An' : (item === 'tn_progress' ? 'Tn' : 'Cn')
let obj = { [item]: result_body[item], currentProgress, title, status };
- this.data.push(obj)
+ if(result_body[item]){
+ this.data.push(obj)
+ }
})
this.data = [this.data];
let flag: boolean = false;
Object.values(result_body).forEach(item => {
- if (item !== 100) {
+ if (+item !== 100 && typeof item !== 'object') {
flag = true;
}
})