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/13 20:03:17 UTC

[incubator-streampipes] branch rel/0.67.0 updated: [STREAMPIPES-145] Add update emitter to mapping properties

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


The following commit(s) were added to refs/heads/rel/0.67.0 by this push:
     new 64c495e  [STREAMPIPES-145] Add update emitter to mapping properties
     new 70eb5d0  Merge branch 'rel/0.67.0' of github.com:apache/incubator-streampipes into rel/0.67.0
64c495e is described below

commit 64c495e00ea5a4651a8140f5380df0a93af098a1
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sun Sep 13 22:02:46 2020 +0200

    [STREAMPIPES-145] Add update emitter to mapping properties
---
 .../static-mapping-nary/static-mapping-nary.component.ts       |  1 +
 .../static-mapping-unary/static-mapping-unary.component.ts     |  4 ++--
 .../core-ui/static-properties/static-mapping/static-mapping.ts |  5 +++++
 .../core-ui/static-properties/static-property.component.html   | 10 +++++++---
 4 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ui/src/app/core-ui/static-properties/static-mapping-nary/static-mapping-nary.component.ts b/ui/src/app/core-ui/static-properties/static-mapping-nary/static-mapping-nary.component.ts
index 7f2d4b3..9103ab4 100644
--- a/ui/src/app/core-ui/static-properties/static-mapping-nary/static-mapping-nary.component.ts
+++ b/ui/src/app/core-ui/static-properties/static-mapping-nary/static-mapping-nary.component.ts
@@ -92,6 +92,7 @@ export class StaticMappingNaryComponent extends StaticMappingComponent<MappingPr
     }
 
     onValueChange(value: any) {
+        this.emitUpdate();
     }
 
 }
\ No newline at end of file
diff --git a/ui/src/app/core-ui/static-properties/static-mapping-unary/static-mapping-unary.component.ts b/ui/src/app/core-ui/static-properties/static-mapping-unary/static-mapping-unary.component.ts
index 1467c32..e885972 100644
--- a/ui/src/app/core-ui/static-properties/static-mapping-unary/static-mapping-unary.component.ts
+++ b/ui/src/app/core-ui/static-properties/static-mapping-unary/static-mapping-unary.component.ts
@@ -22,6 +22,7 @@ import {StaticPropertyUtilService} from '../static-property-util.service';
 import {PropertySelectorService} from "../../../services/property-selector.service";
 import {StaticMappingComponent} from "../static-mapping/static-mapping";
 import {MappingPropertyUnary} from "../../../core-model/gen/streampipes-model";
+import {ConfigurationInfo} from "../../../connect/model/ConfigurationInfo";
 
 
 @Component({
@@ -56,8 +57,7 @@ export class StaticMappingUnaryComponent extends StaticMappingComponent<MappingP
 
     onValueChange(value: any) {
         this.staticProperty.selectedProperty = value;
+        this.emitUpdate();
     }
 
-
-
 }
\ No newline at end of file
diff --git a/ui/src/app/core-ui/static-properties/static-mapping/static-mapping.ts b/ui/src/app/core-ui/static-properties/static-mapping/static-mapping.ts
index e61f549..e131802 100644
--- a/ui/src/app/core-ui/static-properties/static-mapping/static-mapping.ts
+++ b/ui/src/app/core-ui/static-properties/static-mapping/static-mapping.ts
@@ -28,6 +28,7 @@ import {
 } from "../../../core-model/gen/streampipes-model";
 import {AbstractValidatedStaticPropertyRenderer} from "../base/abstract-validated-static-property";
 import {Directive} from "@angular/core";
+import {ConfigurationInfo} from "../../../connect/model/ConfigurationInfo";
 
 
 @Directive()
@@ -74,4 +75,8 @@ export abstract class StaticMappingComponent<T extends MappingProperty>
             return EventPropertyNested.fromData(ep, new EventPropertyNested());
         }
     }
+
+    emitUpdate() {
+        this.updateEmitter.emit(new ConfigurationInfo(this.staticProperty.internalName, true));
+    }
 }
\ No newline at end of file
diff --git a/ui/src/app/core-ui/static-properties/static-property.component.html b/ui/src/app/core-ui/static-properties/static-property.component.html
index b322869..c375533 100644
--- a/ui/src/app/core-ui/static-properties/static-property.component.html
+++ b/ui/src/app/core-ui/static-properties/static-property.component.html
@@ -48,7 +48,9 @@
             </app-static-free-input>
 
             <app-static-file-input *ngIf="isFileStaticProperty(staticProperty)"
-                                   (inputEmitter)="valueChange($event)" [staticProperty]="staticProperty"
+                                   (inputEmitter)="valueChange($event)"
+                                   [staticProperty]="staticProperty"
+                                   (updateEmitter)="emitUpdate($event)"
                                    [adapterId]="adapterId">
             </app-static-file-input>
 
@@ -93,7 +95,8 @@
                                       [displayRecommended]="displayRecommended"
                                       [parentForm]="parentForm"
                                       [fieldName]="fieldName"
-                                      (inputEmitter)="valueChange($event)">
+                                      (inputEmitter)="valueChange($event)"
+                                      (updateEmitter)="emitUpdate($event)">
             </app-static-mapping-unary>
 
             <app-static-mapping-nary *ngIf="isMappingNaryProperty(staticProperty)"
@@ -102,7 +105,8 @@
                                      [fieldName]="fieldName"
                                      [staticProperty]="staticProperty"
                                      [displayRecommended]="displayRecommended"
-                                     (inputEmitter)="valueChange($event)">
+                                     (inputEmitter)="valueChange($event)"
+                                     (updateEmitter)="emitUpdate($event)">
             </app-static-mapping-nary>
 
             <app-static-alternatives *ngIf="isAlternativesStaticProperty(staticProperty)"