This is an automated email from the ASF dual-hosted git repository. riemer pushed a commit to branch fix-template-deletion in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 93751ec82b4027d60fc322c4576d17cf1c906e56 Author: Dominik Riemer <[email protected]> AuthorDate: Fri Oct 25 10:59:47 2024 +0200 fix: Properly delete pipeline templates from canvas --- .../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,
