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/incubator-streampipes.git

commit 5dcd9ef2d8f752349c2a47995e9fc85d373e3c52
Author: Dominik Riemer <[email protected]>
AuthorDate: Mon May 24 12:13:48 2021 +0200

    [hotfix] Do not change original pipeline name in save dialog
---
 .../editor/dialog/save-pipeline/save-pipeline.component.html  |  4 ++--
 .../editor/dialog/save-pipeline/save-pipeline.component.ts    | 11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git 
a/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.html 
b/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.html
index 5065423..4599345 100644
--- a/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.html
+++ b/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.html
@@ -23,7 +23,7 @@
                 <div id="overwriteCheckbox" class="checkbox" 
*ngIf="currentModifiedPipelineId">
                     <mat-radio-group [(ngModel)]="updateMode" 
fxLayout="column" color="primary" class="pipeline-radio-group">
                         <mat-radio-button [value]="'update'" class="mb-10" 
style="padding-left: 0;">
-                            Update pipeline <b>{{pipeline.name}}</b>
+                            Update pipeline <b>{{currentPipelineName}}</b>
                         </mat-radio-button>
                         <mat-radio-button [value]="'clone'" class="mb-10">
                             Create new pipeline
@@ -74,4 +74,4 @@
             {{saved ? 'Close' : 'Cancel'}}
         </button>
     </div>
-</div>
\ No newline at end of file
+</div>
diff --git a/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.ts 
b/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.ts
index b9cef48..5660ba1 100644
--- a/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.ts
+++ b/ui/src/app/editor/dialog/save-pipeline/save-pipeline.component.ts
@@ -54,6 +54,8 @@ export class SavePipelineComponent implements OnInit {
   storageError: boolean = false;
   errorMessage: string = '';
 
+ currentPipelineName: string;
+
   constructor(private editorService: EditorService,
               private dialogRef: DialogRef<SavePipelineComponent>,
               private objectProvider: ObjectProvider,
@@ -66,6 +68,10 @@ export class SavePipelineComponent implements OnInit {
 
   ngOnInit() {
     this.getPipelineCategories();
+    if (this.currentModifiedPipelineId) {
+      this.currentPipelineName = this.pipeline.name;
+    }
+
     this.submitPipelineForm.addControl("pipelineName", new 
FormControl(this.pipeline.name,
         [Validators.required,
           Validators.maxLength(40)]))
@@ -105,11 +111,6 @@ export class SavePipelineComponent implements OnInit {
 
 
   savePipeline(switchTab) {
-    if (this.pipeline.name == "") {
-      //this.showToast("error", "Please enter a name for your pipeline");
-      return false;
-    }
-
     let storageRequest;
 
     if (this.currentModifiedPipelineId && this.updateMode === 'update') {

Reply via email to