X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Finstances%2Fpdu-instances%2FPDUInstancesComponent.ts;h=6a2ca34db6d4a3b56c2172385a6fbea3e46f1fb2;hb=319d328d0bbb1e156ac767851c8c33acb518dc94;hp=20b44df0aa635037f6690160c156484ea07e2916;hpb=3b4814aa2d3dec621dadb52f058ba95a3dc3a86a;p=osm%2FNG-UI.git diff --git a/src/app/instances/pdu-instances/PDUInstancesComponent.ts b/src/app/instances/pdu-instances/PDUInstancesComponent.ts index 20b44df..6a2ca34 100644 --- a/src/app/instances/pdu-instances/PDUInstancesComponent.ts +++ b/src/app/instances/pdu-instances/PDUInstancesComponent.ts @@ -124,10 +124,13 @@ export class PDUInstancesComponent implements OnInit, OnDestroy { public generateTableColumn(): void { this.columnList = { identifier: { title: this.translateService.instant('IDENTIFIER'), width: '25%' }, - name: { title: this.translateService.instant('NAME'), width: '20%', sortDirection: 'asc' }, + name: { title: this.translateService.instant('NAME'), width: '20%' }, type: { title: this.translateService.instant('TYPE'), width: '15%' }, usageState: { title: this.translateService.instant('USAGESTATE'), width: '15%' }, - 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: '10%', filter: false, sort: false, type: 'custom', title: this.translateService.instant('ACTIONS'), @@ -159,7 +162,9 @@ export class PDUInstancesComponent implements OnInit, OnDestroy { } this.dataSource.load(this.pduInstanceData).then((data: {}) => { this.isLoadingResults = false; - }).catch(); + }).catch((): void => { + // Catch Navigation Error + }); }, (error: ERRORDATA) => { this.restService.handleError(error, 'get'); this.isLoadingResults = false; @@ -179,13 +184,16 @@ export class PDUInstancesComponent implements OnInit, OnDestroy { /** Add PDU Instance modal using modalservice @public */ public addPDUInstanceModal(): void { + // eslint-disable-next-line security/detect-non-literal-fs-filename const modalRef: NgbModalRef = this.modalService.open(AddPDUInstancesComponent, { backdrop: 'static' }); modalRef.componentInstance.title = this.translateService.instant('PAGE.PDUINSTANCE.NEWPDUINSTANCE'); modalRef.result.then((result: MODALCLOSERESPONSEDATA) => { if (result) { this.generateData(); } - }).catch(); + }).catch((): void => { + // Catch Navigation Error + }); } /**