X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Finstances%2Fvnf-instances%2FVNFInstancesComponent.ts;h=c27384d6c0732f078a5e59b2c170f6bfeb129bb4;hb=refs%2Fchanges%2F63%2F13963%2F2;hp=d829ee26683b75c7231d57ce2ddb0109192006b1;hpb=3b4814aa2d3dec621dadb52f058ba95a3dc3a86a;p=osm%2FNG-UI.git diff --git a/src/app/instances/vnf-instances/VNFInstancesComponent.ts b/src/app/instances/vnf-instances/VNFInstancesComponent.ts index d829ee2..c27384d 100644 --- a/src/app/instances/vnf-instances/VNFInstancesComponent.ts +++ b/src/app/instances/vnf-instances/VNFInstancesComponent.ts @@ -118,7 +118,7 @@ export class VNFInstancesComponent implements OnInit { /** Generate smart table row title and filters @public */ public generateTableColumn(): void { this.columnList = { - identifier: { title: this.translateService.instant('IDENTIFIER'), width: '25%', sortDirection: 'asc' }, + identifier: { title: this.translateService.instant('IDENTIFIER'), width: '25%' }, VNFD: { title: this.translateService.instant('VNFD'), width: '20%', type: 'custom', valuePrepareFunction: (cell: VNFInstanceData, row: VNFInstanceData): VNFInstanceData => row, @@ -126,7 +126,10 @@ export class VNFInstancesComponent implements OnInit { }, MemberIndex: { title: this.translateService.instant('MEMBERINDEX'), width: '15%' }, NS: { title: this.translateService.instant('NS'), width: '20%' }, - CreatedAt: { title: this.translateService.instant('CREATEDAT'), width: '15%' }, + CreatedAt: { + title: this.translateService.instant('CREATEDAT'), width: '15%', sortDirection: 'desc', + compareFunction: this.sharedService.compareFunction + }, Actions: { name: 'Action', width: '5%', filter: false, sort: false, type: 'custom', title: this.translateService.instant('ACTIONS'), @@ -141,7 +144,7 @@ export class VNFInstancesComponent implements OnInit { this.isLoadingResults = true; this.restService.getResource(environment.VNFINSTANCES_URL).subscribe((vnfInstancesData: VNFInstanceDetails[]) => { this.vnfInstanceData = []; - vnfInstancesData.forEach((vnfInstanceData: VNFInstanceDetails) => { + vnfInstancesData.forEach((vnfInstanceData: VNFInstanceDetails): void => { const vnfDataObj: {} = { VNFD: vnfInstanceData['vnfd-ref'], @@ -160,7 +163,9 @@ export class VNFInstancesComponent implements OnInit { } this.dataSource.load(this.vnfInstanceData).then((data: {}) => { this.isLoadingResults = false; - }).catch(); + }).catch((): void => { + // Catch Navigation Error + }); }, (error: ERRORDATA) => { this.restService.handleError(error, 'get'); this.isLoadingResults = false;