muyangye opened a new issue, #1879:
URL: https://github.com/apache/streampipes/issues/1879

   ### Apache StreamPipes version
   
   dev (current development state)
   
   ### Affected StreamPipes components
   
   UI
   
   ### What happened?
   
   As [discussed](https://github.com/apache/streampipes/discussions/1872), this 
isn't really a bug but is a very confusing default setting. I'll paste that 
discussion here:
   
   I modified the Property Scope of **BooleanOperatorProcessor** from 
PropertyScope.NONE to PropertyScope.MEASUREMENT_PROPERTY:
   
![e0d8a1f72a0936a0a38a1a77a08fd0c](https://github.com/apache/streampipes/assets/76769570/690652c7-aeb2-4797-af76-9c077bdf28be)
   So now b4, whose Property Scope is PROPERTY_SCOPE.HEADER_PROPERTY, is not 
shown in the UI:
   
![80b4a16200255c673f81afbdede7e22](https://github.com/apache/streampipes/assets/76769570/3d4f7e09-3d21-4926-82fb-d7fd9ecfbbf0)
   But its value is always **true**:
   
![d0b42b32f7a8a91437c2dd723376706](https://github.com/apache/streampipes/assets/76769570/a4dbbbca-07ef-4d97-bdbf-df5aa273e3b7)
   After I clicked `SELECT ALL` in the UI and connected to a DataLake, the 
result is:
   
![dca3d141ff4db8f6b1806c0460e1e05](https://github.com/apache/streampipes/assets/76769570/b2a51e62-eaf6-47f2-a6ca-eca41208877d)
   Clearly this is not what I expected since the UI only shows b0, b1, and b2. 
However, it seems that the result takes into account of b4. As evident not only 
by the above picture but also my debug message that prints all input streams:
   
![1693950191187](https://github.com/apache/streampipes/assets/76769570/3c673bf5-d19c-49f0-8989-e6f043abb96f)
   However, if I didn't click `SELECT ALL` but instead clicked b0, b1, and b2 
one by one, the result becomes correct:
   
![a614bdecdddeeecca9687304d913165](https://github.com/apache/streampipes/assets/76769570/add51311-a96d-4d1f-90a1-84fe7dc56037)
   
   ### How to reproduce?
   
   Requirements:
   
   1. Any processor that uses Nary Property Mapping (so that there's a `SELECT 
ALL` button in the UI)
   2. Property Scope set to anything that is NOT PropertyScope.NONE
   3. There exists a property in the input stream that satisfies EpRequirements 
but is not the same Property Scope as in the code
   4. Click `SELECT ALL` in the UI
   
   Currently there's no processor that satisfies both 1 and 2, but one can 
easily modify Property Scope to achieve this.
   
   ### Expected behavior
   
   For NaryMappingProperty, `Show only recommended` should be default to false.
   
   ### Additional technical information
   
   I originally thought a simple one line change is going to work, but 
unfortunately that is not the case. If I only change line 46 of 
[static-mapping-nary.component.html](https://github.com/apache/streampipes/blob/312b55bb978d67ebbe65e3746a5345b579ac6da5/ui/src/app/core-ui/static-properties/static-mapping-nary/static-mapping-nary.component.html#L46)
 either by hardcoding a false value or adding a variable in 
[abstract-static-property.ts](https://github.com/apache/streampipes/blob/312b55bb978d67ebbe65e3746a5345b579ac6da5/ui/src/app/core-ui/static-properties/base/abstract-static-property.ts),
 b4 is indeed shown but the `Show only recommended` slider is still slided to 
the right, causing an inconsistency:
   
![1694072603617](https://github.com/apache/streampipes/assets/76769570/7dd3231b-f05d-424a-9d00-56542d94530f)
   Therefore, I believe a new file/change in 
[display-recommeded.pipe.ts](https://github.com/apache/streampipes/blob/312b55bb978d67ebbe65e3746a5345b579ac6da5/ui/src/app/core-ui/static-properties/filter/display-recommended.pipe.ts)
 is necessary. Since this file is used by all static properties. I am thinking 
about creating a new file like "nary-display-recommended.pipe.ts" and then 
modify all relevant files.
   
   I am not sure if the above approach will work as I don't have the time to 
experiment yet, but I feel that this is a non-extensible hotfix. Is there a 
better way to do this?
   
   ### Are you willing to submit a PR?
   
   Yes, I am willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to