From 7d078fad22472cedc7bf7dc872ea60c283828ef1 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Fri, 6 Dec 2019 15:07:28 +0800 Subject: feat: Added clear function in the status filter box of the task management page Change-Id: I926ed476cf8415c1a12ce809ba92e6a51f75ccef Issue-ID: USECASEUI-368 Signed-off-by: cyuamber --- .../slicing-task-management.component.html | 8 +++++++- .../slicing-task-management.component.ts | 19 ++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) (limited to 'usecaseui-portal') diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html index 135cf3ff..76f0fcf5 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html @@ -2,7 +2,13 @@
Status : - +
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts index 76e67070..a3203695 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts @@ -32,14 +32,19 @@ export class SlicingTaskManagementComponent implements OnInit { }) } getListOfProcessingStatus():void { - this.myhttp.getTaskProcessingStatus(this.selectedValue, '1', '10').subscribe (res => { - const { result_header: { result_code }, result_body: { slicing_task_list } } = res - if (+result_code === 200) { - this.dataFormatting(slicing_task_list) - } - }) + const { selectedValue } = this; + if (selectedValue) { + this.myhttp.getTaskProcessingStatus(selectedValue, '1', '10').subscribe (res => { + const { result_header: { result_code }, result_body: { slicing_task_list } } = res + if (+result_code === 200) { + this.dataFormatting(slicing_task_list) + } + }) + } else { + this.getTaskList() + } } - + dataFormatting(list: any):void{ this.listOfData = list.map( item => { item.arrival_time = moment(+item.arrival_time).format('YYYY-MM-DD hh:mm') -- cgit 1.2.3-korg