|
|
@ -264,25 +264,17 @@ export class AlarmRulesTableConfig extends EntityTableConfig<any> { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private openDebugEventsDialog(calculatedField: CalculatedField): void { |
|
|
private openDebugEventsDialog(calculatedField: CalculatedField): void { |
|
|
const customCellActionEnabledFn = (event: DebugEvent) => { |
|
|
|
|
|
return (calculatedField.type === CalculatedFieldType.SCRIPT || |
|
|
|
|
|
(calculatedField.type === CalculatedFieldType.PROPAGATION && |
|
|
|
|
|
calculatedField.configuration.applyExpressionToResolvedArguments) |
|
|
|
|
|
) && !!(event as DebugEvent).body.arguments; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
this.dialog.open<EventsDialogComponent, EventsDialogData, null>(EventsDialogComponent, { |
|
|
this.dialog.open<EventsDialogComponent, EventsDialogData, null>(EventsDialogComponent, { |
|
|
disableClose: true, |
|
|
disableClose: true, |
|
|
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], |
|
|
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], |
|
|
data: { |
|
|
data: { |
|
|
title: 'alarm-rule.debugging', |
|
|
title: 'alarm-rule.debugging', |
|
|
tenantId: this.tenantId, |
|
|
tenantId: this.tenantId, |
|
|
value: calculatedField.id, |
|
|
entityId: calculatedField.id, |
|
|
debugEventTypes:[DebugEventType.DEBUG_CALCULATED_FIELD], |
|
|
debugEventTypes:[DebugEventType.DEBUG_CALCULATED_FIELD], |
|
|
disabledEventTypes:[EventType.LC_EVENT, EventType.ERROR, EventType.STATS], |
|
|
disabledEventTypes:[EventType.LC_EVENT, EventType.ERROR, EventType.STATS], |
|
|
defaultEventType: DebugEventType.DEBUG_CALCULATED_FIELD, |
|
|
defaultEventType: DebugEventType.DEBUG_CALCULATED_FIELD, |
|
|
onDebugEventSelected: null, |
|
|
debugActionEnabledFn: () => false |
|
|
customCellActionEnabledFn: customCellActionEnabledFn |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.afterClosed() |
|
|
.afterClosed() |
|
|
|