diff options
author | Tao Shen <shentao@chinamobile.com> | 2019-12-06 09:52:49 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-12-06 09:52:49 +0000 |
commit | 7d008e6e6433f071726dc2efcf1d0cffcd22a7aa (patch) | |
tree | 8a58bf08abf11366bafcd215bd81b6dc37f3c69b /usecaseui-portal/src | |
parent | bc566b0599d6150d3a24f84ca2b80f956ece4e52 (diff) | |
parent | 7d078fad22472cedc7bf7dc872ea60c283828ef1 (diff) |
Merge "feat: Added clear function in the status filter box of the task management page"
Diffstat (limited to 'usecaseui-portal/src')
2 files changed, 19 insertions, 8 deletions
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 @@ <div nz-row> <div nz-col nzSpan="12" class="task_status"> <span>Status : </span> - <nz-select nzShowSearch nzAllowClear nzPlaceHolder="Select a processing status" [(ngModel)]="selectedValue" (ngModelChange)="getListOfProcessingStatus()"> + <nz-select + nzShowSearch + nzAllowClear + [(ngModel)]="selectedValue" + nzPlaceHolder="Select a processing status" + (ngModelChange)="getListOfProcessingStatus()" + > <nz-option *ngFor="let item of statusOptions" [nzLabel]="item.title" [nzValue]="item.value"></nz-option> </nz-select> </div> 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') |