Polypheny-DB
Polypheny-DB copied to clipboard
Enable Ordering of AdapterSettings
Description:
Polypheny-UI, as of now, does not correctly sort the available adapter settings when deploying an adapter. While it receives the ordering for the settings already, it is not able to show them sorted.
Reason:
At the moment those settings are ordered alphabetically. This is due to the fact that Polypheny-UI uses FormGroup
to initalize and control/validate those settings. As FormGroup is more or less structurally a Object
with key, value pairs it is therefore ordered by its keys.
Possible Approach:
As of now, the keys in those FromGroup
s are needed to get and change the correct values for specific changes.
Therefore one has two possible ways to achieve the correct ordering.
- remove the need for the keys to be the exact setting names, for example prefix with "[position]_[settingkey]" and removing the prefix when showing the setting ( also one would need ot remove those prefixes when deploying the adapter in the end )
- exchange the
FormGroup
s withFormArray
s which hold the key value pairs as objects
The first approach is possibly easier but would achieve worser performance, the second approach requires more refactoring, but could be cleaner in the end.