Event default value
This commit is contained in:
parent
e332fb3718
commit
bb8c3bcc3e
@ -40,8 +40,8 @@ import {
|
||||
EventContentDialogData
|
||||
} from '@home/components/event/event-content-dialog.component';
|
||||
import { isEqual, sortObjectKeys } from '@core/utils';
|
||||
import { historyInterval, MINUTE } from '@shared/models/time/time.models';
|
||||
import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
|
||||
import { DAY, historyInterval, MINUTE } from '@shared/models/time/time.models';
|
||||
import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
|
||||
import { ChangeDetectorRef, EventEmitter, Injector, StaticProvider, ViewContainerRef } from '@angular/core';
|
||||
import { ComponentPortal } from '@angular/cdk/portal';
|
||||
import {
|
||||
@ -51,6 +51,9 @@ import {
|
||||
FilterEntityColumn
|
||||
} from '@home/components/event/event-filter-panel.component';
|
||||
import { DEFAULT_OVERLAY_POSITIONS } from '@shared/models/overlay.models';
|
||||
import { getCurrentAuthState } from '@core/auth/auth.selectors';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppState } from '@core/core.state';
|
||||
|
||||
export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> {
|
||||
|
||||
@ -59,6 +62,7 @@ export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> {
|
||||
|
||||
private filterParams: FilterEventBody = {};
|
||||
private filterColumns: FilterEntityColumn[] = [];
|
||||
private readonly maxRuleNodeDebugDurationMinutes = getCurrentAuthState(this.store).maxRuleNodeDebugDurationMinutes;
|
||||
|
||||
set eventType(eventType: EventType | DebugEventType) {
|
||||
if (this.eventTypeValue !== eventType) {
|
||||
@ -88,13 +92,14 @@ export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> {
|
||||
private overlay: Overlay,
|
||||
private viewContainerRef: ViewContainerRef,
|
||||
private cd: ChangeDetectorRef,
|
||||
protected store: Store<AppState>,
|
||||
public testButtonLabel?: string,
|
||||
private debugEventSelected?: EventEmitter<EventBody>) {
|
||||
super();
|
||||
this.loadDataOnInit = false;
|
||||
this.tableTitle = '';
|
||||
this.useTimePageLink = true;
|
||||
this.defaultTimewindowInterval = historyInterval(MINUTE * 15);
|
||||
this.defaultTimewindowInterval = this.maxRuleNodeDebugDurationMinutes ? historyInterval(this.maxRuleNodeDebugDurationMinutes * MINUTE) : historyInterval(DAY);
|
||||
this.detailsPanelEnabled = false;
|
||||
this.selectionEnabled = false;
|
||||
this.searchEnabled = false;
|
||||
|
||||
@ -36,6 +36,8 @@ import { DebugEventType, EventBody, EventType } from '@shared/models/event.model
|
||||
import { Overlay } from '@angular/cdk/overlay';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { isNotEmptyStr } from '@core/utils';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppState } from '@core/core.state';
|
||||
|
||||
@Component({
|
||||
selector: 'tb-event-table',
|
||||
@ -123,6 +125,7 @@ export class EventTableComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
private dialog: MatDialog,
|
||||
private overlay: Overlay,
|
||||
private viewContainerRef: ViewContainerRef,
|
||||
protected store: Store<AppState>,
|
||||
private cd: ChangeDetectorRef) {
|
||||
}
|
||||
|
||||
@ -142,6 +145,7 @@ export class EventTableComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.overlay,
|
||||
this.viewContainerRef,
|
||||
this.cd,
|
||||
this.store,
|
||||
this.functionTestButtonLabel,
|
||||
this.debugEventSelected
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user