Browse Source

Merge pull request #9991 from rusikv/bug/alarm-table-originator-links

Disabled originartor column details page links in alarms table for entities that can not have alarm
pull/10060/head
Igor Kulikov 3 years ago
committed by GitHub
parent
commit
6f545be230
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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

@ -739,7 +739,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