Polypheny-DB icon indicating copy to clipboard operation
Polypheny-DB copied to clipboard

Enable Ordering of AdapterSettings

Open datomo opened this issue 3 years ago • 2 comments

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.

issue

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 FromGroups 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 FormGroups with FormArrays 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.

datomo avatar Apr 15 '21 20:04 datomo