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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
3 deletions
-
ui-ngx/src/app/core/utils.ts
-
ui-ngx/src/app/modules/home/components/entity/entities-table.component.html
|
|
|
@ -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, |
|
|
|
|
|
|
|
@ -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> |
|
|
|
|