diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/rule-node-debug-dialog.component.html b/ui-ngx/src/app/modules/home/components/event/events-dialog.component.html similarity index 89% rename from ui-ngx/src/app/modules/home/pages/rulechain/rule-node-debug-dialog.component.html rename to ui-ngx/src/app/modules/home/components/event/events-dialog.component.html index b2bd40aa1a..65040bcf60 100644 --- a/ui-ngx/src/app/modules/home/pages/rulechain/rule-node-debug-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/event/events-dialog.component.html @@ -17,7 +17,7 @@ -->
-

{{ 'rulenode.events' | translate}}

+

{{ data.title | translate}}

diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/rule-node-debug-dialog.component.scss b/ui-ngx/src/app/modules/home/components/event/events-dialog.component.scss similarity index 100% rename from ui-ngx/src/app/modules/home/pages/rulechain/rule-node-debug-dialog.component.scss rename to ui-ngx/src/app/modules/home/components/event/events-dialog.component.scss diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/rule-node-debug-dialog.component.ts b/ui-ngx/src/app/modules/home/components/event/events-dialog.component.ts similarity index 78% rename from ui-ngx/src/app/modules/home/pages/rulechain/rule-node-debug-dialog.component.ts rename to ui-ngx/src/app/modules/home/components/event/events-dialog.component.ts index e7a7947009..5a21241868 100644 --- a/ui-ngx/src/app/modules/home/pages/rulechain/rule-node-debug-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/event/events-dialog.component.ts @@ -26,32 +26,29 @@ import { TenantId } from '@shared/models/id/tenant-id'; import { EntityId } from '@shared/models/id/entity-id'; export interface RuleNodeDebugDialogData { - isActive: boolean; + title: string; tenantId: TenantId; - ruleNodeId: EntityId; - ruleNodeTestButtonLabel: string; + entityId: EntityId; + functionTestButtonLabel: string; onDebugEventSelected: ()=> void; } @Component({ - selector: 'tb-rule-node-debug-dialog', - templateUrl: './rule-node-debug-dialog.component.html', - styleUrl: './rule-node-debug-dialog.component.scss' + selector: 'tb-debug-dialog', + templateUrl: './events-dialog.component.html', + styleUrl: './events-dialog.component.scss' }) -export class RuleNodeDebugDialogComponent extends DialogComponent implements AfterViewInit{ +export class EventsDialogComponent extends DialogComponent implements AfterViewInit{ @ViewChild(EventTableComponent, {static: true}) eventsTable: EventTableComponent; - readonly DebugEventType = DebugEventType; readonly debugEventTypes = DebugEventType; readonly EventType = EventType; - dialogTitle: string; - constructor(protected store: Store, protected router: Router, @Inject(MAT_DIALOG_DATA) public data: RuleNodeDebugDialogData, - protected dialogRef: MatDialogRef) { + protected dialogRef: MatDialogRef) { super(store, router, dialogRef); } diff --git a/ui-ngx/src/app/modules/home/components/home-components.module.ts b/ui-ngx/src/app/modules/home/components/home-components.module.ts index 6da26fb2c3..8a90c28878 100644 --- a/ui-ngx/src/app/modules/home/components/home-components.module.ts +++ b/ui-ngx/src/app/modules/home/components/home-components.module.ts @@ -204,6 +204,7 @@ import { EditApiKeyDescriptionPanelComponent } from '@home/components/api-key/ed import { ApiKeyGeneratedDialogComponent } from '@home/components/api-key/api-key-generated-dialog.component'; import { ApiKeysTableDialogComponent } from '@home/components/api-key/api-keys-table-dialog.component'; import { AuditLogFilterComponent } from "@home/components/audit-log/audit-log-filter.component"; +import { EventsDialogComponent } from '@home/components/event/events-dialog.component'; @NgModule({ declarations: @@ -361,7 +362,8 @@ import { AuditLogFilterComponent } from "@home/components/audit-log/audit-log-fi EditApiKeyDescriptionPanelComponent, ApiKeyGeneratedDialogComponent, AuditLogHeaderComponent, - AuditLogFilterComponent + AuditLogFilterComponent, + EventsDialogComponent ], imports: [ CommonModule, @@ -510,6 +512,7 @@ import { AuditLogFilterComponent } from "@home/components/audit-log/audit-log-fi ResourcesLibraryComponent, ApiKeysTableComponent, ApiKeysTableDialogComponent, + EventsDialogComponent ], providers: [ WidgetComponentService, diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts b/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts index 53e2563ee2..3123719f22 100644 --- a/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts +++ b/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts @@ -100,7 +100,7 @@ import { EntityDebugSettings } from '@shared/models/entity.models'; import Timeout = NodeJS.Timeout; import { DomSanitizer } from '@angular/platform-browser'; import { AdditionalDebugActionConfig } from '@home/components/entity/debug/entity-debug-settings.model'; -import { RuleNodeDebugDialogComponent } from '@home/pages/rulechain/rule-node-debug-dialog.component'; +import { EventsDialogComponent } from '@home/components/event/events-dialog.component'; @Component({ selector: 'tb-rulechain-page', @@ -1674,13 +1674,13 @@ export class RuleChainPageComponent extends PageComponent } private openDebugEventsDialog(): void { - this.dialog.open(RuleNodeDebugDialogComponent, { + this.dialog.open(EventsDialogComponent, { disableClose: true, panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], data: { - active: true, + title: 'rulenode.events', tenantId: this.ruleChain.tenantId, - ruleNodeId: this.editingRuleNode.ruleNodeId, + entityId: this.editingRuleNode.ruleNodeId, functionTestButtonLabel: this.ruleNodeTestButtonLabel, debugEventSelected: this.onDebugEventSelected.bind(this) } diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.module.ts b/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.module.ts index 51197e1073..34518e2b70 100644 --- a/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.module.ts +++ b/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.module.ts @@ -33,7 +33,6 @@ import { RuleNodeDetailsComponent } from '@home/pages/rulechain/rule-node-detail import { RuleNodeConfigComponent } from '@home/pages/rulechain/rule-node-config.component'; import { LinkLabelsComponent } from '@home/pages/rulechain/link-labels.component'; import { RuleNodeLinkComponent } from '@home/pages/rulechain/rule-node-link.component'; -import { RuleNodeDebugDialogComponent } from '@home/pages/rulechain/rule-node-debug-dialog.component'; @NgModule({ declarations: [ @@ -44,8 +43,7 @@ import { RuleNodeDebugDialogComponent } from '@home/pages/rulechain/rule-node-de RuleNodeConfigComponent, AddRuleNodeLinkDialogComponent, AddRuleNodeDialogComponent, - CreateNestedRuleChainDialogComponent, - RuleNodeDebugDialogComponent + CreateNestedRuleChainDialogComponent ], imports: [ CommonModule,