|
|
|
@ -48,7 +48,7 @@ import cssjs from '@core/css/css'; |
|
|
|
import { sortItems } from '@shared/models/page/page-link'; |
|
|
|
import { Direction } from '@shared/models/page/sort-order'; |
|
|
|
import { CollectionViewer, DataSource, SelectionModel } from '@angular/cdk/collections'; |
|
|
|
import { BehaviorSubject, forkJoin, fromEvent, merge, Observable } from 'rxjs'; |
|
|
|
import { BehaviorSubject, forkJoin, fromEvent, merge, Observable, Subscription } from 'rxjs'; |
|
|
|
import { emptyPageData, PageData } from '@shared/models/page/page-data'; |
|
|
|
import { entityTypeTranslations } from '@shared/models/entity-type.models'; |
|
|
|
import { debounceTime, distinctUntilChanged, map, take, tap } from 'rxjs/operators'; |
|
|
|
@ -188,6 +188,8 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, |
|
|
|
|
|
|
|
private rowStylesInfo: RowStyleInfo; |
|
|
|
|
|
|
|
private widgetTimewindowChangedSubscription: Subscription; |
|
|
|
|
|
|
|
private searchAction: WidgetAction = { |
|
|
|
name: 'action.search', |
|
|
|
show: true, |
|
|
|
@ -243,6 +245,17 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, |
|
|
|
this.initializeConfig(); |
|
|
|
this.updateAlarmSource(); |
|
|
|
this.ctx.updateWidgetParams(); |
|
|
|
|
|
|
|
this.widgetTimewindowChangedSubscription = this.ctx.defaultSubscription.widgetTimewindowChanged.subscribe( |
|
|
|
() => this.pageLink.page = 0 |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
ngOnDestroy(): void { |
|
|
|
if (this.widgetTimewindowChangedSubscription) { |
|
|
|
this.widgetTimewindowChangedSubscription.unsubscribe(); |
|
|
|
this.widgetTimewindowChangedSubscription = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
ngAfterViewInit(): void { |
|
|
|
|