Browse Source
Merge pull request #3235 from vvlladd28/improvement/alarm-widget/add-disable-sort
[3.0] Disabled column sort for alarm widget for details key
pull/3243/head
Igor Kulikov
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.html
-
ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts
|
|
@ -78,7 +78,9 @@ |
|
|
</mat-cell> |
|
|
</mat-cell> |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
<ng-container [matColumnDef]="column.def" *ngFor="let column of columns; trackBy: trackByColumnDef;"> |
|
|
<ng-container [matColumnDef]="column.def" *ngFor="let column of columns; trackBy: trackByColumnDef;"> |
|
|
<mat-header-cell [ngStyle]="headerStyle(column)" *matHeaderCellDef mat-sort-header> {{ column.title }} </mat-header-cell> |
|
|
<mat-header-cell [ngStyle]="headerStyle(column)" *matHeaderCellDef mat-sort-header [disabled]="isSorting(column)"> |
|
|
|
|
|
{{ column.title }} |
|
|
|
|
|
</mat-header-cell> |
|
|
<mat-cell *matCellDef="let alarm;" |
|
|
<mat-cell *matCellDef="let alarm;" |
|
|
[innerHTML]="cellContent(alarm, column)" |
|
|
[innerHTML]="cellContent(alarm, column)" |
|
|
[ngStyle]="cellStyle(alarm, column)"> |
|
|
[ngStyle]="cellStyle(alarm, column)"> |
|
|
|
|
|
@ -840,6 +840,9 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
isSorting(column: EntityColumn): boolean { |
|
|
|
|
|
return column.type === DataKeyType.alarm && column.name.startsWith('details.'); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
class AlarmsDatasource implements DataSource<AlarmDataInfo> { |
|
|
class AlarmsDatasource implements DataSource<AlarmDataInfo> { |
|
|
|