eclipse-basyx / basyx-aas-web-ui

Web-based user interface for managing and interacting with Asset Administration Shells (AAS)
MIT License
9 stars 7 forks source link

Fix Visualization for AAS Viewer #77

Closed seicke closed 3 weeks ago

seicke commented 3 weeks ago

Description of Changes

Opening the Submodel "DemoSubmodelV3" of Test AAS "Demo AAS V3" in AAS Viewer:

before

After fix: localhost_3999_aasviewer_aas=http___localhost_9981_shells_aHR0cHM6Ly9odHctYmVybGluLmRlL2lkcy9hYXMvZGVtb2Fhc3Yz path=http___localhost_9981_submodels_aHR0cHM6Ly9odHctYmVybGluLmRlL2lkcy9zbS9kZW1 (1)

BaSyx Configuration for Testing

https://github.com/eclipse-basyx/basyx-java-server-sdk/tree/main/examples/BaSyxMinimal

aaronzi commented 3 weeks ago

Thanks for finding this bug, which renders both the generic submodel visualization and a custom plugin if its semanticId configuration matches the semanticId of the submodel in the viewerMode.

The fix you suggested actually removes the wrong visualization. If a custom plugin matches based on the semanticId, the custom plugin should be shown, not the generic submodel visualization. I have pushed a new commit that addresses this issue.

Still, the BaSyxMinimal example looks weird for the DemoSubmodelV3. The reason is the wrong usage of the custom hello world plugin for a submodel containing SubmodelElementCollections, which was not intended by the custom plugin. This should be fixed by updating the Demo AAS V3 in the BaSyxMinimal example and removing the usage of the custom plugin here. Perhaps a second "flat" submodel should be introduced, which can then use the hello world plugin.