diff options
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts | 22 |
1 files changed, 9 insertions, 13 deletions
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 ba2b8971..5fe303b0 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 @@ -48,21 +48,17 @@ export class NssiTableComponent implements OnInit { paramsObj["instanceStatus"] = this.selectedValue.toLocaleLowerCase(); this.isSelect = true; } - this.myhttp.getSlicingNssiList(paramsObj, this.isSelect).subscribe(res => { - const {result_header: {result_code}, result_body: {nssi_service_instances, record_number}} = res; + let getSlicingNssiListFailedCallback = () => { this.loading = false; - if (+result_code === 200) { - this.total = record_number; - this.loading = false; - if (nssi_service_instances !== null && nssi_service_instances.length > 0) { - this.listOfData = nssi_service_instances; - } - }else{ - this.message.error(res.result_header.result_message) - } - }, (res) => { + } + this.myhttp.getSlicingNssiList(paramsObj, this.isSelect, getSlicingNssiListFailedCallback).then(res => { + const { result_body: {nssi_service_instances, record_number} } = res; this.loading = false; - this.message.error(res) + this.total = record_number; + this.loading = false; + if (nssi_service_instances !== null && nssi_service_instances.length > 0) { + this.listOfData = nssi_service_instances; + } }) } |