This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch 
4287-migrate-angular-ui-from-constructor-injection-to-inject
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit caedf02bc53ded49946c3a1cee04b2bf23a0b764
Author: Philipp Zehnder <[email protected]>
AuthorDate: Tue Mar 24 10:02:01 2026 +0100

    migrate pipelines UI to inject()
---
 .../functions-overview/functions-overview.component.ts        |  6 +++---
 .../pipeline-notifications.component.ts                       | 11 +++++------
 ui/src/app/pipelines/services/pipeline-operations.service.ts  | 10 ++++------
 3 files changed, 12 insertions(+), 15 deletions(-)

diff --git 
a/ui/src/app/pipelines/components/functions-overview/functions-overview.component.ts
 
b/ui/src/app/pipelines/components/functions-overview/functions-overview.component.ts
index 4145f9dbe3..b5eb2a8cc3 100644
--- 
a/ui/src/app/pipelines/components/functions-overview/functions-overview.component.ts
+++ 
b/ui/src/app/pipelines/components/functions-overview/functions-overview.component.ts
@@ -16,7 +16,7 @@
  *
  */
 
-import { Component, Input, OnInit } from '@angular/core';
+import { Component, Input, OnInit, inject } from '@angular/core';
 import { FunctionId } from '@streampipes/platform-services';
 import {
     MatCell,
@@ -56,6 +56,8 @@ import { MatTooltip } from '@angular/material/tooltip';
     ],
 })
 export class FunctionsOverviewComponent implements OnInit {
+    private router = inject(Router);
+
     @Input()
     functions: FunctionId[] = [];
 
@@ -63,8 +65,6 @@ export class FunctionsOverviewComponent implements OnInit {
 
     displayedColumns: string[] = ['name', 'action'];
 
-    constructor(private router: Router) {}
-
     ngOnInit(): void {
         this.dataSource = new MatTableDataSource<FunctionId>();
         this.dataSource.data = this.functions;
diff --git 
a/ui/src/app/pipelines/dialog/pipeline-notifications/pipeline-notifications.component.ts
 
b/ui/src/app/pipelines/dialog/pipeline-notifications/pipeline-notifications.component.ts
index 6408805a36..1e9ffb94ee 100644
--- 
a/ui/src/app/pipelines/dialog/pipeline-notifications/pipeline-notifications.component.ts
+++ 
b/ui/src/app/pipelines/dialog/pipeline-notifications/pipeline-notifications.component.ts
@@ -18,7 +18,7 @@
 
 import { DialogRef } from '@streampipes/shared-ui';
 import { Pipeline, PipelineService } from '@streampipes/platform-services';
-import { Component, Input } from '@angular/core';
+import { Component, Input, inject } from '@angular/core';
 import { FlexDirective, LayoutDirective } from '@ngbracket/ngx-layout/flex';
 import { MatDivider } from '@angular/material/divider';
 import { MatButton } from '@angular/material/button';
@@ -37,14 +37,13 @@ import { TranslatePipe } from '@ngx-translate/core';
     ],
 })
 export class PipelineNotificationsComponent {
+    private dialogRef =
+        inject<DialogRef<PipelineNotificationsComponent>>(DialogRef);
+    private pipelineService = inject(PipelineService);
+
     @Input()
     pipeline: Pipeline;
 
-    constructor(
-        private dialogRef: DialogRef<PipelineNotificationsComponent>,
-        private pipelineService: PipelineService,
-    ) {}
-
     acknowledgeAndClose() {
         this.pipeline.pipelineNotifications = [];
         if (this.pipeline.healthStatus === 'REQUIRES_ATTENTION') {
diff --git a/ui/src/app/pipelines/services/pipeline-operations.service.ts 
b/ui/src/app/pipelines/services/pipeline-operations.service.ts
index 19103f1cc8..ef6c64f037 100644
--- a/ui/src/app/pipelines/services/pipeline-operations.service.ts
+++ b/ui/src/app/pipelines/services/pipeline-operations.service.ts
@@ -16,7 +16,7 @@
  *
  */
 
-import { EventEmitter, Injectable } from '@angular/core';
+import { EventEmitter, Injectable, inject } from '@angular/core';
 import { Pipeline } from '@streampipes/platform-services';
 import {
     PanelType,
@@ -32,14 +32,12 @@ import { PipelineNotificationsComponent } from 
'../dialog/pipeline-notifications
 
 @Injectable({ providedIn: 'root' })
 export class PipelineOperationsService {
+    private dialogService = inject(DialogService);
+    private router = inject(Router);
+
     starting: any;
     stopping: any;
 
-    constructor(
-        private dialogService: DialogService,
-        private router: Router,
-    ) {}
-
     startPipeline(
         pipelineId: string,
         refreshPipelinesEmitter: EventEmitter<boolean>,

Reply via email to