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