duplicati / ngclient

Angular Client for Duplicati
MIT License
1 stars 0 forks source link

Some advanced options on S3 page should be dropdowns #23

Closed kenkendk closed 2 weeks ago

kenkendk commented 1 month ago

The "s3-client" option is an enumeration with only the selected options: aws and minio. The options "s3-storage-class" and "s3-location-constraint" are strings but have a list of common options. These options can be retrieved by calling the webmodule.

sp90 commented 1 month ago

@kenkendk these fields are forwarded as configured on the backend, it dynamically consume how the backend is sending down s3-storage-class so if its an enum then just pass the enum with the options (aka ValidValues) there along with the item.

Screenshot 2024-10-30 at 14 27 12
sp90 commented 1 month ago

Same for s3-client

Screenshot 2024-10-30 at 14 29 37
sp90 commented 1 month ago

We don't currently "suggested values" but we could easily add it but i would prefer it to be part of the api so we have one source of truth

kenkendk commented 3 weeks ago

For the s3-client you are correct, the backend should provide this. The reason why the storage-class and location-constraint values are not encoded, is because they have a dictionary of (label, value). The options could be set to any string value chosen by the user, but the common ones are reported through the s3-config webmodule.

sp90 commented 2 weeks ago

With the newly added dynamic field overwrites we can also add enumeration options in the frontend so both fields are now handled correctly in the frontend

If the user want to override enumerations they can override using the edit target url feature i guess thats fine?