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 2022/01/19 19:58:41 UTC

[incubator-streampipes] branch dev updated (0d9a470 -> 131f6dc)

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

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


    from 0d9a470  [hotfix] Add cypress attribute to slider input
     new 8181a39  [hotfix] Improve count aggregation
     new 99082e6  [hotfix] Show default properties if none match recommended filter
     new 131f6dc  [test] Add test for count aggregation

The 3 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:
 .../processors/siddhi/count/CountAggregation.java   | 11 +++++++----
 .../strings.en                                      |  2 +-
 .../siddhi/engine/generator/EventTypeGenerator.java | 20 ++++++++++++++++++--
 .../siddhi/engine/generator/SiddhiAppGenerator.java | 12 ++++--------
 .../generator/SiddhiInvocationConfigGenerator.java  |  5 +++--
 .../wrapper/siddhi/model/EventPropertyDef.java      | 10 ++++++++--
 .../wrapper/siddhi/model/SiddhiProcessorParams.java | 14 +++++++++++++-
 .../filters-siddhi/count1/description.json          | 21 +++++++++++++++++++++
 .../filters-siddhi/count1/expected.csv              |  4 ++++
 .../pipelineElement/filters-siddhi/count1/input.csv |  4 ++++
 ui/cypress/support/model/PipelineElementInput.ts    |  1 +
 ui/cypress/support/utils/DataLakeUtils.ts           |  4 ++--
 .../support/utils/ProcessingElementTestUtils.ts     |  2 +-
 .../tests/pipelineElement/SinglePipelineElement.ts  |  2 +-
 .../filter/display-recommended.pipe.ts              | 17 +++++++++--------
 .../static-mapping-unary.component.html             |  1 -
 16 files changed, 97 insertions(+), 33 deletions(-)
 create mode 100644 ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/description.json
 create mode 100644 ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/expected.csv
 create mode 100644 ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/input.csv

[incubator-streampipes] 03/03: [test] Add test for count aggregation

Posted by ri...@apache.org.
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 131f6dceadca2c99ecde57e6b63dcb39f4c66223
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Wed Jan 19 20:58:28 2022 +0100

    [test] Add test for count aggregation
---
 .../filters-siddhi/count1/description.json          | 21 +++++++++++++++++++++
 .../filters-siddhi/count1/expected.csv              |  4 ++++
 .../pipelineElement/filters-siddhi/count1/input.csv |  4 ++++
 ui/cypress/support/model/PipelineElementInput.ts    |  1 +
 ui/cypress/support/utils/DataLakeUtils.ts           |  4 ++--
 .../support/utils/ProcessingElementTestUtils.ts     |  2 +-
 .../tests/pipelineElement/SinglePipelineElement.ts  |  2 +-
 7 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/description.json b/ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/description.json
new file mode 100644
index 0000000..8c17a38
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/description.json
@@ -0,0 +1,21 @@
+{
+  "name": "count_value_occurrence",
+  "ignoreTimestamp": true,
+  "config": [
+    {
+      "type": "drop-down",
+      "selector": "count-mapping",
+      "value": "text"
+    },
+    {
+      "type": "radio",
+      "selector": "scale",
+      "value": "Seconds"
+    },
+    {
+      "type": "input",
+      "selector": "time-window",
+      "value": "10"
+    }
+  ]
+}
diff --git a/ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/expected.csv b/ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/expected.csv
new file mode 100644
index 0000000..8dba7c6
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/expected.csv
@@ -0,0 +1,4 @@
+time;count;value
+1623871499055;1.0;hello
+1623871503078;1.0;world
+1623871503079;2.0;hello
diff --git a/ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/input.csv b/ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/input.csv
new file mode 100644
index 0000000..a9b2ad7
--- /dev/null
+++ b/ui/cypress/fixtures/pipelineElement/filters-siddhi/count1/input.csv
@@ -0,0 +1,4 @@
+timestamp;text
+1623871499055;hello
+1623871503078;world
+1623871503079;hello
diff --git a/ui/cypress/support/model/PipelineElementInput.ts b/ui/cypress/support/model/PipelineElementInput.ts
index c58d5d3..8d36ff5 100644
--- a/ui/cypress/support/model/PipelineElementInput.ts
+++ b/ui/cypress/support/model/PipelineElementInput.ts
@@ -21,6 +21,7 @@ import { OutputStrategyConfig } from './OutputStrategyConfig';
 
 export class PipelineElementInput {
     name: string;
+    ignoreTimestamp?: boolean;
     config: UserInput[];
     output: OutputStrategyConfig;
 }
