You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2024/03/19 09:54:28 UTC

(streampipes) branch 2577-pipeline-element-templates-do-not-work updated: fix(#2577): Remove mapping properties from template selection

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

zehnder pushed a commit to branch 2577-pipeline-element-templates-do-not-work
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/2577-pipeline-element-templates-do-not-work by this push:
     new 4d6e1944f1 fix(#2577): Remove mapping properties from template selection
4d6e1944f1 is described below

commit 4d6e1944f119d06b0cdbd28185428e9971b5d59a
Author: Philipp Zehnder <te...@users.noreply.github.com>
AuthorDate: Tue Mar 19 10:54:08 2024 +0100

    fix(#2577): Remove mapping properties from template selection
---
 .../pipelineElementConfigurationTemplate.ts                         | 3 ++-
 .../pipeline-element-template.pipe.ts                               | 6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ui/cypress/tests/pipelineElementConfigurationTemplate/pipelineElementConfigurationTemplate.ts b/ui/cypress/tests/pipelineElementConfigurationTemplate/pipelineElementConfigurationTemplate.ts
index 85fc089a38..2b9fff9442 100644
--- a/ui/cypress/tests/pipelineElementConfigurationTemplate/pipelineElementConfigurationTemplate.ts
+++ b/ui/cypress/tests/pipelineElementConfigurationTemplate/pipelineElementConfigurationTemplate.ts
@@ -73,7 +73,8 @@ describe('Test Edit Adapter', () => {
             'have.class',
             'mat-mdc-radio-checked',
         );
-        cy.dataCy('number-mapping').contains('temperature');
+        // Mapping properties can not be stored in templates, therefore the default value is required
+        cy.dataCy('number-mapping').contains('density');
 
         // delete template
         PipelineElementTemplateUtils.deleteTemplate();
diff --git a/ui/src/app/core-ui/pipeline-element-template-config/pipeline-element-template.pipe.ts b/ui/src/app/core-ui/pipeline-element-template-config/pipeline-element-template.pipe.ts
index 1469613ae2..90d949b38b 100644
--- a/ui/src/app/core-ui/pipeline-element-template-config/pipeline-element-template.pipe.ts
+++ b/ui/src/app/core-ui/pipeline-element-template-config/pipeline-element-template.pipe.ts
@@ -18,6 +18,8 @@
 
 import { Injectable, Pipe, PipeTransform } from '@angular/core';
 import {
+    MappingPropertyNary,
+    MappingPropertyUnary,
     RuntimeResolvableAnyStaticProperty,
     RuntimeResolvableOneOfStaticProperty,
     RuntimeResolvableTreeInputStaticProperty,
@@ -34,7 +36,9 @@ export class PipelineElementTemplatePipe implements PipeTransform {
                 !(
                     p instanceof RuntimeResolvableOneOfStaticProperty &&
                     !(p instanceof RuntimeResolvableTreeInputStaticProperty)
-                ),
+                ) &&
+                !(p instanceof MappingPropertyUnary) &&
+                !(p instanceof MappingPropertyNary),
         );
     }
 }