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'),
}
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;
/** 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
+ });
}
/**