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

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new eaff2a96e7 fix: Properly delete pipeline templates from canvas (#3309)
eaff2a96e7 is described below

commit eaff2a96e75fa48d24f58359362e9c454b0fb476
Author: Dominik Riemer <[email protected]>
AuthorDate: Tue Oct 29 07:41:00 2024 +0100

    fix: Properly delete pipeline templates from canvas (#3309)
---
 .../pipeline-assembly-options.component.html                          | 2 +-
 .../pipeline-assembly-options/pipeline-assembly-options.component.ts  | 1 +
 .../components/pipeline-assembly/pipeline-assembly.component.ts       | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly-options/pipeline-assembly-options.component.html
 
b/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly-options/pipeline-assembly-options.component.html
index f15c990c06..5836187826 100644
--- 
a/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly-options/pipeline-assembly-options.component.html
+++ 
b/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly-options/pipeline-assembly-options.component.html
@@ -38,7 +38,7 @@
         mat-button
         color="accent"
         matTooltip="Data Preview"
-        [matTooltipPosition]="'above'"
+        matTooltipPosition="above"
         (click)="togglePreviewEmitter.emit()"
         [disabled]="isPipelineAssemblyEmpty()"
     >
diff --git 
a/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly-options/pipeline-assembly-options.component.ts
 
b/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly-options/pipeline-assembly-options.component.ts
index 7c0b17e8b6..8169337736 100644
--- 
a/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly-options/pipeline-assembly-options.component.ts
+++ 
b/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly-options/pipeline-assembly-options.component.ts
@@ -147,6 +147,7 @@ export class PipelineAssemblyOptionsComponent {
 
     isPipelineAssemblyEmpty() {
         return (
+            this.rawPipelineModel === undefined ||
             this.rawPipelineModel.length === 0 ||
             this.rawPipelineModel.every(pe => pe.settings.disabled)
         );
diff --git 
a/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.component.ts 
b/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.component.ts
index 84eb67c593..231344d095 100644
--- 
a/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.component.ts
+++ 
b/ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.component.ts
@@ -92,8 +92,8 @@ export class PipelineAssemblyComponent implements 
AfterViewInit {
      */
     clearAssembly() {
         this.editorService.makePipelineAssemblyEmpty(true);
-        this.JsplumbBridge.deleteEveryEndpoint();
         this.rawPipelineModel = [];
+        this.JsplumbBridge.deleteEveryEndpoint();
         this.drawingAreaComponent.resetZoom();
         this.JsplumbBridge.repaintEverything();
 
@@ -157,7 +157,7 @@ export class PipelineAssemblyComponent implements 
AfterViewInit {
 
     displayPipelineTemplate(pipeline: Pipeline) {
         this.originalPipeline = pipeline;
-        this.rawPipelineModel = undefined;
+        this.rawPipelineModel = [];
         setTimeout(() => {
             this.rawPipelineModel = this.jsplumbService.makeRawPipeline(
                 pipeline,

Reply via email to