Closed agh1467 closed 2 years ago
After working with the UI for a bit, I'm finding it will be too complicated to bolt-on a solution.
The UI issues were with data validation, and consistency. selectpicker
is not designed for data entry, only selecting data from an existing list. The tokenizer
is not designed to have a dropdown list attached to it at all.
Challenges with using selectpicker
:
Challenges with using tokenizer
:
<size>
, however, it doesn't reflect which items are selected.I have resolved to adding an additional field which will allow the user to input a comma delimited list of their own.
This has an added advantage of enabling a user to migrate an existing configuration to OPNsense. For example, if they already have a list of disabled_server_names in an existing configuration file, they can drop it into the UI. The user can actually use either, or both fields. They get combined into a single list when it goes into the configuration file.
There is risk of configuration error if the user inputs values surrounded with single quotes ('). The template does not accommodate existing quotes, so an entry will end up double single quoted which will prevent the configuration file from parsing.
Is your feature request related to a problem? Please describe. Unable to add server names to disable_server_names which are not currently available in the drop down.
Describe the solution you'd like I'd like to be able to enter server names which may not be currently present in sources, but might appear in the future.