Browse Source

UI: disabled originartor column details page links in alarms table for entities that can not have alarm

pull/9991/head
rusikv 3 years ago
parent
commit
f77711ec5a
  1. 2
      ui-ngx/src/app/core/utils.ts
  2. 4
      ui-ngx/src/app/modules/home/components/entity/entities-table.component.html

2
ui-ngx/src/app/core/utils.ts

@ -711,7 +711,7 @@ export function randomAlphanumeric(length: number): string {
}
export function getEntityDetailsPageURL(id: string, entityType: EntityType): string {
return `${baseDetailsPageByEntityType.get(entityType)}/${id}`;
return baseDetailsPageByEntityType.has(entityType) ? `${baseDetailsPageByEntityType.get(entityType)}/${id}` : '';
}
export function parseHttpErrorMessage(errorResponse: HttpErrorResponse,

4
ui-ngx/src/app/modules/home/components/entity/entities-table.component.html

@ -165,8 +165,8 @@
[matTooltip]="cellTooltip(entity, column, row)"
matTooltipPosition="above"
[ngStyle]="cellStyle(entity, column, row)">
<ng-container *ngIf="column.type == 'link'; else defaultContent">
<a [routerLink]="column.entityURL(entity)" [innerHTML]="cellContent(entity, column, row)" (click)="$event.stopPropagation();"></a>
<ng-container *ngIf="column.type == 'link' && column.entityURL(entity) as detailsPageURl; else defaultContent">
<a [routerLink]="detailsPageURl" [innerHTML]="cellContent(entity, column, row)" (click)="$event.stopPropagation();"></a>
</ng-container>
<ng-template #defaultContent>
<span [innerHTML]="cellContent(entity, column, row)"></span>

Loading…
Cancel
Save