diff --git a/ui/cypress/support/utils/DataLakeUtils.ts b/ui/cypress/support/utils/DataLakeUtils.ts
index 7f42345..9b31a78 100644
--- a/ui/cypress/support/utils/DataLakeUtils.ts
+++ b/ui/cypress/support/utils/DataLakeUtils.ts
@@ -206,7 +206,7 @@ export class DataLakeUtils {
     cy.get('div').contains('DataLake').parent().click();
   }
 
-  public static checkResults(dataLakeIndex: string, fileRoute: string, ignoreTime: boolean = false) {
+  public static checkResults(dataLakeIndex: string, fileRoute: string, ignoreTime?: boolean) {
 
     // Validate result in datalake
     cy.request({
@@ -252,7 +252,7 @@ export class DataLakeUtils {
     } else {
       actualResult = DataLakeUtils.parseCsv(actual);
     }
-    const expectedResult = DataLakeUtils.parseCsv(expected);
+    const expectedResult = ignoreTime ? DataLakeUtils.parseCsv(expected).map(row => row.splice(1)) : DataLakeUtils.parseCsv(expected);
     expect(actualResult).to.deep.equal(expectedResult);
   }
 
diff --git a/ui/cypress/support/utils/ProcessingElementTestUtils.ts b/ui/cypress/support/utils/ProcessingElementTestUtils.ts
index c82d0f3..c531427 100644
--- a/ui/cypress/support/utils/ProcessingElementTestUtils.ts
+++ b/ui/cypress/support/utils/ProcessingElementTestUtils.ts
@@ -73,7 +73,7 @@ export class ProcessingElementTestUtils {
         // Wait till data is stored
         cy.wait(10000);
 
-        DataLakeUtils.checkResults(dataLakeIndex, 'cypress/fixtures/' + expectedResultFile);
+        DataLakeUtils.checkResults(dataLakeIndex, 'cypress/fixtures/' + expectedResultFile, pipelineElementTest.processor.ignoreTimestamp);
 
     }
 }
diff --git a/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts b/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts
index b04f234..f7cd0ec 100644
--- a/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts
+++ b/ui/cypress/tests/pipelineElement/SinglePipelineElement.ts
@@ -22,7 +22,7 @@ import { ProcessorTest } from '../../support/model/ProcessorTest';
 const allTests = Cypress.env('processingElements');
 
 allTests.forEach(test => {
-  const testNames = ['increase3'];
+  const testNames = ['increase1'];
 
   const processorTest = test as ProcessorTest;
 

[incubator-streampipes] 01/03: [hotfix] Improve count aggregation

Posted by ri...@apache.org.
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 8181a398fc70c6026d82dc051e1ff95bdc947d6d
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Wed Jan 19 20:56:45 2022 +0100

    [hotfix] Improve count aggregation
---
 .../processors/siddhi/count/CountAggregation.java    | 11 +++++++----
 .../strings.en                                       |  2 +-
 .../siddhi/engine/generator/EventTypeGenerator.java  | 20 ++++++++++++++++++--
 .../siddhi/engine/generator/SiddhiAppGenerator.java  | 12 ++++--------
 .../generator/SiddhiInvocationConfigGenerator.java   |  5 +++--
 .../wrapper/siddhi/model/EventPropertyDef.java       | 10 ++++++++--
 .../wrapper/siddhi/model/SiddhiProcessorParams.java  | 14 +++++++++++++-
 7 files changed, 54 insertions(+), 20 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/count/CountAggregation.java b/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/count/CountAggregation.java
index 99d0cdc..04d5cb7 100644
--- a/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/count/CountAggregation.java
+++ b/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/count/CountAggregation.java
@@ -58,9 +58,10 @@ public class CountAggregation extends StreamPipesSiddhiProcessor {
                     .requiredPropertyWithUnaryMapping(EpRequirements.anyProperty(),
                             Labels.withId(COUNT_MAPPING), PropertyScope.DIMENSION_PROPERTY)
                     .build())
-            .outputStrategy(OutputStrategies.fixed(EpProperties.stringEp(Labels.empty(), "value",
-                    "http://schema.org/Text"), EpProperties.integerEp(Labels.empty(), "count",
-                    "http://schema.org/Number")))
+            .outputStrategy(OutputStrategies.fixed(
+                    EpProperties.timestampProperty("timestamp"),
+                    EpProperties.stringEp(Labels.empty(), "value","http://schema.org/Text"),
+                    EpProperties.integerEp(Labels.empty(), "count","http://schema.org/Number")))
             .requiredIntegerParameter(Labels.withId(TIME_WINDOW_KEY))
             .requiredSingleValueSelection(Labels.withId(SCALE_KEY),
                     Options.from(new Tuple2<>("Hours", HOURS_INTERNAL_NAME),
@@ -79,7 +80,9 @@ public class CountAggregation extends StreamPipesSiddhiProcessor {
     FromClause fromClause = FromClause.create();
     fromClause.add(Expressions.stream(siddhiParams.getInputStreamNames().get(0), Expressions.timeWindow(timeWindowSize, toTimeUnit(scale))));
 
-    SelectClause selectClause = SelectClause.create(Expressions.as(Expressions.property(fieldToCount), "value"),
+    SelectClause selectClause = SelectClause.create(
+            Expressions.as(Expressions.property("currentTimeMillis()"), "timestamp"),
+            Expressions.as(Expressions.property(fieldToCount), "value"),
             Expressions.as(Expressions.count(Expressions.property(fieldToCount)), "count"));
 
     GroupByClause groupByClause = GroupByClause.create(Expressions.property(fieldToCount));
diff --git a/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/resources/org.apache.streampipes.processors.siddhi.count/strings.en b/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/resources/org.apache.streampipes.processors.siddhi.count/strings.en
index c03282c..ce1c093 100644
--- a/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/resources/org.apache.streampipes.processors.siddhi.count/strings.en
+++ b/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/resources/org.apache.streampipes.processors.siddhi.count/strings.en
@@ -1,4 +1,4 @@
-org.apache.streampipes.processors.siddhi.count.title=Count Aggregation
+org.apache.streampipes.processors.siddhi.count.title=Count Value Occurrence
 org.apache.streampipes.processors.siddhi.count.description=Performs an aggregation based on a given event property and outputs the number of occurrences.
 
 count-mapping.title=Field to count
diff --git a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/EventTypeGenerator.java b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/EventTypeGenerator.java
index fb22457..f6c8da2 100644
--- a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/EventTypeGenerator.java
+++ b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/EventTypeGenerator.java
@@ -32,7 +32,16 @@ public class EventTypeGenerator<B extends EventProcessorBindingParams> {
     this.params = params;
   }
 
-  public Map<String, List<EventPropertyDef>> generateEventTypes() {
+  public List<EventPropertyDef> generateOutEventTypes() {
+    List<EventPropertyDef> sortedEventKeys = new ArrayList<>();
+    params.getOutEventType().forEach((key, value) -> {
+        sortedEventKeys.add(makeEventType(key, value));
+        sortedEventKeys.sort(Comparator.comparing(EventPropertyDef::getFieldName));
+    });
+    return sortedEventKeys;
+  }
+
+  public Map<String, List<EventPropertyDef>> generateInEventTypes() {
     Map<String, List<EventPropertyDef>> listOfEventKeys = new HashMap<>();
     AtomicReference<Integer> currentStreamIndex = new AtomicReference<>(0);
 
@@ -49,7 +58,14 @@ public class EventTypeGenerator<B extends EventProcessorBindingParams> {
     return listOfEventKeys;
   }
 
-  private EventPropertyDef makeEventType(Integer currentStreamIndex, String propertyName, Object propertyType) {
+  private EventPropertyDef makeEventType(String propertyName,
+                                         Object propertyType) {
+    return new EventPropertyDef(propertyName, toType((Class<?>) propertyType));
+  }
+
+  private EventPropertyDef makeEventType(Integer currentStreamIndex,
+                                         String propertyName,
+                                         Object propertyType) {
     return new EventPropertyDef(toSelectorPrefix(currentStreamIndex), propertyName, toType((Class<?>) propertyType));
   }
 
diff --git a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/SiddhiAppGenerator.java b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/SiddhiAppGenerator.java
index 418185c..a3adedc 100644
--- a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/SiddhiAppGenerator.java
+++ b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/SiddhiAppGenerator.java
@@ -52,12 +52,13 @@ public class SiddhiAppGenerator<B extends EventProcessorBindingParams> {
     return this.siddhiAppString.toString();
   }
 
-  private void registerEventType(String eventTypeName, List<EventPropertyDef> eventSchema) {
+  private void registerEventType(String eventTypeName,
+                                 List<EventPropertyDef> eventSchema) {
     String defineStreamPrefix = "define stream " + SiddhiUtils.prepareName(eventTypeName);
     StringJoiner joiner = new StringJoiner(",");
 
     eventSchema.forEach(typeInfo -> {
-      joiner.add(typeInfo.getSelectorPrefix() + typeInfo.getFieldName() + " " + typeInfo.getFieldType());
+        joiner.add(typeInfo.getSelectorPrefix() + typeInfo.getFieldName() + " " + typeInfo.getFieldType());
     });
 
     this.siddhiAppString
@@ -77,12 +78,7 @@ public class SiddhiAppGenerator<B extends EventProcessorBindingParams> {
             .getQueries()
             .forEach(query -> this.siddhiAppString.append(query).append("\n"));
 
-//    this.siddhiAppString.append(siddhiAppConfig.getOutputConfig().isOutputAllEvents() ?
-//            "insert all events into " : "insert into ")
-//            .append(SiddhiUtils.prepareName(outputStream))
-//            .append(";");
-
-    LOG.info("Registering statement: \n" + this.siddhiAppString.toString());
+    LOG.info("Registering statement: \n" + this.siddhiAppString);
 
   }
 }
diff --git a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/SiddhiInvocationConfigGenerator.java b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/SiddhiInvocationConfigGenerator.java
index 7b63e70..125cb81 100644
--- a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/SiddhiInvocationConfigGenerator.java
+++ b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/engine/generator/SiddhiInvocationConfigGenerator.java
@@ -38,9 +38,10 @@ public class SiddhiInvocationConfigGenerator<B extends EventProcessorBindingPara
   public SiddhiInvocationConfigGenerator(B params,
                                          BiFunction<SiddhiProcessorParams<B>, String, SiddhiAppConfig> statementFunction) {
     List<String> inputStreamNames = new InputStreamNameGenerator<>(params).generateInputStreamNames();
-    Map<String, List<EventPropertyDef>> eventTypeInfo = new EventTypeGenerator<>(params).generateEventTypes();
+    Map<String, List<EventPropertyDef>> eventTypeInfo = new EventTypeGenerator<>(params).generateInEventTypes();
+    List<EventPropertyDef> outTypeInfo = new EventTypeGenerator<>(params).generateOutEventTypes();
     List<String> outputEventKeys = new ArrayList<>(params.getOutEventType().keySet());
-    this.siddhiProcessorParams = new SiddhiProcessorParams<>(params, inputStreamNames, eventTypeInfo, outputEventKeys);
+    this.siddhiProcessorParams = new SiddhiProcessorParams<>(params, inputStreamNames, eventTypeInfo, outputEventKeys, outTypeInfo);
     this.siddhiAppConfig = statementFunction.apply(siddhiProcessorParams, getOutputStreamName());
     this.siddhiAppString = new SiddhiAppGenerator<>(siddhiProcessorParams, siddhiAppConfig)
             .generateSiddhiApp();
diff --git a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/model/EventPropertyDef.java b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/model/EventPropertyDef.java
index 75095e3..175f53e 100644
--- a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/model/EventPropertyDef.java
+++ b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/model/EventPropertyDef.java
@@ -20,8 +20,14 @@ package org.apache.streampipes.wrapper.siddhi.model;
 public class EventPropertyDef {
 
   private String selectorPrefix;
-  private String fieldName;
-  private String fieldType;
+  private final String fieldName;
+  private final String fieldType;
+
+  public EventPropertyDef(String fieldName,
+                          String fieldType) {
+    this.fieldName = fieldName;
+    this.fieldType = fieldType;
+  }
 
   public EventPropertyDef(String selectorPrefix, String fieldName, String fieldType) {
     this.selectorPrefix = selectorPrefix;
diff --git a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/model/SiddhiProcessorParams.java b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/model/SiddhiProcessorParams.java
index d6fc27f..a18a253 100644
--- a/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/model/SiddhiProcessorParams.java
+++ b/streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/model/SiddhiProcessorParams.java
@@ -22,6 +22,7 @@ import org.apache.streampipes.sdk.helpers.Tuple2;
 import org.apache.streampipes.wrapper.params.binding.EventProcessorBindingParams;
 import org.apache.streampipes.wrapper.siddhi.constants.SiddhiConstants;
 import org.apache.streampipes.wrapper.siddhi.constants.SiddhiStreamSelector;
+import org.apache.streampipes.wrapper.siddhi.utils.SiddhiUtils;
 
 import java.util.List;
 import java.util.Map;
@@ -32,15 +33,18 @@ public class SiddhiProcessorParams<B extends EventProcessorBindingParams> {
   private final List<String> inputStreamNames;
   private final Map<String, List<EventPropertyDef>> eventTypeInfo;
   private final List<String> outputEventKeys;
+  private final List<EventPropertyDef> outTypeInfo;
 
   public SiddhiProcessorParams(B params,
                                List<String> inputStreamNames,
                                Map<String, List<EventPropertyDef>> eventTypeInfo,
-                               List<String> outputEventKeys) {
+                               List<String> outputEventKeys,
+                               List<EventPropertyDef> outTypeInfo) {
     this.params = params;
     this.inputStreamNames = inputStreamNames;
     this.eventTypeInfo = eventTypeInfo;
     this.outputEventKeys = outputEventKeys;
+    this.outTypeInfo = outTypeInfo;
   }
 
   public B getParams() {
@@ -97,4 +101,12 @@ public class SiddhiProcessorParams<B extends EventProcessorBindingParams> {
 
     return selectString.toString();
   }
+
+  public String getOutputStreamName() {
+    return SiddhiUtils.getPreparedOutputTopicName(params);
+  }
+
+  public List<EventPropertyDef> getOutTypeInfo() {
+    return outTypeInfo;
+  }
 }

[incubator-streampipes] 02/03: [hotfix] Show default properties if none match recommended filter

Posted by ri...@apache.org.
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 99082e68a24ce8fc298c65b80e93474ab6d8c182
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Wed Jan 19 20:58:12 2022 +0100

    [hotfix] Show default properties if none match recommended filter
---
 .../filter/display-recommended.pipe.ts                  | 17 +++++++++--------
 .../static-mapping-unary.component.html                 |  1 -
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ui/src/app/core-ui/static-properties/filter/display-recommended.pipe.ts b/ui/src/app/core-ui/static-properties/filter/display-recommended.pipe.ts
index 78695f3..3577b9e 100644
--- a/ui/src/app/core-ui/static-properties/filter/display-recommended.pipe.ts
+++ b/ui/src/app/core-ui/static-properties/filter/display-recommended.pipe.ts
@@ -16,17 +16,19 @@
  *
  */
 
-import {Pipe, PipeTransform} from "@angular/core";
-import {EventPropertyUnion} from "../../../core-model/gen/streampipes-model";
+import { Pipe, PipeTransform } from '@angular/core';
+import { EventPropertyUnion } from '../../../core-model/gen/streampipes-model';
 
 @Pipe({name: 'displayRecommendedPipe'})
 export class DisplayRecommendedPipe implements PipeTransform {
-  transform(properties: EventPropertyUnion[], propertyScope: string, displayRecommended: boolean): any {
-    var result = [];
+  transform(properties: EventPropertyUnion[],
+            propertyScope: string,
+            displayRecommended: boolean): any {
+    const result = [];
     if (!displayRecommended) {
       return properties;
     } else {
-      if (propertyScope === undefined || propertyScope === "NONE") {
+      if (propertyScope === undefined || propertyScope === 'NONE') {
         return properties;
       } else {
         properties.forEach(property => {
@@ -35,10 +37,9 @@ export class DisplayRecommendedPipe implements PipeTransform {
           }
         });
       }
-      return result;
+      return result.length > 0 ? result : properties;
     }
   }
 
 
-
-}
\ No newline at end of file
+}
diff --git a/ui/src/app/core-ui/static-properties/static-mapping-unary/static-mapping-unary.component.html b/ui/src/app/core-ui/static-properties/static-mapping-unary/static-mapping-unary.component.html
index 3b5e843..c91afe6 100644
--- a/ui/src/app/core-ui/static-properties/static-mapping-unary/static-mapping-unary.component.html
+++ b/ui/src/app/core-ui/static-properties/static-mapping-unary/static-mapping-unary.component.html
@@ -19,7 +19,6 @@
 <div [formGroup]="parentForm" id="formWrapper">
     <div fxFlex="100" fxLayout="row">
             <mat-form-field class="example-full-width" color="accent">
-                <!--<mat-form-field class="example-full-width">-->
                 <mat-select formControlName="{{fieldName}}" [placeholder]="staticProperty.label" [attr.data-cy]="fieldName">
                     <mat-option *ngFor="let property of availableProperties | displayRecommendedPipe: staticProperty.propertyScope: displayRecommended" [value]="property.propertySelector">
                         {{property.runtimeName}}