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/09/26 19:04:39 UTC

[incubator-streampipes] branch rel/0.67.0 updated (df11e26 -> f660c59)

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

riemer pushed a change to branch rel/0.67.0
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git.


    from df11e26  [maven-release-plugin] prepare for next development iteration
     new 2c8f657  [STREAMPIPES-247] Fix bug that caused alternative static properties to be validated incorrectly
     new f660c59  [hotfix] Properly reload pipeline element recommendations

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../static-alternatives.component.html             |  4 +++-
 .../static-alternatives.component.ts               |  1 -
 .../pipeline-element-recommendation.component.ts   | 26 ++++++++++++++--------
 3 files changed, 20 insertions(+), 11 deletions(-)


[incubator-streampipes] 02/02: [hotfix] Properly reload pipeline element recommendations

Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f660c591d3aaf3cd4dcca1cb35e8ffc719a48e81
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sat Sep 26 10:50:43 2020 +0200

    [hotfix] Properly reload pipeline element recommendations
---
 .../pipeline-element-recommendation.component.ts   | 26 ++++++++++++++--------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/ui/src/app/editor/components/pipeline-element-recommendation/pipeline-element-recommendation.component.ts b/ui/src/app/editor/components/pipeline-element-recommendation/pipeline-element-recommendation.component.ts
index 61ca035..2799c44 100644
--- a/ui/src/app/editor/components/pipeline-element-recommendation/pipeline-element-recommendation.component.ts
+++ b/ui/src/app/editor/components/pipeline-element-recommendation/pipeline-element-recommendation.component.ts
@@ -38,8 +38,7 @@ export class PipelineElementRecommendationComponent implements OnInit, AfterView
   @Input()
   pipelineElementDomId: string;
 
-  @Input()
-  recommendedElements: any;
+  _recommendedElements: any;
 
   recommendationsPrepared: boolean = false;
 
@@ -49,9 +48,6 @@ export class PipelineElementRecommendationComponent implements OnInit, AfterView
   }
 
   ngOnInit() {
-    this.fillRemainingItems();
-    this.prepareStyles(this.recommendedElements);
-    this.recommendationsPrepared = true;
   }
 
   ngAfterViewInit(): void {
@@ -136,12 +132,24 @@ export class PipelineElementRecommendationComponent implements OnInit, AfterView
     return (360 / recommendedElements.length);
   }
 
-  fillRemainingItems() {
-    if (this.recommendedElements.length < 6) {
-      for (var i = this.recommendedElements.length; i < 6; i++) {
+  fillRemainingItems(recommendedElements) {
+    if (recommendedElements.length < 6) {
+      for (var i = recommendedElements.length; i < 6; i++) {
         let element = {fakeElement: true, weight: 0};
-        this.recommendedElements.push(element);
+        recommendedElements.push(element);
       }
     }
   }
+
+  get recommendedElements() {
+    return this._recommendedElements;
+  }
+
+  @Input()
+  set recommendedElements(recommendedElements: any) {
+    this.fillRemainingItems(recommendedElements);
+    this.prepareStyles(recommendedElements);
+    this._recommendedElements = recommendedElements;
+    this.recommendationsPrepared = true;
+  }
 }
\ No newline at end of file


[incubator-streampipes] 01/02: [STREAMPIPES-247] Fix bug that caused alternative static properties to be validated incorrectly

Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 2c8f657ac42183147953b596221b3cffb9e5a89e
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sat Sep 26 10:50:19 2020 +0200

    [STREAMPIPES-247] Fix bug that caused alternative static properties to be validated incorrectly
---
 .../static-alternatives/static-alternatives.component.html            | 4 +++-
 .../static-alternatives/static-alternatives.component.ts              | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.html b/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.html
index f79921f..cf6e2c7 100644
--- a/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.html
+++ b/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.html
@@ -37,13 +37,15 @@
 
         </div>
 
-        <div *ngFor="let alternative of staticProperty.alternatives">
+        <div *ngFor="let alternative of staticProperty.alternatives; let i = index">
             <div *ngIf="alternative.selected == true && alternative.staticProperty != null">
                 <div style="padding-top: 0px; padding-bottom: 0px;
                                                    padding-left: 10px; padding-right: 10px">
                     <app-static-property [adapterId]="adapterId"
                                          [eventSchemas]="eventSchemas"
                                          [parentForm]="parentForm"
+                                         [staticProperties]="staticProperties"
+                                         [fieldName]="fieldName + '-'  + alternative.staticProperty.internalName + '-' + i"
                                          [staticProperty]="alternative.staticProperty"
                                          [displayRecommended]="displayRecommended"
                                          (validateEmitter)="valueChange($event)"
diff --git a/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.ts b/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.ts
index e6599b8..7eeb0c1 100644
--- a/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.ts
+++ b/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.ts
@@ -38,7 +38,6 @@ export class StaticAlternativesComponent
     }
 
     ngOnInit(): void {
-        this.staticProperty.alternatives.forEach( alternative => alternative.selected = false);
     }
 
     radioSelectionChange(event) {