This is an automated email from the ASF dual-hosted git repository.
wiener pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 939bd98 [hotfix] modify SDK for alternatives, remove duplicates in
static free text property, remove option overwriting in init
new 5599765 Merge branch 'dev' of
https://github.com/apache/incubator-streampipes into dev
939bd98 is described below
commit 939bd987ac48e008df0cac25b5bd77b61154225c
Author: Patrick Wiener <[email protected]>
AuthorDate: Sun Feb 14 09:51:41 2021 +0100
[hotfix] modify SDK for alternatives, remove duplicates in static free text
property, remove option overwriting in init
---
.../org/apache/streampipes/sdk/helpers/Alternatives.java | 15 +++++++++++++++
.../static-any-input/static-any-input.component.ts | 3 ---
.../static-free-input/static-free-input.component.html | 1 -
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git
a/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/helpers/Alternatives.java
b/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/helpers/Alternatives.java
index 198e79f..9c6fd4b 100644
---
a/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/helpers/Alternatives.java
+++
b/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/helpers/Alternatives.java
@@ -19,6 +19,7 @@ package org.apache.streampipes.sdk.helpers;
import org.apache.streampipes.model.staticproperty.StaticProperty;
import org.apache.streampipes.model.staticproperty.StaticPropertyAlternative;
+import org.apache.streampipes.model.staticproperty.StaticPropertyGroup;
public class Alternatives {
@@ -28,10 +29,24 @@ public class Alternatives {
return alternative;
}
+ public static StaticPropertyAlternative from(Label label, StaticProperty
staticProperty, boolean selected) {
+ StaticPropertyAlternative alternative = from(label, selected);
+ alternative.setStaticProperty(staticProperty);;
+ return alternative;
+ }
+
public static StaticPropertyAlternative from(Label label) {
StaticPropertyAlternative alternative = new
StaticPropertyAlternative(label.getInternalId(),
label.getLabel(), label.getInternalId());
alternative.setIndex(0);
return alternative;
}
+
+ public static StaticPropertyAlternative from(Label label, boolean selected) {
+ StaticPropertyAlternative alternative = new
StaticPropertyAlternative(label.getInternalId(),
+ label.getLabel(), label.getInternalId());
+ alternative.setIndex(0);
+ alternative.setSelected(selected);
+ return alternative;
+ }
}
diff --git
a/ui/src/app/core-ui/static-properties/static-any-input/static-any-input.component.ts
b/ui/src/app/core-ui/static-properties/static-any-input/static-any-input.component.ts
index 3c9da80..8abd8de 100644
---
a/ui/src/app/core-ui/static-properties/static-any-input/static-any-input.component.ts
+++
b/ui/src/app/core-ui/static-properties/static-any-input/static-any-input.component.ts
@@ -31,9 +31,6 @@ export class StaticAnyInput extends
AbstractStaticPropertyRenderer<AnyStaticProp
ngOnInit() {
- for (let option of this.staticProperty.options) {
- option.selected = false;
- }
this.inputEmitter.emit(true);
}
diff --git
a/ui/src/app/core-ui/static-properties/static-free-input/static-free-input.component.html
b/ui/src/app/core-ui/static-properties/static-free-input/static-free-input.component.html
index 1b9cc72..b8ff16b 100644
---
a/ui/src/app/core-ui/static-properties/static-free-input/static-free-input.component.html
+++
b/ui/src/app/core-ui/static-properties/static-free-input/static-free-input.component.html
@@ -23,7 +23,6 @@
matInput
[placeholder]="staticProperty.label"
required (blur)="emitUpdate()">
- <mat-hint>{{staticProperty.description}}</mat-hint>
<mat-error *ngIf="!fieldValid">
{{errorMessage}}