Hi there,
I am thinking of changing how a user can set environment variables when installing a rockon.
Currently all env vars have to be entered by the user, even if they are optional or have a default value that the user is happy with.
My proposal is to introduce two additional concepts: optional vars and vars with a default value. This would be in addition to required vas that are currently used.
How would this look like?
The required vars would stay as is. If a default value would be defined, it is displayed.
The fields of optional/default vars would start off disabled. Beside them would be unchecked checkboxes. This state would denote that they should not be set. Or in the case of default vars, the default value would be used.
When the user checks the checkbox, the field would become enabled. Now the user can input a value.
Why the checkbox?
Because it helps us to understand the difference between an unset variable and a blank valued variable.
In the case of default vars, the default value would set instead.
Changes to the rockon json are denoted by **:
{
"description": "<Detailed description. Eg: Login username for Syncthing UI>",
"label": "Web-UI username",
(optional)"index": <integer: 1 or above. order of this environment variable, if relevant>,
** (optional)"default_value": <string: can also be an empty string>,
** (optional)"required": <bool: true, variable is required to to be filled out by the user; false, variable is optional. Default true>
}
Let’s discuss
6 posts - 4 participants