You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2020/06/08 08:59:10 UTC

[incubator-streampipes] 01/02: [STREAMPIPES-145] Add customize option in pipeline-element-options

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

riemer pushed a commit to branch STREAMPIPES-145
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 45df2efc336390d50f651131cabe29e143a68705
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sun Jun 7 23:10:57 2020 +0200

    [STREAMPIPES-145] Add customize option in pipeline-element-options
---
 .../pipeline-element-options.component.html                       | 2 +-
 .../pipeline-element-options.component.ts                         | 8 +++++++-
 ui/src/app/editor-v2/components/pipeline/pipeline.component.html  | 1 +
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ui/src/app/editor-v2/components/pipeline-element-options/pipeline-element-options.component.html b/ui/src/app/editor-v2/components/pipeline-element-options/pipeline-element-options.component.html
index cc33aa9..c48a6a3 100644
--- a/ui/src/app/editor-v2/components/pipeline-element-options/pipeline-element-options.component.html
+++ b/ui/src/app/editor-v2/components/pipeline-element-options/pipeline-element-options.component.html
@@ -19,7 +19,7 @@
 <div *ngIf="currentMouseOverElement==pipelineElement.payload.dom" class="sp-fade-options">
     <span class="options-button customize-button" *ngIf="pipelineElement.type!='stream'" style="z-index:10">
         <button mat-button mat-icon-button matTooltip="Configure Element" [matTooltipPosition]="'above'"
-                (click)="openCustomizeDialog()">
+                (click)="customizeElement(pipelineElement)">
             <i class="material-icons">settings</i>
             </button>
     </span>
diff --git a/ui/src/app/editor-v2/components/pipeline-element-options/pipeline-element-options.component.ts b/ui/src/app/editor-v2/components/pipeline-element-options/pipeline-element-options.component.ts
index 0c6ca01..876c58b 100644
--- a/ui/src/app/editor-v2/components/pipeline-element-options/pipeline-element-options.component.ts
+++ b/ui/src/app/editor-v2/components/pipeline-element-options/pipeline-element-options.component.ts
@@ -69,6 +69,9 @@ export class PipelineElementOptionsComponent implements OnInit{
   @Output()
   delete: EventEmitter<PipelineElementConfig> = new EventEmitter<PipelineElementConfig>();
 
+  @Output()
+  customize: EventEmitter<PipelineElementConfig> = new EventEmitter<PipelineElementConfig>();
+
   constructor(private ObjectProvider: ObjectProvider,
               private PipelineElementRecommendationService: PipelineElementRecommendationService,
               //private InitTooltips: InitTooltips,
@@ -101,10 +104,13 @@ export class PipelineElementOptionsComponent implements OnInit{
     }
   }
 
-  removeElement(pipelineElement) {
+  removeElement(pipelineElement: PipelineElementConfig) {
     this.delete.emit(pipelineElement);
     //this.$rootScope.$broadcast("pipeline.validate");
+  }
 
+  customizeElement(pipelineElement: PipelineElementConfig) {
+    this.customize.emit(pipelineElement);
   }
 
   openCustomizeDialog() {
diff --git a/ui/src/app/editor-v2/components/pipeline/pipeline.component.html b/ui/src/app/editor-v2/components/pipeline/pipeline.component.html
index 634fd82..5a7cdbc 100644
--- a/ui/src/app/editor-v2/components/pipeline/pipeline.component.html
+++ b/ui/src/app/editor-v2/components/pipeline/pipeline.component.html
@@ -34,6 +34,7 @@
             <pipeline-element [pipelineElement]="pipelineElement.payload" [preview]="preview"></pipeline-element>
         </span>
          <pipeline-element-options *ngIf="!preview" (delete)="handleDeleteOption($event)"
+                                   (customize)="showCustomizeDialog($event)"
                                    [currentMouseOverElement]="currentMouseOverElement"
                                    [pipelineValid]="pipelineValid"
                                    [allElements]="allElements"